Mechanisms provided for application designer to statically initialize objects. More...
Mechanisms provided for application designer to statically initialize objects.
These mechanisms are provided, so that various structures are generated into application image. These replace need to call os routines manually. Currently it is possible to statically initialize processes and threads.
| #define OS_APPLICATION | ( | application | ) | CMRX_APPLICATION_INSTANCE_CONSTRUCTOR(application) |
Declare userspace process.
This will create userspace process entry in process table. Process is used to contain information on MPU configuration all threads bound to this process can use.
| #define OS_APPLICATION_MMIO_RANGE | ( | application, | |
| from, | |||
| to | |||
| ) |
Define the MMIO range accessible by the said application.
This macro allows to define a range of addresses accessible by the application code. Typical use is when user-space drivers are given access to certain address range where a peripheral resides.
| #define OS_APPLICATION_MMIO_RANGES | ( | application, | |
| from, | |||
| to, | |||
| from2, | |||
| to2 | |||
| ) |
Define two MMIO range accessible by the said application.
This macro allows to define a range of addresses accessible by the application code. Typical use is when user-space drivers are given access to certain address range where a peripheral resides.
This macro differs from OS_APPLICATION_MMIO_RANGE only by the fact that it allows to pass two ranges instead of one.
| #define OS_THREAD_CREATE | ( | application, | |
| entrypoint, | |||
| data, | |||
| priority, | |||
| core | |||
| ) | _OS_THREAD_CREATE(application, entrypoint, data, priority, core) |
Thread autostart facility.
Use this to automatically create thread upon kernel start. With this you don't need to call thread_create() explicitly. Kernel will create and initialize thread for you.
| application | name of process/application you want to bind your thread to. |
| entrypoint | entrypoint function name. This function will be given control once thread starts. |
| data | user-defined data passed to entrypoint function. |
| priority | thread priority of newly created thread |
| #define VTABLE CMRX_VTABLE_SPECIFIER |
Define structure to be a VTABLE definition.
CMRX only allows remote procedure calls to objects whose vtable pointers point to structures that are considered VTable definitions.
Mark every VTABLE structure instance with this macro to make it work for remote procedure calls.