source: rtems/c/src/exec/score/headers/states.h @ bf4cdb70

4.104.114.84.95
Last change on this file since bf4cdb70 was 60b791ad, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 23:46:28

updated copyright to 1998

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