This enable defining semaphores in source code in addition to defining in MDEF files. This introduces the macro DEFINE_SEMAPHORE(semaphore_name). The semaphores created this way are the same, in functionality, as those defined in MDEF files. They can be manipulated by the standard microkernel semaphore APIs. Define the semaphore using: DEFINE_SEMAPHORE(sem1); and "sem1" can be used, for example: task_sem_give(sem1); or, task_sem_take(sem1); etc. To use the semaphore defined in another source file, simply add: extern const ksem_t sem11; to the desired C or header file. Change-Id: Ia9c128648f7a26fc776eeb8f6fcc4158b1712a97 Signed-off-by: Daniel Leung <daniel.leung@intel.com> |
||
|---|---|---|
| .. | ||
| base_api.h | ||
| command_packet.h | ||
| event.h | ||
| fifo.h | ||
| mailbox.h | ||
| memory_map.h | ||
| memory_pool.h | ||
| mutex.h | ||
| pipe.h | ||
| semaphore.h | ||
| task_irq.h | ||
| task.h | ||
| ticks.h | ||