Merge: pthreads on OS X
authorJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 22:56:53 +0000 (17:56 -0500)
committerJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 22:56:53 +0000 (17:56 -0500)
Fix #869

Pull-Request: #933
Reviewed-by: Jean Privat <jean@pryen.org>

lib/pthreads/pthreads.nit

index 94cf078..bce93c4 100644 (file)
@@ -18,6 +18,7 @@
 module pthreads is
        c_compiler_option("-pthread")
        c_linker_option("-pthread")
+       pkgconfig "bdw-gc"
 end
 
 #
@@ -115,13 +116,7 @@ private extern class NativePthread in "C" `{ pthread_t * `}
                return (nullable_Object)thread_return;
        `}
 
-       fun attr: NativePthreadAttr `{
-               pthread_attr_t *pattr = malloc(sizeof(pthread_attr_t));
-               pthread_getattr_np(*recv, pattr);
-               return pattr;
-       `}
-
-       fun equal(other: NativePthread): Bool `{ pthread_equal(*recv, *other); `}
+       fun equal(other: NativePthread): Bool `{ return pthread_equal(*recv, *other); `}
 
        fun kill(signal: Int) `{ pthread_kill(*recv, signal); `}
 end