source: rtems/cpukit/score/include/rtems/score/states.h @ a85d8ec

4.104.114.84.95
Last change on this file since a85d8ec was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/*  states.h
2 *
3 *  This include file contains thread execution state information.
4 *
5 *  COPYRIGHT (c) 1989-1999.
6 *  On-Line Applications Research Corporation (OAR).
7 *
8 *  The license and distribution terms for this file may be
9 *  found in the file LICENSE in this distribution or at
10 *  http://www.OARcorp.com/rtems/license.html.
11 *
12 *  $Id$
13 */
14
15#ifndef __RTEMS_STATES_h
16#define __RTEMS_STATES_h
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/*
23 *  The following type defines the control block used to manage a
24 *  thread's state.
25 */
26
27typedef unsigned32 States_Control;
28
29/*
30 *  The following constants define the individual states which may be
31 *  be used to compose and manipulate a thread's state.
32 */
33
34#define STATES_ALL_SET                         0xfffff /* all states */
35#define STATES_READY                           0x00000 /* ready to run */
36#define STATES_DORMANT                         0x00001 /* created not started */
37#define STATES_SUSPENDED                       0x00002 /* waiting for resume */
38#define STATES_TRANSIENT                       0x00004 /* in transition */
39#define STATES_DELAYING                        0x00008 /* wait for timeout */
40#define STATES_WAITING_FOR_TIME                0x00010 /* wait for TOD */
41#define STATES_WAITING_FOR_BUFFER              0x00020
42#define STATES_WAITING_FOR_SEGMENT             0x00040
43#define STATES_WAITING_FOR_MESSAGE             0x00080
44#define STATES_WAITING_FOR_EVENT               0x00100
45#define STATES_WAITING_FOR_SEMAPHORE           0x00200
46#define STATES_WAITING_FOR_MUTEX               0x00400
47#define STATES_WAITING_FOR_CONDITION_VARIABLE  0x00800
48#define STATES_WAITING_FOR_JOIN_AT_EXIT        0x01000
49#define STATES_WAITING_FOR_RPC_REPLY           0x02000
50#define STATES_WAITING_FOR_PERIOD              0x04000
51#define STATES_WAITING_FOR_SIGNAL              0x08000
52#define STATES_INTERRUPTIBLE_BY_SIGNAL         0x10000
53
54#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER             | \
55                                 STATES_WAITING_FOR_SEGMENT            | \
56                                 STATES_WAITING_FOR_MESSAGE            | \
57                                 STATES_WAITING_FOR_SEMAPHORE          | \
58                                 STATES_WAITING_FOR_MUTEX              | \
59                                 STATES_WAITING_FOR_CONDITION_VARIABLE | \
60                                 STATES_WAITING_FOR_JOIN_AT_EXIT       | \
61                                 STATES_WAITING_FOR_SIGNAL             )
62
63#define STATES_WAITING_ON_THREAD_QUEUE \
64                               ( STATES_LOCALLY_BLOCKED         | \
65                                 STATES_WAITING_FOR_RPC_REPLY   )
66
67#define STATES_BLOCKED         ( STATES_DELAYING                | \
68                                 STATES_WAITING_FOR_TIME        | \
69                                 STATES_WAITING_FOR_PERIOD      | \
70                                 STATES_WAITING_FOR_EVENT       | \
71                                 STATES_WAITING_ON_THREAD_QUEUE | \
72                                 STATES_INTERRUPTIBLE_BY_SIGNAL )
73
74#ifndef __RTEMS_APPLICATION__
75#include <rtems/score/states.inl>
76#endif
77
78#ifdef __cplusplus
79}
80#endif
81
82#endif
83/* end of include file */
Note: See TracBrowser for help on using the repository browser.