User Tools

Site Tools


releases:3.2.1:developersguide:sef

The System Event Framework (SEF)

Stale page

The contents of this page must be revised to reflect the current state of MINIX3.

Introduction

This is a stub for the System Event Framework (SEF), a component of the system library that deals with system events in a centralized and convenient way.

As of now, the framework has 2 entry points declared in <minix/sef.h> and defined in lib/syslib/sef.c:

_PROTOTYPE( void sef_startup, (void) );
_PROTOTYPE( int sef_receive, (endpoint_t src, message *m_ptr) );

Every system service (server or device driver) must call sef_startup() at startup time to handle initialization and sef_receive() when receiving a message. The developer can register callbacks to provide handlers for each particular type of event. When no callback is registered for one particular event, the default behavior is assumed (read the default callback is called). The developer can also reuse some predefined callback implementations provided by SEF for each particular event type.

Ideally, all the cross-cutting concerns should be integrated into SEF. The SEF framework is, however, still WIP. So far, the following event types have been integrated into SEF:

  • Initialization: triggered by initialization messages sent by the Reincarnation Server when a service is started. The API and the predefined callback implementations are declared in <minix/sef.h> and defined in lib/syslib/sef_init.c.
  • Ping: triggered by keep-a-live messages sent by the Reincarnation Server periodically to check the status of a system service. The API and the predefined callback implementations are declared in <minix/sef.h> and defined in lib/syslib/sef_ping.c.
  • Live update: triggered by live update messages sent by the Reincarnation Server when an update is available for a particular system service. The API and the predefined callback implementations are declared in <minix/sef.h> and defined in lib/syslib/sef_liveupdate.c.

Feedback

Questions / Comments / Interested in getting involved? Let us know.

releases/3.2.1/developersguide/sef.txt · Last modified: 2014/11/11 14:52 (external edit)