Multithreaded Programming Guide

pthread_spin_init() Return Values

Upon successful completion, the pthread_spin_init() function returns 0. Otherwise, one of the following error codes is returned.


EAGAIN

Description:

The system lacks the necessary resources to initialize another spin lock.


EBUSY

Description:

The system has detected an attempt to initialize or destroy a spin lock while the lock is in use (for example, while being used in a pthread_spin_lock() call) by another thread.


EINVAL

Description:

The value specified by lock is invalid.