RTEMS 6.3
Loading...
Searching...
No Matches
spec:/rtems/userext/val/userext

Tests the thread user extensions. More...

Files

file  testsuites/validation/tc-userext.c

Data Structures

struct  ExtensionEvent

Macros

#define DEFINE_EXTENSIONS(index, linkage)
#define DEFINE_EXTENSIONS_AND_TABLE(index)

Enumerations

enum  ExtensionKind {
  THREAD_BEGIN , THREAD_CREATE , THREAD_DELETE , THREAD_EXITTED ,
  THREAD_RESTART , THREAD_START , THREAD_SWITCH , THREAD_TERMINATE ,
  EXTENSION_KIND_COUNT
}

Functions

 DEFINE_EXTENSIONS_AND_TABLE (2)
 DEFINE_EXTENSIONS_AND_TABLE (3)
 DEFINE_EXTENSIONS_AND_TABLE (4)
 DEFINE_EXTENSIONS_AND_TABLE (5)
 DEFINE_EXTENSIONS_AND_TABLE (6)
void * IdleBody (uintptr_t arg)
 T_TEST_CASE_FIXTURE (RtemsUserextValUserext, &RtemsUserextValUserext_Fixture)

Detailed Description

Tests the thread user extensions.

This test case performs the following actions:

  • Create five dynamic extensions. Switch to a started thread. Delete three dynamic extension during the thread begin invocation. Clean up the used resources.
    • Check that the thread switch extensions were invoked in the right order before the thread begin extensions.
    • Check that the thread begin extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread begin extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Create a thread. Delete three dynamic extension during the thread create invocation. Clean up the used resources.
    • Check that the thread create extensions were invoked in the right order.
    • Check that the thread create extensions were invoked under protection of the allocator mutex.
    • Check that the other extensions were not invoked.
    • Check that the thread create extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Delete a thread. Delete three dynamic extension during the thread delete invocation. Clean up the used resources.
    • Check that the thread delete extensions were invoked in the right order.
    • Check that the thread delete extensions were invoked under protection of the allocator mutex.
    • Check that the other extensions were not invoked.
    • Check that the thread delete extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Return from a thread entry. Delete three dynamic extension during the thread exitted invocation. Clean up the used resources.
    • Check that the thread exitted extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread exitted extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Restart a thread. Delete three dynamic extension during the thread restart invocation. Clean up the used resources.
    • Check that the thread restart extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread restart extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Start a thread. Delete three dynamic extension during the thread start invocation. Clean up the used resources.
    • Check that the thread start extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread start extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Terminate a thread. Delete three dynamic extension during the thread terminate invocation. Clean up the used resources.
    • Check that the thread terminate extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread terminate extension of the extension set deleted before its turn in the invocation was not invoked.
  • Create five dynamic extensions. Let an idle thread return from its entry. Delete three dynamic extension during the thread exitted invocation. Clean up the used resources.
    • Check that the thread exitted extensions were invoked in the right order.
    • Check that the other extensions were not invoked.
    • Check that the thread exitted extension of the extension set deleted before its turn in the invocation was not invoked.

Macro Definition Documentation

◆ DEFINE_EXTENSIONS_AND_TABLE

#define DEFINE_EXTENSIONS_AND_TABLE ( index)
Value:
DEFINE_EXTENSIONS( index, static ) \
static const rtems_extensions_table table_##index = { \
.thread_begin = ThreadBeginExtension##index, \
.thread_create = ThreadCreateExtension##index, \
.thread_delete = ThreadDeleteExtension##index, \
.thread_exitted = ThreadExittedExtension##index, \
.thread_restart = ThreadRestartExtension##index, \
.thread_start = ThreadStartExtension##index, \
.thread_switch = ThreadSwitchExtension##index, \
.thread_terminate = ThreadTerminateExtension##index \
}
User_extensions_Table rtems_extensions_table
The extensions table contains a set of extensions which may be registered in the system through the C...
Definition extension.h:238