119// We will actually store a C++ rtos:EventQueue in here;
120// attempt to match layout for storage, and assert size in equeue_mbed.cpp
121#if MBED_CONF_RTOS_PRESENT
122 osEventFlagsId_t _id;
123 mbed_rtos_storage_event_flags_t _obj_mem;
124#else
125 uint32_t _flags;
126#endif
127 } equeue_sema_t;
128#elif defined(EQUEUE_PLATFORM_MBED)
129typedefint equeue_sema_t;
130#endif
131
132// Platform semaphore operations
133//
134// The equeue_sema_create and equeue_sema_destroy manage the lifetime
135// of the semaphore. On error, equeue_sema_create should return a negative
136// error code.
137//
138// The equeue_sema_signal marks a semaphore as signalled such that the next
139// equeue_sema_wait will return true.
140//
141// The equeue_sema_wait waits for a semaphore to be signalled or returns
142// immediately if equeue_sema_signal had been called since the last
143// equeue_sema_wait. The equeue_sema_wait returns true if it detected that
144// equeue_sema_signal had been called. If ms is negative, equeue_sema_wait
145// will wait for a signal indefinitely.
146int equeue_sema_create(equeue_sema_t *sema);
147void equeue_sema_destroy(equeue_sema_t *sema);
148void equeue_sema_signal(equeue_sema_t *sema);
149bool equeue_sema_wait(equeue_sema_t *sema, int ms);
150
151#ifdef __cplusplus
152 }
153#endif
154
155#endif
Important Information for this Arm website
This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.