diff options
-rw-r--r-- | zix/thread.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/zix/thread.h b/zix/thread.h index 05d7bdb..b1fcf97 100644 --- a/zix/thread.h +++ b/zix/thread.h @@ -39,6 +39,9 @@ typedef pthread_t ZixThread; /** Initialize @c thread to a new thread. + + The thread will immediately be launched, calling @c function with @c arg + as the only parameter. */ static inline ZixStatus zix_thread_create(ZixThread* thread, @@ -47,15 +50,6 @@ zix_thread_create(ZixThread* thread, void* arg); /** - Cancel @c thread. - - This function sends a cancellation request, but does not wait until the - thread actually exists. Use zix_thread_join() for that. -*/ -static inline ZixStatus -zix_thread_cancel(ZixThread thread); - -/** Join @c thread (block until @c thread exits). */ static inline ZixStatus @@ -88,12 +82,6 @@ zix_thread_create(ZixThread* thread, } static inline ZixStatus -zix_thread_cancel(ZixThread thread) -{ - return pthread_cancel(thread) ? ZIX_STATUS_ERROR : ZIX_STATUS_SUCCESS; -} - -static inline ZixStatus zix_thread_join(ZixThread thread, void** retval) { return pthread_join(thread, retval) |