medfall

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit cb6c8e254293d7fe9a777b864b8d3a75d77f1f06
parent 4dd628c2058227f6ac704384074ed3b4dfcb4237
Author: Michael Savage <mikejsavage@gmail.com>
Date:   Tue Jan 12 22:50:26 +0000

Actually define the THREAD macro

Diffstat:
unix_thread.cc | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/unix_thread.cc b/unix_thread.cc @@ -2,13 +2,14 @@ #include <pthread.h> #define THREAD( f ) void * f( void * data ) +typedef THREAD( ThreadCallback ); #define THREAD_END return NULL struct Thread { pthread_t pthread; }; -inline void thread_init( Thread * thread, void * callback( void * ), void * data ) { +inline void thread_init( Thread * thread, ThreadCallback callback, void * data ) { const int ok = pthread_create( &thread->pthread, NULL, callback, data ); if( ok == -1 ) { err( 1, "pthread_create failed" );