RTEMS Logo

RTEMS 4.6.0pre5 On-Line Library


Signal Manager Establishing an ASR

PREV UP NEXT Bookshelf RTEMS C User's Guide

12.3.1: Establishing an ASR

The rtems_signal_catch directive establishes an ASR for the calling task. The address of the ASR and its execution mode are specified to this directive. The ASR's mode is distinct from the task's mode. For example, the task may allow preemption, while that task's ASR may have preemption disabled. Until a task calls rtems_signal_catch the first time, its ASR is invalid, and no signal sets can be sent to the task.

A task may invalidate its ASR and discard all pending signals by calling rtems_signal_catch with a value of NULL for the ASR's address. When a task's ASR is invalid, new signal sets sent to this task are discarded.

A task may disable ASR processing (RTEMS_NO_ASR) via the task_mode directive. When a task's ASR is disabled, the signals sent to it are left pending to be processed later when the ASR is enabled.

Any directive that can be called from a task can also be called from an ASR. A task is only allowed one active ASR. Thus, each call to rtems_signal_catch replaces the previous one.

Normally, signal processing is disabled for the ASR's execution mode, but if signal processing is enabled for the ASR, the ASR must be reentrant.


PREV UP NEXT Bookshelf RTEMS C User's Guide

Copyright © 1988-2003 OAR Corporation