zephyr/samples/nanokernel/test/test_sema
Anas Nashif b8823770d2 Rename TIMO -> ZEPHYR
Change-Id: Id44a129e275fb0cfe1fce6ec2a03c2d86ffe3995
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2016-02-05 20:14:16 -05:00
..
src Eliminate VxMicro branding in sample projects 2016-02-05 20:14:15 -05:00
Makefile Rename TIMO -> ZEPHYR 2016-02-05 20:14:16 -05:00
README.txt Fixed make target for running in qemu (nanokernel) 2016-02-05 20:14:16 -05:00
prj_arm.conf samples: remove explicit enabling of SW_ISR_TABLE/DYNAMIC 2016-02-05 20:13:45 -05:00
prj_x86.conf Kbuild: Updates to the nanokernel config overlays. 2016-02-05 20:14:07 -05:00

README.txt

Title: test_sema

Description:

This test verifies that the nanokernel semaphore APIs operate as expected.

---------------------------------------------------------------------------

Building and Running Project:

This nanokernel project outputs to the console.  It can be built and executed
on QEMU as follows:

    make qemu

---------------------------------------------------------------------------

Troubleshooting:

Problems caused by out-dated project information can be addressed by
issuing one of the following commands then rebuilding the project:

    make clean          # discard results of previous builds
                        # but keep existing configuration info
or
    make pristine       # discard results of previous builds
                        # and restore pre-defined configuration info

---------------------------------------------------------------------------

Sample Output:

tc_start() - Test Nanokernel Semaphores
Nano objects initialized
Giving and taking a semaphore in a task (non-blocking)
Giving and taking a semaphore in an ISR (non-blocking)
Giving and taking a semaphore in a fiber (non-blocking)
Semaphore from the task woke the fiber
Semaphore from the fiber woke the task
Semaphore from the ISR woke the task.
First pass
multiple-waiter fiber 0 trying to get semaphore...
multiple-waiter fiber 1 trying to get semaphore...
multiple-waiter fiber 2 trying to get semaphore...
multiple-waiter fiber 0 acquired semaphore, sending reply
multiple-waiter fiber 1 acquired semaphore, sending reply
multiple-waiter fiber 2 acquired semaphore, sending reply
Task took multi-waiter reply semaphore 3 times, as expected.
Second pass
multiple-waiter fiber 0 trying to get semaphore...
multiple-waiter fiber 1 trying to get semaphore...
multiple-waiter fiber 2 trying to get semaphore...
multiple-waiter fiber 0 acquired semaphore, sending reply
multiple-waiter fiber 1 acquired semaphore, sending reply
multiple-waiter fiber 2 acquired semaphore, sending reply
Task took multi-waiter reply semaphore 3 times, as expected.
===================================================================
PASS - main.
===================================================================
PROJECT EXECUTION SUCCESSFUL