diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-15 00:03:38 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-15 00:03:38 +0000 |
commit | ca6724c16a360b6297d7827cfd0173441ccd95c2 (patch) | |
tree | 3e1e58042a222bbe8532507bb67f404be5c9e80f /gdb/thread-db.c | |
parent | 67a659f60e569d0938cb8ce51489514bcf0d4cca (diff) | |
download | fsf-binutils-gdb-ca6724c16a360b6297d7827cfd0173441ccd95c2.zip fsf-binutils-gdb-ca6724c16a360b6297d7827cfd0173441ccd95c2.tar.gz fsf-binutils-gdb-ca6724c16a360b6297d7827cfd0173441ccd95c2.tar.bz2 |
Redefine ptid_t to be a struct rather than an int.
Diffstat (limited to 'gdb/thread-db.c')
-rw-r--r-- | gdb/thread-db.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/gdb/thread-db.c b/gdb/thread-db.c index 2c2672a..a54f9fb 100644 --- a/gdb/thread-db.c +++ b/gdb/thread-db.c @@ -123,24 +123,17 @@ static void thread_db_find_new_threads (void); /* Building process ids. */ -#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 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(pid) (((pid) & THREAD_FLAG) == 0 && TIDGET (pid)) -#define is_thread(pid) ((pid) & THREAD_FLAG) +#define is_lwp(ptid) (GET_LWP (ptid) != 0) +#define is_thread(ptid) (GET_THREAD (ptid) != 0) -#define GET_PID(pid) PIDGET (pid) -#define GET_LWP(pid) TIDGET (pid) -#define GET_THREAD(pid) TIDGET (pid) +#define BUILD_LWP(lwp, pid) ptid_build (pid, lwp, 0) +#define BUILD_THREAD(tid, pid) ptid_build (pid, 0, tid) -#define BUILD_LWP(tid, pid) MERGEPID (pid, tid) -#define BUILD_THREAD(tid, pid) (MERGEPID (pid, tid) | THREAD_FLAG) struct private_thread_info |