Application Tasks
K
A
DAK
33
The simple features included in the AMX kernel are augmented by three powerful
mechanisms for event synchronization provided by separate AMX managers.
The Semaphore Manager provides counting semaphores with queuing and timeout
facilities for mutual exclusion and resource management. It also offers a unique resource
semaphore which extends to semaphores the concept of ownership of the corresponding
resource.
The Event Manager offers the best solution for complex event coordination. It permits a
task to be synchronized to any or all of a particular set of events. It also allows more than
one task to wait for the same events.
The Message Exchange Manager allows a task to be synchronized to another task using
its call and wait message passing facilities. It allows one or more tasks to wait at a
message exchange for the arrival of a message. Tasks, ISPs and Timer Procedures can
send messages to the message exchange using the AMX ajmxsnd call. The receiving
task must use the AMX procedure ajmxwat to wait for a message at the message
exchange.
Each of the synchronization methods provided by the managers share several common
features. In each case, the signaller does not need to know the identity of task(s) waiting
for its signal. When multiple tasks wait on a semaphore, event group or message
exchange, each task specifies the priority at which it wishes to wait. Finally, any task
waiting on a semaphore, event group or message exchange can specify the maximum
interval which the task is willing to wait.