Remove definition of EM_MIPS_RS4_BE. The constant was never in active use
[deliverable/binutils-gdb.git] / gdb / lin-lwp.c
index df62901a99e2cc81416f8a8ff747bd6141c5a78a..2d2a2b6d9f579c6e96515f8a0a2ca40296b5cc5d 100644 (file)
@@ -102,18 +102,10 @@ static int num_lwps;
 static int threaded;
 \f
 
-#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))
 
@@ -367,7 +359,7 @@ detach_callback (struct lwp_info *lp, void *data)
   gdb_assert (lp->status == 0 || WIFSTOPPED (lp->status));
 
   if (debug_lin_lwp && lp->status)
-    fprintf_unfiltered (gdb_stdlog, "Pending %s for LWP %d on detach.\n",
+    fprintf_unfiltered (gdb_stdlog, "Pending %s for LWP %ld on detach.\n",
                        strsignal (WSTOPSIG (lp->status)), GET_LWP (lp->ptid));
 
   while (lp->signalled && lp->stopped)
@@ -684,8 +676,8 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
        {
          if (debug_lin_lwp)
            fprintf_unfiltered (gdb_stdlog, 
-                               "Using pending wait status for LWP %d.\n",
-                               (int) GET_LWP (lp->ptid));
+                               "Using pending wait status for LWP %ld.\n",
+                               GET_LWP (lp->ptid));
 
          status = lp->status;
          lp->status = 0;
@@ -700,7 +692,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
     {
       if (debug_lin_lwp)
        fprintf_unfiltered (gdb_stdlog, 
-                           "Waiting for specific LWP %d.\n",
+                           "Waiting for specific LWP %ld.\n",
                            GET_LWP (ptid));
 
       /* We have a specific LWP to check.  */
@@ -712,7 +704,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus)
       if (debug_lin_lwp)
        if (status)
          fprintf_unfiltered (gdb_stdlog, 
-                             "Using pending wait status for LWP %d.\n",
+                             "Using pending wait status for LWP %ld.\n",
                              GET_LWP (lp->ptid));
 
       /* If we have to wait, take into account whether PID is a cloned
This page took 0.027006 seconds and 4 git commands to generate.