source: rtems/cpukit/score/include/rtems/score/states.h @ 1a8fde6c

4.104.114.84.95
Last change on this file since 1a8fde6c was 1a8fde6c, checked in by Joel Sherrill <joel.sherrill@…>, on 03/06/96 at 21:34:57

Removed prototyes for static inline routines and moved the comments into
the inline implementation. The impetus for this was twofold. First,
it is incorrect to have static inline prototypes when using the macro
implementation. Second, this reduced the number of lines in the include
files seen by rtems.h by about 2000 lines.

Next we restricted visibility for the inline routines to inside the
executive itself EXCEPT for a handful of objects. This reduced the
number of include files included by rtems.h by 40 files and reduced
the lines in the include files seen by rtems.h by about 6000 lines.

In total, these reduced the compile time of the entire RTEMS tree by 20%.
This results in about 8 minutes savings on the SparcStation? 10 morgana.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*  states.h
2 *
3 *  This include file contains thread execution state information.
4 *
5 *  COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994.
6 *  On-Line Applications Research Corporation (OAR).
7 *  All rights assigned to U.S. Government, 1994.
8 *
9 *  This material may be reproduced by or for the U.S. Government pursuant
10 *  to the copyright license under the clause at DFARS 252.227-7013.  This
11 *  notice must appear in all copies of this file and its derivatives.
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                         0xffff /* all states */
36#define STATES_READY                           0x0000 /* ready to run */
37#define STATES_DORMANT                         0x0001 /* created not started */
38#define STATES_SUSPENDED                       0x0002 /* waiting for resume */
39#define STATES_TRANSIENT                       0x0004 /* thread in transition */
40#define STATES_DELAYING                        0x0008 /* wait for timeout */
41#define STATES_WAITING_FOR_TIME                0x0010 /* wait for TOD */
42#define STATES_WAITING_FOR_BUFFER              0x0020
43#define STATES_WAITING_FOR_SEGMENT             0x0040
44#define STATES_WAITING_FOR_MESSAGE             0x0080
45#define STATES_WAITING_FOR_EVENT               0x0100
46#define STATES_WAITING_FOR_SEMAPHORE           0x0200
47#define STATES_WAITING_FOR_MUTEX               0x0400
48#define STATES_WAITING_FOR_CONDITION_VARIABLE  0x0800
49#define STATES_WAITING_FOR_RPC_REPLY           0x1000
50#define STATES_WAITING_FOR_PERIOD              0x2000
51
52#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER             | \
53                                 STATES_WAITING_FOR_SEGMENT            | \
54                                 STATES_WAITING_FOR_MESSAGE            | \
55                                 STATES_WAITING_FOR_MUTEX              | \
56                                 STATES_WAITING_FOR_CONDITION_VARIABLE | \
57                                 STATES_WAITING_FOR_SEMAPHORE   )
58
59#define STATES_WAITING_ON_THREAD_QUEUE \
60                               ( STATES_LOCALLY_BLOCKED         | \
61                                 STATES_WAITING_FOR_RPC_REPLY   )
62
63#define STATES_BLOCKED         ( STATES_DELAYING                | \
64                                 STATES_WAITING_FOR_TIME        | \
65                                 STATES_WAITING_FOR_PERIOD      | \
66                                 STATES_WAITING_FOR_EVENT       | \
67                                 STATES_WAITING_ON_THREAD_QUEUE )
68
69#ifndef __RTEMS_APPLICATION__
70#include <rtems/score/states.inl>
71#endif
72
73#ifdef __cplusplus
74}
75#endif
76
77#endif
78/* end of include file */
Note: See TracBrowser for help on using the repository browser.