Xenomai 3.3.2
Loading...
Searching...
No Matches
thread.h
1/*
2 * Copyright (C) 2013 Philippe Gerum <rpm@xenomai.org>.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
17 */
18#ifndef _COBALT_UAPI_KERNEL_THREAD_H
19#define _COBALT_UAPI_KERNEL_THREAD_H
20
21#include <cobalt/uapi/kernel/types.h>
22
30/* State flags (shared) */
31
32#define XNSUSP 0x00000001
33#define XNPEND 0x00000002
34#define XNDELAY 0x00000004
35#define XNREADY 0x00000008
36#define XNDORMANT 0x00000010
37#define XNZOMBIE 0x00000020
38#define XNMAPPED 0x00000040
39#define XNRELAX 0x00000080
40#define XNHELD 0x00000200
41#define XNBOOST 0x00000400
42#define XNSSTEP 0x00000800
43#define XNLOCK 0x00001000
44#define XNRRB 0x00002000
45#define XNWARN 0x00004000
46#define XNFPU 0x00008000
47#define XNROOT 0x00010000
48#define XNWEAK 0x00020000
49#define XNUSER 0x00040000
50#define XNJOINED 0x00080000
51#define XNTRAPLB 0x00100000
52#define XNDEBUG 0x00200000
53#define XNDBGSTOP 0x00400000
64/* Information flags (shared) */
65
66#define XNTIMEO 0x00000001
67#define XNRMID 0x00000002
68#define XNBREAK 0x00000004
69#define XNKICKED 0x00000008
70#define XNWAKEN 0x00000010
71#define XNROBBED 0x00000020
72#define XNCANCELD 0x00000040
73#define XNPIALERT 0x00000080
74#define XNSCHEDP 0x00000100
75#define XNCONTHI 0x00000200
77/* Local information flags (private to current thread) */
78
79#define XNMOVED 0x00000001
80#define XNLBALERT 0x00000002
81#define XNDESCENT 0x00000004
82#define XNSYSRST 0x00000008
83#define XNHICCUP 0x00000010
87/*
88 * Must follow strictly the declaration order of the state flags
89 * defined above. Status symbols are defined as follows:
90 *
91 * 'S' -> Forcibly suspended.
92 * 'w'/'W' -> Waiting for a resource, with or without timeout.
93 * 'D' -> Delayed (without any other wait condition).
94 * 'R' -> Runnable.
95 * 'U' -> Unstarted or dormant.
96 * 'X' -> Relaxed shadow.
97 * 'H' -> Held in emergency.
98 * 'b' -> Priority boost undergoing.
99 * 'T' -> Ptraced and stopped.
100 * 'l' -> Locks scheduler.
101 * 'r' -> Undergoes round-robin.
102 * 't' -> Runtime mode errors notified.
103 * 'L' -> Lock breaks trapped.
104 * 's' -> Ptraced, stopped synchronously.
105 */
106#define XNTHREAD_STATE_LABELS "SWDRU..X.HbTlrt.....L.s"
107
108struct xnthread_user_window {
109 __u32 state;
110 __u32 info;
111 __u32 grant_value;
112 __u32 pp_pending;
113};
114
115#endif /* !_COBALT_UAPI_KERNEL_THREAD_H */