
Functions | |
| int | mpmutex_init (mpmutex_t *mutex, key_t key) |
| int | mpmutex_destroy (mpmutex_t *mutex) |
| int | mpmutex_lock (mpmutex_t *mutex) |
| int | mpmutex_trylock (mpmutex_t *mutex) |
| int | mpmutex_unlock (mpmutex_t *mutex) |
| int mpmutex_init | ( | mpmutex_t * | mutex, |
| key_t | key | ||
| ) |
Initialize MP mutex
| [in,out] | mutex | MP mutex object |
| [in] | key | Unique object ID |
| -EINVAL | Invalild argument |
| -ENOENT | No allocate mutex |
| int mpmutex_destroy | ( | mpmutex_t * | mutex | ) |
Destroy MP mutex
| [in,out] | mutex | MP mutex object |
| -EINVAL | Invalid argument |
| int mpmutex_lock | ( | mpmutex_t * | mutex | ) |
Lock MP mutex
mpmutex_lock() is lock specified mutex. If mutex is already locked, then mpmutex_lock() waits for it to be unlocked by locker.
| [in,out] | mutex | MP mutex object |
| -EINVAL | Invalid argument |
| int mpmutex_trylock | ( | mpmutex_t * | mutex | ) |
Try to lock MP mutex
mpmutex_trylock() is try to lock specified mutex. If mutex is already locked, then return -EBUSY.
| [in,out] | mutex | MP mutex object |
| -EINVAL | Invalid argument |
| -EBUSY | Mutex is locked |
| int mpmutex_unlock | ( | mpmutex_t * | mutex | ) |
Unlock MP mutex
| [in,out] | mutex | MP mutex object |
| -EINVAL | Invalid argument |