Deleted Added
full compact
1/*
2 * Copyright (c) 2004 David Xu <davidxu@freebsd.org>
3 * Copyright (c) 2004 Marcel Moolenaar
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 *
10 * 1. Redistributions of source code must retain the above copyright

--- 8 unchanged lines hidden (view full) ---

19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
26 * $FreeBSD: head/lib/libthread_db/thread_db.h 132332 2004-07-18 04:17:15Z marcel $
27 * $FreeBSD: head/lib/libthread_db/thread_db.h 132360 2004-07-18 19:29:38Z marcel $
28 */
29
30#ifndef _THREAD_DB_H_
31#define _THREAD_DB_H_
32
33#include <sys/procfs.h>
34#include <pthread.h>
35

--- 31 unchanged lines hidden (view full) ---

67} td_thrhandle_t; /* Used non-opaguely. */
68
69/*
70 * Events.
71 */
72
73typedef enum {
74 TD_EVENT_NONE = 0,
74 TD_CREATE = 0x0001,
75 TD_DEATH = 0x0002,
75 TD_CATCHSIG = 0x0001,
76 TD_CONCURRENCY= 0x0002,
77 TD_CREATE = 0x0004,
78 TD_DEATH = 0x0008,
79 TD_IDLE = 0x0010,
80 TD_LOCK_TRY = 0x0020,
81 TD_PREEMPT = 0x0040,
82 TD_PRI_INHERIT= 0x0080,
83 TD_READY = 0x0100,
84 TD_REAP = 0x0200,
85 TD_SLEEP = 0x0400,
86 TD_SWITCHFROM = 0x0800,
87 TD_SWITCHTO = 0x1000,
88 TD_TIMEOUT = 0x2000,
89 TD_ALL_EVENTS = ~0
90} td_thr_events_e;
91
92/* Compatibility with Linux. */
93#define td_event_e td_thr_events_e
94
95typedef struct {
96 td_thr_events_e event;
97 const td_thrhandle_t *th_p;
98 uintptr_t data;
99} td_event_msg_t;
100
101typedef unsigned int td_thr_events_t;
102
90/* XXX can't be it... */
103typedef enum {
104 NOTIFY_BPT, /* User inserted breakpoint. */
105 NOTIFY_AUTOBPT, /* Automatic breakpoint. */
106 NOTIFY_SYSCALL /* Invocation of system call. */
107} td_notify_e;
108
109typedef struct {
110 td_notify_e type;
111 union {
112 psaddr_t bptaddr;
113 int syscallno;
114 } u;
115} td_notify_t;
116
117static __inline void
118td_event_addset(td_thr_events_t *es, td_thr_events_e e)
119{
120 *es |= e;
121}

--- 44 unchanged lines hidden (view full) ---

166} td_thr_state_e;
167
168typedef enum
169{
170 TD_THR_SYSTEM = 1,
171 TD_THR_USER
172} td_thr_type_e;
173
154typedef int thread_key_t;
174typedef pthread_key_t thread_key_t;
175
156#if 0
157typedef struct td_thrinfo_t {
158 unsigned int ti_user_flags;
159 psaddr_t ti_pc;
160 psaddr_t ti_sp;
161 short ti_flags;
162 uchar_t ti_preemptflag;
163 uchar_t ti_pirecflag;
164};
165#endif
166
176typedef struct {
177 const td_thragent_t *ti_ta_p;
178 thread_t ti_tid;
179 td_thr_state_e ti_state;
180 td_thr_type_e ti_type;
181 td_thr_events_t ti_events;
182 int ti_pri;
183 lwpid_t ti_lid;

--- 56 unchanged lines hidden ---