Home

  Event Manager

The most general form of event synchronization offered by AMX utilizes event flags. Multiple groups with 16 (32) event flags per group can be created. The maximum number of groups is a configuration parameter. Event flags provide a convenient mechanism for separating tasks waiting for events from the tasks, timers and interrupts which can signal events. They also allow more than one task to simultaneously wait for a particular event. Tasks can wait for a particular combination of events or for any of a set of events to occur.

Each event group can be used to manage a set of 16 (32) events. Each event in the group has a boolean flag indicating if the event is true or false. Any of the event flags in a particular group can be set true or false (or combinations thereof) with a request to the AMX Event Manager.

A task can request the Event Manager to suspend its operation until a particular event combination in a group occurs. The task specifies which events in the group are of interest, the true or false condition of each of these events and whether it wishes to wait for an exact match on all of these events or is willing to resume execution if any of the specified events occurs. The task can optionally request that it be allowed to resume after a timeout interval if the particular event condition does not occur within the timeout interval.

Control of an event group is acquired by a call to the Event Manager in which the initial value of the event flags in the group is defined. Thereafter, tasks wishing to wait for an event usually reset specific flags in the group and then wait for them to be subsequently set.

An event can be triggered in some other task, Timer Procedure or Interrupt Service Procedure. All tasks, if any, which are waiting for the event are allowed to resume execution. Note that it is the highest priority task of all those which were waiting for the event which will resume first. Even then, the task will only be allowed to resume if it is of higher priority than the task which was executing at the time of the event signal.


Event Manager
Function Service
cjevcreate Create an event group
cjevdelete Delete an event group
cjevwait Wait for all / any of a set of events in an event group (optional timeout)
cjevwaits Read event(s) which satisfied the wait condition
cjevsignal Signal one or more events in an event group
cjevread Read current state of events in an event group
cjevstatus Fetch current status of an event group


Copyright © 1996-2007

















































RTOS
TCP/IP
Graphics
File System
License
Showcase
Targets
Toolsets
Memory
Timing
Manuals
Demos
Support
What's New
Press
Newsletters
White Papers
Tools
Alliances
Dealers
Contractors
Site Map
Company
Support
Home
FAQ
Get Info