From ca6724c16a360b6297d7827cfd0173441ccd95c2 Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 15 May 2001 00:03:38 +0000 Subject: Redefine ptid_t to be a struct rather than an int. --- gdb/sol-thread.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'gdb/sol-thread.c') diff --git a/gdb/sol-thread.c b/gdb/sol-thread.c index cf8f33c..f92c49e 100644 --- a/gdb/sol-thread.c +++ b/gdb/sol-thread.c @@ -111,14 +111,15 @@ static void init_sol_core_ops (void); /* Default definitions: These must be defined in tm.h if they are to be shared with a process module such as procfs. */ -#define THREAD_FLAG 0x80000000 -#define is_thread(ARG) (((ARG) & THREAD_FLAG) != 0) -#define is_lwp(ARG) (((ARG) & THREAD_FLAG) == 0) -#define GET_LWP(PID) TIDGET (PID) -#define GET_THREAD(PID) TIDGET (PID) -#define BUILD_LWP(TID, PID) MERGEPID (PID, TID) - -#define BUILD_THREAD(TID, PID) (MERGEPID (PID, TID) | THREAD_FLAG) +#define GET_PID(ptid) ptid_get_pid (ptid) +#define GET_LWP(ptid) ptid_get_lwp (ptid) +#define GET_THREAD(ptid) ptid_get_tid (ptid) + +#define is_lwp(ptid) (GET_LWP (ptid) != 0) +#define is_thread(ptid) (GET_THREAD (ptid) != 0) + +#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) +#define BUILD_THREAD(tid, pid) ptid_build (pid, 0, tid) /* Pointers to routines from lithread_db resolved by dlopen() */ -- cgit v1.1