mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-02 17:33:00 +00:00
This enable defining mutexes in source code in addition to defining in MDEF files. This introduces the macro DEFINE_MUTEX(mutex_name). The mutexes created this way are the same, in functionality, as those defined in MDEF files. They can be manipulated by the standard microkernel mutex APIs. Sample usage: DEFINE_MUTEX(mutex1); void one_function(void) { task_mutex_lock_wait(mutex1); ... task_mutex_unlock(mutex1); } To use the mutex defined in another source file, simply add: extern const kmutex_t mutex1; to the desired C or header file. [ DL: This is a slightly modified version of similar patch by Allan Stephens available at https://oic-review.01.org/gerrit/3255 ] Change-Id: Ib9cd8193eaf849a8aad1d217912759324ee8818e Signed-off-by: Daniel Leung <daniel.leung@intel.com> |
||
---|---|---|
.. | ||
arch | ||
bluetooth | ||
drivers | ||
microkernel | ||
misc | ||
net | ||
toolchain | ||
atomic.h | ||
device.h | ||
gpio.h | ||
i2c.h | ||
init.h | ||
kernel_version.h | ||
linker-defs.h | ||
linker-tool-gcc.h | ||
linker-tool.h | ||
microkernel.h | ||
nanokernel.h | ||
section_tags.h | ||
sections.h | ||
spi.h | ||
sw_isr_table.h | ||
sys_clock.h | ||
toolchain.h |