#import <pthread.h> #import <stdlib.h> // Globals pthread_mutex_t *gLck; int gSum; int main (int argc, const char * argv[]) { pthread_t *tFoo, *tBar; int tErr, tArgF, tArgB; // create the mutex construct tErr = pthread_mutex_init(gLck);
You have to do it thru the underlying system-specific handle obtained by boost::thread::native_handle().