CCI/cci — pull request #25 by scottatchley (2013-02-19 17:04:40+00:00)
Title: Add --enable-mutex-errorcheck option

Enabling this option initializes mutexes with a
pthread_mutexattr_type of PTHREAD_MUTEX_ERRORCHECK.
All locks and unlocks will then check the return value
and abort() if there is an error.

We define these macros:

CCI_LOCK_INIT(x)
CCI_LOCK_DESTROY(x)
CCI_LOCK(x)
CCI_UNLOCK(x)

There is no need to initialize and pass a pthread_mutexattr_t
to CCI_LOCK_INIT().

This patch only alters src/api. It does _not_ add this to any
transports.

To use them, simply replace the pthread_mutex_* with the CCI_*
equivalent. The macros cannot return a value, so do not try to
error check them. If you need error checking, use the configure
option.