Tue Oct 31 00:07:29 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
+ * sysdeps/mach/hurd/getpriority.c (getpriority): Pass
+ PI_FETCH_TASKINFO to proc_getprocinfo and through
+ _hurd_priority_which_map.
+
+ * sysdeps/mach/hurd/setpriority.c (setpriority): Pass new arg to
+ _hurd_priority_which_map.
+ * hurd/hurdprio.c (_hurd_priority_which_map): New arg PI_FLAGS,
+ passed through to proc_getprocinfo RPC.
+ * hurd/hurd/resource.h: Add PI_FLAGS arg in decl.
+
* sysdeps/mach/hurd/group_member.c: New file.
* sysdeps/generic/group_member.c: New file.
/* Resource limits for the Hurd.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
/* Helper function for getpriority and setpriority. Maps FN over all the
processes specified by WHICH and WHO. PI is non-null if a
proc_getprocinfo was already done; FN may use *PI arbitrarily, it is
- reset on the next call. Returns FN's result the first time it returns
- nonzero. If FN never returns nonzero, this returns zero. */
+ reset on the next call; PI_FLAGS is passed to proc_getprocinfo. Returns
+ FN's result the first time it returns nonzero. If FN never returns
+ nonzero, this returns zero. */
extern error_t _hurd_priority_which_map (enum __priority_which which, int who,
error_t (*fn) (pid_t pid,
- struct procinfo *pi));
+ struct procinfo *pi),
+ int pi_flags);
/* Convert between Mach priority values and the priority
values used by getpriority, setpriority, and nice. */
/* Support code for dealing with priorities in the Hurd.
-Copyright (C) 1994 Free Software Foundation, Inc.
+Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
error_t
_hurd_priority_which_map (enum __priority_which which, int who,
- error_t (*function) (pid_t, struct procinfo *))
+ error_t (*function) (pid_t, struct procinfo *),
+ int pi_flags)
{
mach_msg_type_number_t npids = 64, i;
pid_t pidbuf[npids], *pids;
int *oldpi = pi;
mach_msg_type_number_t oldpisize = pisize;
if (err = __USEPORT (PROC, __proc_getprocinfo (port, pids[i],
+ pi_flags,
&pi, &pisize)))
continue;
if (pi != oldpi && oldpi != pibuf)
#pragma alloca
#endif
+#undef _GNU_SOURCE
#define _GNU_SOURCE
#ifdef HAVE_CONFIG_H
This is a variable only so users of regex can assign to it; we never
change it ourselves. */
#if defined (MATCH_MAY_ALLOCATE)
-int re_max_failures = 200000;
+int re_max_failures = 20000;
#else
int re_max_failures = 2000;
#endif
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
{
int *oldpi = pi;
unsigned int oldpisize = pisize;
- onerr = __USEPORT (PROC, __proc_getprocinfo (port,
- pid,
+ onerr = __USEPORT (PROC, __proc_getprocinfo (port, pid,
+ PI_FETCH_TASKINFO,
&pi, &pisize));
if (pi != oldpi && oldpi != pibuf)
/* Old buffer from last call was not reused; free it. */
}
onerr = 0;
- err = _hurd_priority_which_map (which, who, getonepriority);
+ err = _hurd_priority_which_map (which, who,
+ getonepriority, PI_FETCH_TASKINFO);
if (pi != pibuf)
__vm_deallocate (__mach_task_self (),
-/* Copyright (C) 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
npids = ntasks = nwin = nperm = nacces = 0;
pidloser = priloser = 0;
- err = _hurd_priority_which_map (which, who, setonepriority);
+ err = _hurd_priority_which_map (which, who, setonepriority, 0);
if (!err && npids == 0)
/* No error, but no pids found. */