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>
|
||
|---|---|---|
| .. | ||
| 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 | ||