for (i = 0; i < nlwps; i++)
     {
-      ptid_t ptid = ptid_t (pid, lwps[i], 0);
+      ptid_t ptid = ptid_t (pid, lwps[i]);
 
       if (!in_thread_list (target, ptid))
        {
          if (ptrace (PT_LWPINFO, pid, (caddr_t) &pl, sizeof pl) == -1)
            perror_with_name (("ptrace"));
 
-         wptid = ptid_t (pid, pl.pl_lwpid, 0);
+         wptid = ptid_t (pid, pl.pl_lwpid);
 
          if (debug_fbsd_nat)
            {
                    perror_with_name (("ptrace"));
 
                  gdb_assert (pl.pl_flags & PL_FLAG_CHILD);
-                 child_ptid = ptid_t (child, pl.pl_lwpid, 0);
+                 child_ptid = ptid_t (child, pl.pl_lwpid);
                }
 
              /* Enable additional events on the child process.  */
 
 struct fork_info
 {
   explicit fork_info (pid_t pid)
-    : ptid (pid, pid, 0)
+    : ptid (pid, pid)
   {
   }
 
 
   else
     lwp = ptid.pid ();
 
-  dummy.ptid = ptid_t (0, lwp, 0);
+  dummy.ptid = ptid_t (0, lwp);
   lp = (struct lwp_info *) htab_find (lwp_lwpid_htab, &dummy);
   return lp;
 }
   /* The ptrace base target adds the main thread with (pid,0,0)
      format.  Decorate it with lwp info.  */
   ptid = ptid_t (inferior_ptid.pid (),
-                inferior_ptid.pid (),
-                0);
+                inferior_ptid.pid ());
   thread_change_ptid (linux_target, inferior_ptid, ptid);
 
   /* Add the initial process as the first LWP to the list.  */
                            _("wait returned unexpected status 0x%x"), status);
        }
 
-      ourstatus->value.related_pid = ptid_t (new_pid, new_pid, 0);
+      ourstatus->value.related_pid = ptid_t (new_pid, new_pid);
 
       if (event == PTRACE_EVENT_FORK || event == PTRACE_EVENT_VFORK)
        {
 
          /* This won't actually modify the breakpoint list, but will
             physically remove the breakpoints from the child.  */
-         detach_breakpoints (ptid_t (new_pid, new_pid, 0));
+         detach_breakpoints (ptid_t (new_pid, new_pid));
 
          /* Retain child fork in ptrace (stopped) state.  */
          if (!find_fork_pid (new_pid))
          linux_nat_debug_printf
            ("Got clone event from LWP %d, new child is LWP %ld", pid, new_pid);
 
-         new_lp = add_lwp (ptid_t (lp->ptid.pid (), new_pid, 0));
+         new_lp = add_lwp (ptid_t (lp->ptid.pid (), new_pid));
          new_lp->stopped = 1;
          new_lp->resumed = 1;
 
       /* A multi-thread exec after we had seen the leader exiting.  */
       linux_nat_debug_printf ("Re-adding thread group leader LWP %d.", lwpid);
 
-      lp = add_lwp (ptid_t (lwpid, lwpid, 0));
+      lp = add_lwp (ptid_t (lwpid, lwpid));
       lp->stopped = 1;
       lp->resumed = 1;
       add_thread (linux_target, lp->ptid);
   int pid = inferior_ptid.pid ();
   std::vector<static_tracepoint_marker> markers;
   const char *p = s;
-  ptid_t ptid = ptid_t (pid, 0, 0);
+  ptid_t ptid = ptid_t (pid, 0);
   static_tracepoint_marker marker;
 
   /* Pause all */
 
      calls are made, we just assume they were; future changes
      to how GDB accesses TLS could result in this passing
      without exercising the calls it's supposed to.  */
-  ptid_t ptid = ptid_t (tdb_testinfo->info->pid, ti.ti_lid, 0);
+  ptid_t ptid = ptid_t (tdb_testinfo->info->pid, ti.ti_lid);
   thread_info *thread_info = find_thread_ptid (linux_target, ptid);
   if (thread_info != NULL && thread_info->priv != NULL)
     {
 thread_db_target::get_ada_task_ptid (long lwp, long thread)
 {
   /* NPTL uses a 1:1 model, so the LWP id suffices.  */
-  return ptid_t (inferior_ptid.pid (), lwp, 0);
+  return ptid_t (inferior_ptid.pid (), lwp);
 }
 
 void
 
 
          sscanf (dp->d_name, "%lld", &tid);
          core = linux_common_core_of_thread (ptid_t ((pid_t) pid,
-                                                     (pid_t) tid, 0));
+                                                     (pid_t) tid));
 
          if (core >= 0 && core < num_cores)
            {
                        continue;
 
                      tid = atoi (dp2->d_name);
-                     core = linux_common_core_of_thread (ptid_t (pid, tid, 0));
+                     core = linux_common_core_of_thread (ptid_t (pid, tid));
 
                      buffer_xml_printf
                        (buffer,
 
          lwp = strtoul (dp->d_name, NULL, 10);
          if (lwp != 0)
            {
-             ptid_t ptid = ptid_t (pid, lwp, 0);
+             ptid_t ptid = ptid_t (pid, lwp);
 
              if (attach_lwp (ptid))
                new_threads_found = 1;
 
     return ptid;
 
   base_cpu = get_thread_base_cpu (ptid);
-  return ptid_t (ptid.pid (), base_cpu, 0);
+  return ptid_t (ptid.pid (), base_cpu);
 }
 
 /* Fetch the ravenscar running thread from target memory, make sure
 
       pp = unpack_varlen_hex (p + 1, &tid);
       if (obuf)
        *obuf = pp;
-      return ptid_t (pid, tid, 0);
+      return ptid_t (pid, tid);
     }
 
   /* No multi-process.  Just a tid.  */
 
   if (obuf)
     *obuf = pp;
-  return ptid_t (pid, tid, 0);
+  return ptid_t (pid, tid);
 }
 
 static int
 ptid_t
 remote_target::get_ada_task_ptid (long lwp, long thread)
 {
-  return ptid_t (inferior_ptid.pid (), lwp, 0);
+  return ptid_t (inferior_ptid.pid (), lwp);
 }
 \f
 
       ptid_t nptid;
 
       /* All (-1) threads of process.  */
-      nptid = ptid_t (ptid.pid (), -1, 0);
+      nptid = ptid_t (ptid.pid (), -1);
 
       p += xsnprintf (p, endp - p, ":");
       p = write_ptid (p, endp, nptid);
 
       if (ptid.is_pid ())
          /* All (-1) threads of process.  */
-       nptid = ptid_t (ptid.pid (), -1, 0);
+       nptid = ptid_t (ptid.pid (), -1);
       else
        {
          /* Small optimization: if we already have a stop reply for
 
          struct lwp_info *child_lwp;
          struct thread_info *child_thr;
 
-         ptid = ptid_t (new_pid, new_pid, 0);
+         ptid = ptid_t (new_pid, new_pid);
 
          if (debug_threads)
            {
                      "from LWP %ld, new child is LWP %ld\n",
                      lwpid_of (event_thr), new_pid);
 
-      ptid = ptid_t (pid_of (event_thr), new_pid, 0);
+      ptid = ptid_t (pid_of (event_thr), new_pid);
       new_lwp = add_lwp (ptid);
 
       /* Either we're going to immediately resume the new thread
 
   add_linux_process (pid, 0);
 
-  ptid = ptid_t (pid, pid, 0);
+  ptid = ptid_t (pid, pid);
   new_lwp = add_lwp (ptid);
   new_lwp->must_set_ptrace_flags = 1;
 
 {
   struct process_info *proc;
   struct thread_info *initial_thread;
-  ptid_t ptid = ptid_t (pid, pid, 0);
+  ptid_t ptid = ptid_t (pid, pid);
   int err;
 
   proc = add_linux_process (pid, 1);
 
   /* Don't ignore the initial SIGSTOP if we just attached to this
      process.  It will be collected by wait shortly.  */
-  initial_thread = find_thread_ptid (ptid_t (pid, pid, 0));
+  initial_thread = find_thread_ptid (ptid_t (pid, pid));
   initial_thread->last_resume_kind = resume_stop;
 
   /* We must attach to every LWP.  If /proc is mounted, use that to
                        "after exec.\n", lwpid);
        }
 
-      child_ptid = ptid_t (lwpid, lwpid, 0);
+      child_ptid = ptid_t (lwpid, lwpid);
       child = add_lwp (child_ptid);
       child->stopped = 1;
       current_thread = child->thread;
 
 
       if (obuf)
        *obuf = pp;
-      return ptid_t (pid, tid, 0);
+      return ptid_t (pid, tid);
     }
 
   /* No multi-process.  Just a tid.  */
 
   if (obuf)
     *obuf = pp;
-  return ptid_t (pid, tid, 0);
+  return ptid_t (pid, tid);
 }
 
 /* Write COUNT bytes in BUF to the client.
 
 {
   struct process_info *proc = current_process ();
   int pid = pid_of (proc);
-  ptid_t ptid = ptid_t (pid, ti_p->ti_lid, 0);
+  ptid_t ptid = ptid_t (pid, ti_p->ti_lid);
   struct lwp_info *lwp;
   int err;
 
 
 {
   int fd;
   int tid = agent_get_helper_thread_id ();
-  ptid_t ptid = ptid_t (pid, tid, 0);
+  ptid_t ptid = ptid_t (pid, tid);
 
   int ret = target_write_memory (ipa_sym_addrs.addr_cmd_buf,
                                 (gdb_byte *) cmd, len);