For example we wouldnt want any goto statements since

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: 62 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 APPENDIX A. ERROR HANDLING if ((rc = pthread_mutex_lock(mutex)) != 0) posix_error(rc, "Pthread_mutex_lock error"); } void Pthread_mutex_unlock(pthread_mutex_t *mutex) { int rc; if ((rc = pthread_mutex_unlock(mutex)) != 0) posix_error(rc, "Pthread_mutex_unlock error"); } void Pthread_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) { int rc; if ((rc = pthread_cond_init(cond, attr)) != 0) posix_error(rc, "Pthread_cond_init error"); } void Pthread_cond_signal(pthread_cond_t *cond) { int rc; if ((rc = pthread_cond_signal(cond)) != 0) posix_error(rc, "Pthread_cond_signal error"); } void Pthread_cond_broadcast(pthread_cond_t *cond) { int rc; if ((rc = pthread_cond_broadcast(cond)) != 0) posix_error(rc, "Pthread_cond_broadcast error"); } void Pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) { int rc; if...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online