summaryrefslogtreecommitdiff
path: root/gdb/lin-lwp.c
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2001-05-15 00:03:38 +0000
committerKevin Buettner <kevinb@redhat.com>2001-05-15 00:03:38 +0000
commit11bc5832a9da5c23b3df59251c230c5bcce21f2f (patch)
tree50f0f065461a8b7af6dd698436b44c709296173d /gdb/lin-lwp.c
parent2e9e5ed6071269ff915c1caa9a9735849fd7c15b (diff)
downloadgdb-11bc5832a9da5c23b3df59251c230c5bcce21f2f.tar.gz
Redefine ptid_t to be a struct rather than an int.
Diffstat (limited to 'gdb/lin-lwp.c')
-rw-r--r--gdb/lin-lwp.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c
index 055ace70852..650333109d5 100644
--- a/gdb/lin-lwp.c
+++ b/gdb/lin-lwp.c
@@ -102,18 +102,10 @@ static int num_lwps;
static int threaded;
-#ifndef TIDGET
-#define TIDGET(PID) (((PID) & 0x7fffffff) >> 16)
-#define PIDGET0(PID) (((PID) & 0xffff))
-#define PIDGET(PID) ((PIDGET0 (PID) == 0xffff) ? -1 : PIDGET0 (PID))
-#define MERGEPID(PID, TID) (((PID) & 0xffff) | ((TID) << 16))
-#endif
-
-#define THREAD_FLAG 0x80000000
-#define is_lwp(pid) (((pid) & THREAD_FLAG) == 0 && TIDGET (pid))
-#define GET_LWP(pid) TIDGET (pid)
-#define GET_PID(pid) PIDGET (pid)
-#define BUILD_LWP(tid, pid) MERGEPID (pid, tid)
+#define GET_LWP(ptid) ptid_get_lwp (ptid)
+#define GET_PID(ptid) ptid_get_pid (ptid)
+#define is_lwp(ptid) (GET_LWP (ptid) != 0)
+#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0)
#define is_cloned(pid) (GET_LWP (pid) != GET_PID (pid))