zephyr/samples/nanokernel/test/test_context/src
Benjamin Walsh 0dcad8331b clarify use of term 'context'
The term 'context' is vague and overloaded. Its usage for 'an execution
context' is now referred as such, in both comments and some APIs' names.
When the execution context can only be a fiber or a task (i.e. not an
ISR), it is referred to as a 'thread', again in comments and everywhere
in the code.

APIs that had their names changed:

  - nano_context_id_t is now nano_thread_id_t
  - context_self_get() is now sys_thread_self_get()
  - context_type_get() is now sys_execution_context_type_get()
  - context_custom_data_set/get() are now
    sys_thread_custom_data_set/get()

The 'context' prefix namespace does not have to be reserved by the
kernel anymore.

The Context Control Structure (CCS) data structure is now the Thread
Control Structure (TCS):

  - struct ccs is now struct tcs
  - tCCS is now tTCS

Change-Id: I7526a76c5b01e7c86333078e2d2e77c9feef5364
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2016-02-05 20:15:27 -05:00
..
context.c clarify use of term 'context' 2016-02-05 20:15:27 -05:00
Makefile Move platforms to new arch/<arch>/platforms directory 2016-02-05 20:14:39 -05:00
README clarify use of term 'context' 2016-02-05 20:15:27 -05:00

APIs tested in this test set
============================

fiber_fiber_start
  - start a helper fiber to help with fiber_yield() tests

task_fiber_start
  - start a fiber to test fiber related functionality

fiber_yield
  - Called by a higher priority fiber when there is another fiber
  - Called by an equal priority fiber when there is another fiber
  - Called by a lower priority fiber when there is another fiber

sys_thread_self_get
  - Called from an ISR (interrupted a task)
  - Called from an ISR (interrupted a fiber)
  - Called from a task
  - Called from a fiber

sys_execution_context_type_get
  - Called from an ISR that interrupted a task
  - Called from an ISR that interrupted a fiber
  - Called from a task
  - Called from a fiber

nano_cpu_idle
  - CPU to be woken up by tick timer.  Thus, after each call, the tick count
    should have advanced by one tick.

irq_lock
  - 1. Count the number of calls to nano_tick_get_32() before a tick expires.
  - 2. Once determined, call nano_tick_get_32() many more times than that
       with interrupts locked.  Check that the tick count remains unchanged.

irq_unlock
  - Continuation irq_lock: unlock interrupts, loop and verify the tick
    count changes.

irq_connect
  - Used during nanokernel object initialization.  Verified when triggering
    an ISR to perform ISR context work.

nanoCpuExcConnect
  - Used during nanokernel object initialization.  Verified by triggering a
    divide-by-zero exception.  The handler skips us over the offending
    instruction.

irq_enable
irq_disable
  - Use these routines to disable and enable timer interrupts so that they can
    be tested in the same way as irq_lock() and irq_unlock().