The bic operation is a bit more subtle we want to set

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: tion is included as a convenience for application errors. It simply prints its input and then terminates. Figure A.1 shows the code for the error reporting functions. A.3 Error-handling wrappers Here are some examples of the different error-handling wrappers. Unix-style error-handling wrappers Figure A.2 shows the wrapper for the Unix-style wait function. If the wait returns with an error, the wrapper prints an informative message and then exits. Otherwise, it returns a PID to the caller. Figure A.3 shows the wrapper for the Unix-style kill function. Notice that this function, unlike Wait, returns void on success. Posix-style error-handling wrappers Figure A.4 shows the wrapper for the Posix-style pthread mutex lock function. Like most Posixstyle functions, it does not overload useful results with error return codes, so the wrapper returns void on success. One exception is the Posix-style pthread cond timedwait which returns an error code of ETIMEDOUT if the call times out. Since this particular re...
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