The body statement occurs on lines 6 through 8 of the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 0) posix_error(rc, "Pthread_create error"); } void Pthread_cancel(pthread_t tid) { int rc; if ((rc = pthread_cancel(tid)) != 0) posix_error(rc, "Pthread_cancel error"); } void Pthread_join(pthread_t tid, void **thread_return) { int rc; if ((rc = pthread_join(tid, thread_return)) != 0) posix_error(rc, "Pthread_join error"); } void Pthread_detach(pthread_t tid) { int rc; if ((rc = pthread_detach(tid)) != 0) posix_error(rc, "Pthread_detach error"); } void Pthread_exit(void *retval) { pthread_exit(retval); } pthread_t Pthread_self(void) { return pthread_self(); } /************************************************************* * Wrappers for Pthreads mutex and condition variable functions ************************************************************/ void Pthread_mutex_init(pthread_mutex_t *mutex, pthread_mutexattr_t *attr) { int rc; if ((rc = pthread_mutex_init(mutex, attr)) != 0) posix_error(rc, "Pthread_mutex_init error"); } void Pthread_mutex_lock(pthread_mutex_t *mutex) { int rc; 682 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 3...
View Full Document

Ask a homework question - tutors are online