zephyr/samples/synchronization
Andrew Boie 39962dc92c samples: use k_thread_create()
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-05-11 20:24:22 -04:00
..
src samples: use k_thread_create() 2017-05-11 20:24:22 -04:00
Makefile tests: introduce Makefile.test 2017-01-03 17:48:44 +00:00
README.rst doc: fix .rst files canonical heading order 2017-01-20 16:06:36 -08:00
prj.conf samples: synchronization: move to legacy/ 2016-11-02 22:05:29 +00:00
sample.tc samples: synchronization: move to legacy/ 2016-11-02 22:05:29 +00:00
testcase.ini samples: tests: remove obsolete KERNEL_TYPE and kernel variables 2016-11-04 15:47:25 -04:00

README.rst

.. _synchronization_sample:

Synchronization Sample
######################

Overview
********

A simple application that demonstates basic sanity of the kernel.
Two threads (A and B) take turns printing a greeting message to the console,
and use sleep requests and semaphores to control the rate at which messages
are generated. This demonstrates that kernel scheduling, communication,
and timing are operating correctly.

Building and Running
********************

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

.. code-block:: console

   $ cd samples/synchronization
   $ make run

Sample Output
=============

.. code-block:: console

   threadA: Hello World!
   threadB: Hello World!
   threadA: Hello World!
   threadB: Hello World!
   threadA: Hello World!
   threadB: Hello World!
   threadA: Hello World!
   threadB: Hello World!
   threadA: Hello World!
   threadB: Hello World!

   <repeats endlessly>