Everything
19.8 Semaphore Information (semaphore[])
Here, each semaphore is defined.
Format
Parentheses < >show the user input part.
 semaphore[ <1. ID number> ] {
     name          = <2. ID name (name)>;
     max_count     = <3. Maximum resource count (max_count)>;
     initial_count = <4. Initial resource count (initial_count)>;
     wait_queue    = <5. Wait queue attribute (wait_queue)>;
 };

1 ) ID number
- Description
Define the semaphore ID number.
- Definition format
Numeric value
- Definition range
From 1 to 255
- When omitting
The cfg600 assigns the ID number automatically.
- Note
The ID numbers must be assigned without an omission beginning with 1. Therefore, when specifying an ID number, be sure that the specified value is equal to or less than the number of objects defined.
2 ) ID name (name)
- Description
Define the ID name. The specified ID name is output to the system information header file (kernel_id.h) in the form of the following.
 #define   <ID name>   <ID number>
- Definition format
Symbol
- Definition range
-
- When omitting
Cannot be omitted.
3 ) Maximum resource count (max_count)
- Description
Define the maximum resource count
- Definition format
Numeric value
- Definition range
From 1 to 65535
- When omitting
The set value in the default system configuration file (factory setting: 1) applied.
4 ) Initial resource count (initial_count)
- Description
Define the initial resource count.
- Definition format
Numeric value
- Definition range
From 0 to max_count
- When omitting
The set value in the default system configuration file (factory setting: 1) applied.
5 ) Wait queue attribute (wait_queue)
- Description
Define the wait queue attribute.
- Definition format
Symbol
- Definition range
Select either of the following:
TA_TFIFO: FIFO order
TA_TPRI: Task priority order
Among tasks with the same priority, they are queued in FIFO order.
- When omitting
The set value in the default system configuration file (factory setting: TA_TFIFO) applied.