Name
System Events -- Event dispatching facility.
Description
This facility allows for non related code to be informed of some events.
For an example look at: src/CPU/drawings/bars.c,
src/CPU/drawings/overlapped_bars.c or /src/CPU/drawings/state.c
Details
enum sys_event_t
typedef enum {
SYS_EVENT_PROC_CREATE=0, /* there is a new process */
SYS_EVENT_PROC_DESTROY, /* a process terminated */
SYS_EVENT_PROC_READY, /* a process is now ready to run */
SYS_EVENT_PROC_QUEUED, /* a process put in a ready queue */
SYS_EVENT_PROC_RUNNING, /* a process is now running */
SYS_EVENT_PROC_WAITING, /* a process is now blocked */
SYS_EVENT_PROC_SELECT, /* a process has been selected by
the user */
SYS_EVENT_FRAME_SELECT /* the user selected a memory frame */
}sys_event_t; |
system_event ()
Generate a system event of type type with argument data.
system_event_receive ()
void system_event_receive (sys_event_t type,
sys_event_callback func); |
Instruct the system events code to call func when ever an event of
type type ocurs.