aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd')
-rw-r--r--sysdeps/mach/hurd/setpriority.c14
-rw-r--r--sysdeps/mach/hurd/times.c2
2 files changed, 14 insertions, 2 deletions
diff --git a/sysdeps/mach/hurd/setpriority.c b/sysdeps/mach/hurd/setpriority.c
index 3d1ce54a74..ab713bd036 100644
--- a/sysdeps/mach/hurd/setpriority.c
+++ b/sysdeps/mach/hurd/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1994,95,97,2000,02 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
@@ -44,7 +44,19 @@ setpriority (enum __priority_which which, id_t who, int prio)
{
error_t prierr;
++ntasks;
+#ifdef POLICY_TIMESHARE_BASE_COUNT
+ {
+ /* XXX This assumes timeshare policy. */
+ struct policy_timeshare_base base
+ = { NICE_TO_MACH_PRIORITY (prio) };
+ prierr = __task_policy (task, POLICY_TIMESHARE,
+ (policy_base_t) &base,
+ POLICY_TIMESHARE_BASE_COUNT,
+ 0, 1);
+ }
+#else
prierr = __task_priority (task, NICE_TO_MACH_PRIORITY (prio), 1);
+#endif
__mach_port_deallocate (__mach_task_self (), task);
switch (prierr)
{
diff --git a/sysdeps/mach/hurd/times.c b/sysdeps/mach/hurd/times.c
index 2065aac49a..4d537cad68 100644
--- a/sysdeps/mach/hurd/times.c
+++ b/sysdeps/mach/hurd/times.c
@@ -83,7 +83,7 @@ __times (struct tms *tms)
#if NO_CREATION_TIME
# define our_creation_time startup_time
#else
-# define our_creation_time bi.startup_time
+# define our_creation_time bi.creation_time
#endif
return (clock_from_time_value (&now)
- clock_from_time_value (&our_creation_time));