Skip to main content
Header: ar_osal/api/ar_osal_signal2.h

Functions

ar_osal_signal2_init

Initializes a signal2 object. Signal returns the initialized object. The signal object is initially cleared. signal object memory is allocated by the client. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the initialized object.
Returns 0 Success Nonzero Failure

ar_osal_signal2_deinit

De-initializes signal2 object. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the initialized object.
Returns 0 Success Nonzero Failure

ar_osal_signal2_get_size

Get signal object size for object memory allocation by client. @datatypes ar_osal_signal2_t
Returns Size of signal object

ar_osal_signal2_create

Signal object memory is allocated and initialized by this API. osal_signal2_create() or osal_signal2_init() would be used, but not both. @datatypes ar_osal_signal2_t
Parameters
signal2: Pointer to the initialized object.
Returns 0 Success Nonzero Failure

ar_osal_signal2_destroy

Destroys the specified signal object. @note1cont Signal objects must not be destroyed while they are still in use. If this happens the behavior is undefined. @note1cont In general, application code should “destroy” a signal2 object prior to deallocating it; calling osal_signal2_destroy() before deallocating it ensures that all osal_signal2_set() calls have completed. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the signal object to destroy.
Returns 0 Success Nonzero Failure

ar_osal_signal2_wait_any

Suspends the current thread until any of the specified signals are set. Signals are represented as bits 0-31 in the 32-bit mask value. A mask bit value of 1 indicates that a signal is to be waited on, and 0 that it is not to be waited on. If a thread is waiting on a signal object for any of the specified set of signals to be set, and one or more of those signals is set in the signal object, then the thread is awakened. At most one thread can wait on a signal object at any given time. Signals must be explicitly cleared by a thread when it is awakened the wait operations do not automatically clear them. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the signal object to wait on.
uint32_t
Mask value identifying the individual signals in the signal object to be waited on.
Returns A 32 bit word with current signals.

ar_osal_signal2_wait_all

Suspends the current thread until all of the specified signals are set. Signals are represented as bits 0-31 in the 32-bit mask value. A mask bit value of 1 indicates that a signal is to be waited on, and 0 that it is not to be waited on. If a thread is waiting on a signal object for all of the specified set of signals to be set, and all of those signals are set in the signal object, then the thread is awakened. At most one thread can wait on a signal object at any given time. Signals must be explicitly cleared by a thread when it is awakened the wait operations do not automatically clear them. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the signal object to wait on.
uint32_t
Mask value which identifies the individual signals in the signal object to be waited on.
Returns A 32 bit word with current signals.

ar_osal_signal2_set

Sets signals in the specified signal object. Signals are represented as bits 0-31 in the 32-bit mask value. A mask bit value of 1 indicates that a signal is to be set, and 0 that it is not to be set. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the signal object to be modified.
uint32_t
Mask value identifying the individual signals to be set in the signal object.
Returns 0 Success Nonzero Failure

ar_osal_signal2_get

Gets a signal from a signal object. Returns the current signal values of the specified signal object. @datatypes ar_osal_signal2_t
Parameters
ar_osal_signal2_t
Pointer to the signal object to access.
Returns A 32 bit word with current signals

ar_osal_signal2_clear

Clear signals in the specified signal object. Signals are represented as bits 0-31 in the 32-bit signal2_mask value. A signal2_mask bit value of 1 indicates that a signal is to be cleared, and 0 that it is not to be cleared. Signals must be explicitly cleared by a thread when it is awakened the wait operations do not automatically clear them. @datatypes ar_osal_signal2_t
Parameters
Pointer to the signal object to modify.
uint32_t
signal2_mask value identifying the individual signals to be cleared in the signal object.
Returns 0 Success Nonzero Failure