RTEMS Logo

RTEMS 4.6.5 On-Line Library


Task Manager dis_dsp - Disable Dispatch

PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

1.4.7: dis_dsp - Disable Dispatch

CALLING SEQUENCE:

ER dis_dsp(void);

STATUS CODES:

E_OK - Normal Completion

E_CTX - Context error (issued from task-independent portions or issued after execution of loc_cpu)

DESCRIPTION:

This system call disables task dispatching. Dispatching will remain disabled after this call is issued until a subsequent call to ena_dsp is issued. The status of the issuing task will not be allowed to be changed to READY from the RUN. It cannot be changed into WAIT, either. However, since external interrupt is not disabled, interrupt handlers are allowed to run even when dispatching has been disabled. While an executing task may be preempted by an interrupt handler with dispatching disabled, there is no possibility that it will be preempted by another task.

The following operations occur during the time dispatching is disabled.

No error will result if a task already in dispatch disable state issues dis_dsp. It only keeps dispatch disabled state. No matter how many times dis_dsp has been issued, a single ena_dsp enables dispatching again. It is therefore for the user to determine what to do with nested pairs of dis_dsp and ena_dsp.

An E_CTX error will result if dis_dsp is issued when both interrupt and dispatching are disabled with loc_cpu. (For details, see the description of loc_cpu.)

NOTES:

A running task cannot enter DORMANT or NON-EXISTENT state while dispatching is disabled. An E_CTX error will result if an running task issues either ext_tsk or exd_tsk while interrupt and dispatching are disabled. Note however that since both ext_tsk and exd_tsk are system calls which do not return to their original contexts, error notification using return parameters of these system calls is not possible. If information on detected errors is required it should be left in a messagebuffer used as an error log.

Only if the system is not a multiprocessor configuration, system can take advantage of the dispatch disabled state for exclusive inter-task control.


PREV UP NEXT Bookshelf RTEMS ITRON 3.0 API User's Guide

Copyright © 1988-2004 OAR Corporation