mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-05 21:00:05 +00:00
* 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.
This commit is contained in:
parent
3bbceb1287
commit
80b55d320b
10
ChangeLog
10
ChangeLog
@ -1,5 +1,15 @@
|
||||
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.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -33,11 +33,13 @@ extern struct mutex _hurd_rlimit_lock; /* Locks _hurd_rlimits. */
|
||||
/* 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. */
|
||||
|
@ -1,5 +1,5 @@
|
||||
/* 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
|
||||
@ -22,7 +22,8 @@ Cambridge, MA 02139, USA. */
|
||||
|
||||
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;
|
||||
@ -59,6 +60,7 @@ _hurd_priority_which_map (enum __priority_which which, int who,
|
||||
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)
|
||||
|
@ -28,6 +28,7 @@ Cambridge, MA 02139, USA. */
|
||||
#pragma alloca
|
||||
#endif
|
||||
|
||||
#undef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -1003,7 +1004,7 @@ static const char *re_error_msgid[] =
|
||||
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
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -41,8 +41,8 @@ getpriority (enum __priority_which which, int who)
|
||||
{
|
||||
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. */
|
||||
@ -56,7 +56,8 @@ getpriority (enum __priority_which which, int who)
|
||||
}
|
||||
|
||||
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 (),
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
@ -67,7 +67,7 @@ setpriority (enum __priority_which which, int who, int prio)
|
||||
|
||||
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. */
|
||||
|
Loading…
Reference in New Issue
Block a user