Defines | |
| #define | MVAR_t char |
| #define | MVAR_BITS 8 |
| #define | MPTR_t long |
| #define | POSCFG_ALIGNMENT 2 |
| #define | POSCFG_ISR_INTERRUPTABLE 0 |
| #define | POSCFG_TASKSTACKTYPE 0 |
| #define | POSCFG_CALLINITARCH 1 |
| #define | POSCFG_DYNAMIC_MEMORY 0 |
| #define | POSCFG_DYNAMIC_REFILL 0 |
| #define | POS_MEM_ALLOC(bytes) nosMemAlloc(bytes) |
|
|
Integer variable type used for memory pointers. This define must be set to an integer type that has the same bit width like a memory pointer (e.g. void*) on the target architecture. On a 32bit architecture you would usually define this to long, for a 8 bit architecture short would be sufficient. |
|
|
Machine variable width. This define tells the Operating System how much bits can be stored in the machine variable type MVAR_t. Some compilers support the sizeof(MVAR_t)-macro at this position, but some others don't. For example, set this define to 8 (bits) if MVAR_t is defined to char. |
|
|
Machine variable type. This define is set to the variable type that best matches the target architecture. For example, define this to char if the architecture has 8 bit, or to int / long for a 32 bit architecture. Note that the variable must fit into a single memory cell of the target architecture. (For a 32 bit architecture you can define MVAR_t to char, short or int / long, whereas at a 8 bit architecure you can only define it to char). This define is responsible for the maximum count of tasks the operating system can manage. For example: char = 8 bit, 8 * 8 = 64 tasks; long = 32 bit, 32 * 32 = 1024 tasks. |
|
|
Define optional memory allocation function. If POSCFG_DYNAMIC_MEMORY is set to 1, this definition must be set to a memory allocation function such as "malloc". The memory allocation function may not be reentrant when POSCFG_DYNAMIC_REFILL is set to 0, since the multitasking system is not yet started when the function is called. |
|
|
Required memory alignment on the target CPU. To reach maximum speed, some architecures need correctly aligned memory patterns. Set this define to the memory alignment (in bytes) your architecture requires. Note that this value must be a power of 2. If your architecture does not require memory alignment, set this value to 0 or 1. |
|
|
Enable call to function p_pos_initArch. When this define is set to 1, the operating system will call the user supplied function p_pos_initArch to initialize the architecture specific portion of the operating system. |
|
|
Enable dynamic memory. If this define is set to 1, the memory for internal data structures is allocated dynamically at startup. The define POS_MEM_ALLOC must be set to a memory allocation function that shall be used. Otherwise, when this define is set to 0, the memory is allocated statically. |
|
|
Dynamic memory management. If this define is set to 1, the system will refill its volume of system structures for tasks, events, timers and messages when the user requests more structures than the amount that was preallocated (see defines POSCFG_MAX_TASKS, POSCFG_MAX_EVENTS, POSCFG_MAX_MESSAGES and POSCFG_MAX_TIMER ). To be able to use this feature, you must also set the define POSCFG_DYNAMIC_MEMORY to 1. But attention: The define POS_MEM_ALLOC must be set to a memory allocation function that is thread save. Please set the define POS_MEM_ALLOC to nosMemAlloc to use the nano layer memory allocator. |
|
|
Interruptable interrupt service routines. This define must be set to 1 (=enabled) when an interrupt service routine is interruptable on the machine. E.g. some PowerPCs support critical interrupts that can interrupt currently running noncritical interrupts. If your machine configuration does not support interruptable ISRs, you can set this define to 0 to save some execution time in ISRs. |
|
|
Set the mechanism of stack memory handling. There are three types of stack memory handling defined.
Type 0
Type 1
Type 2
|
1.4.6-NO