(_hurd_priority_which_map): Pass threadwaits args to proc_getprocinfo.
[kopensolaris-gnu/glibc.git] / hurd / hurdprio.c
index 9360738..9c9ed2b 100644 (file)
@@ -59,10 +59,16 @@ _hurd_priority_which_map (enum __priority_which which, int who,
          /* Get procinfo to check the owner.  */
          int *oldpi = pi;
          mach_msg_type_number_t oldpisize = pisize;
          /* Get procinfo to check the owner.  */
          int *oldpi = pi;
          mach_msg_type_number_t oldpisize = pisize;
+         char *tw = 0;
+         size_t twsz = 0;
          if (err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i],
                                                         pi_flags,
          if (err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i],
                                                         pi_flags,
-                                                        &pi, &pisize)))
+                                                        &pi, &pisize,
+                                                        &tw, &twsz)))
            continue;
            continue;
+         if (twsz)
+           /* Gratuitous.  */
+           __vm_deallocate (__mach_task_self (), tw, twsz);
          if (pi != oldpi && oldpi != pibuf)
            /* Old buffer from last call was not reused; free it.  */
            __vm_deallocate (__mach_task_self (),
          if (pi != oldpi && oldpi != pibuf)
            /* Old buffer from last call was not reused; free it.  */
            __vm_deallocate (__mach_task_self (),