Difference between revisions of "MC-Basic:COMMON SHARED ... AS SEMAPHORE"
m (Text replace - "declaration is possible from the Library context also ." to "declaration is also possible from the Library context.") |
m |
||
Line 8: | Line 8: | ||
|AVAILABILITY= | |AVAILABILITY= | ||
All Versions<br> | All Versions<br> | ||
− | Arrays of | + | Arrays of semaphores are available since version 4.9.7. |
|DESCRIPTION= | |DESCRIPTION= | ||
− | Defines new semaphore | + | Defines new semaphore variables in the system. There are only two function for accessing this variable type: SEMTAKE and SEMGIVE. No other operations (e.g., printing, arguments) are allowed with this data type. |
|TYPE= | |TYPE= | ||
Line 35: | Line 35: | ||
|EXAMPLE= | |EXAMPLE= | ||
-->common shared sem as semaphore<br> | -->common shared sem as semaphore<br> | ||
− | |||
-->?semtake(sem)<br> | -->?semtake(sem)<br> | ||
− | |||
1<br> | 1<br> | ||
− | |||
-->semgive(sem)<br> | -->semgive(sem)<br> | ||
− | |||
--> | --> | ||
Revision as of 12:17, 20 March 2014
Defines new semaphore variables in the system. There are only two function for accessing this variable type: SEMTAKE and SEMGIVE. No other operations (e.g., printing, arguments) are allowed with this data type.
Syntax
COMMON SHARED <semaphore name> AS SEMAPHORE
Availability
All Versions
Arrays of semaphores are available since version 4.9.7.
Scope
Configuration, Task, Terminal
Since AMCS 0.4.5.17 version the global (common shared ) declaration is also possible from the Library context.
Examples
-->common shared sem as semaphore
-->?semtake(sem)
1
-->semgive(sem)
-->