3 * @author aurelien.morelle@parrot.fr
7 #ifndef _SIGNAL_INCLUDE_OS_
8 #define _SIGNAL_INCLUDE_OS_
11 #include <VP_Os/vp_os_types.h>
13 #include <vp_os_signal_dep.h>
22 * Initializes a mutex.
24 * @param mutex The mutex to initialize
27 vp_os_mutex_init(vp_os_mutex_t *mutex);
32 * @param mutex The mutex to destroy
35 vp_os_mutex_destroy(vp_os_mutex_t *mutex);
40 * @param mutex The mutex to lock
43 vp_os_mutex_lock(vp_os_mutex_t *mutex);
48 * @param mutex The mutex to unlock
51 vp_os_mutex_unlock(vp_os_mutex_t *mutex);
57 * Initializes a condition variable.
59 * @param cond The condition to initialize
60 * @param mutex The mutex associated to this condition variable
63 vp_os_cond_init(vp_os_cond_t *cond, vp_os_mutex_t *mutex);
66 * Destroys a condition variable.
68 * @param cond The condition to destroy
71 vp_os_cond_destroy(vp_os_cond_t *cond);
74 * Waits for the signal of a condition variable.
76 * @param cond The condition to wait for
79 vp_os_cond_wait(vp_os_cond_t *cond);
82 * Waits for the signal of a condition variable.
84 * @param cond The condition to wait for
85 * @param ms Time to wait in milliseconds
87 * @return SUCCESS or FAIL (if delay has been reached before or not)
90 vp_os_cond_timed_wait(vp_os_cond_t *cond, uint32_t ms);
93 * Signals a condition variable.
95 * @param cond The condition to signal
98 vp_os_cond_signal(vp_os_cond_t *cond);
106 #endif // ! _SIGNAL_INCLUDE_OS_