zephyr/include/microkernel
Daniel Leung 811c838ff1 microkernel: introduce support for private mutexes
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>
2016-02-05 20:14:46 -05:00
..
base_api.h microkernel: Rename struct mutex_struct to _k_mutex_struct 2016-02-05 20:14:46 -05:00
command_packet.h Remove trailing semicolon in definition of CMD_PKT_SET_INSTANCE() 2016-02-05 20:14:42 -05:00
event.h Doxygen: microkernel: Move event documentation from c to .h file 2016-02-05 20:14:39 -05:00
fifo.h Doxygen: Move the microkernel FIFO APIs comments to the .h file. 2016-02-05 20:14:38 -05:00
mailbox.h doxygen: move mailbox comments to header file 2016-02-05 20:14:37 -05:00
memory_map.h doxygen: memory_map: update in-code documentation 2016-02-05 20:14:38 -05:00
memory_pool.h Rename microkernel/pool.h to memory_pool.h 2016-02-05 20:14:25 -05:00
mutex.h microkernel: introduce support for private mutexes 2016-02-05 20:14:46 -05:00
pipe.h Rename microkernel/chan.h to microkernel/pipe.h 2016-02-05 20:14:00 -05:00
semaphore.h Doxygen: Microkernel semaphore APIs comments to header files. 2016-02-05 20:14:38 -05:00
task_irq.h Rename microkernel/k_types.h to base_api.h 2016-02-05 20:14:25 -05:00
task.h Don't expose APIs for experimental task monitoring capability 2016-02-05 20:14:15 -05:00
ticks.h Rename kernel's clock_vars.h to sys_clock.h 2016-02-05 20:14:26 -05:00