(_hurd_priority_which_map): Pass threadwaits args to proc_getprocinfo.
authorroland <roland>
Fri, 3 Nov 1995 22:35:04 +0000 (22:35 +0000)
committerroland <roland>
Fri, 3 Nov 1995 22:35:04 +0000 (22:35 +0000)
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;
+         char *tw = 0;
+         size_t twsz = 0;
          if (err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i],
                                                         pi_flags,
-                                                        &pi, &pisize)))
+                                                        &pi, &pisize,
+                                                        &tw, &twsz)))
            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 (),