OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [score/] [include/] [rtems/] [score/] [states.h] - Blame information for rev 585

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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: states.h,v 1.2 2001-09-27 11:59:32 chris Exp $
13
 */
14
 
15
#ifndef __RTEMS_STATES_h
16
#define __RTEMS_STATES_h
17
 
18
#ifdef __cplusplus
19
extern "C" {
20
#endif
21
 
22
/*
23
 *  The following type defines the control block used to manage a
24
 *  thread's state.
25
 */
26
 
27
typedef 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 */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.