Merge: Sys is top
[nit.git] / lib / pthreads / pthreads.nit
index 98fc113..8b8de1f 100644 (file)
 
 # Main POSIX threads support and intro the classes `Thread`, `Mutex` and `Barrier`
 module pthreads is
-       c_compiler_option("-pthread")
-       c_linker_option("-pthread")
+       cflags "-pthread"
+       ldflags "-pthread"
        pkgconfig "bdw-gc"
+       new_annotation threaded
 end
 
 #
@@ -116,12 +117,6 @@ 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 `{ return pthread_equal(*recv, *other); `}
 
        fun kill(signal: Int) `{ pthread_kill(*recv, signal); `}