Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-3]: src Pull up following revision(s) (requested by kleink in tic...
details: https://anonhg.NetBSD.org/src/rev/5cf1ee6db3a6
branches: netbsd-3
changeset: 577337:5cf1ee6db3a6
user: tron <tron%NetBSD.org@localhost>
date: Mon Oct 10 11:32:28 2005 +0000
description:
Pull up following revision(s) (requested by kleink in ticket #875):
include/sched.h: revision 1.8
lib/libpthread/sched.c: revision 1.4
Change the sched_*() functions to return -1 and set errno to ENOSYS
(per the standard) instead of returning ENOSYS. Noted by Ian Zagorskih
in PR kern/30970.
diffstat:
include/sched.h | 4 ++--
lib/libpthread/sched.c | 32 +++++++++++++++++++++++---------
2 files changed, 25 insertions(+), 11 deletions(-)
diffs (106 lines):
diff -r 535494871926 -r 5cf1ee6db3a6 include/sched.h
--- a/include/sched.h Sat Oct 08 16:04:50 2005 +0000
+++ b/include/sched.h Mon Oct 10 11:32:28 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.h,v 1.7 2005/02/03 04:39:32 perry Exp $ */
+/* $NetBSD: sched.h,v 1.7.2.1 2005/10/10 11:32:28 tron Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -50,7 +50,7 @@
__BEGIN_DECLS
/*
- * These are permitted to fail and return ENOSYS if
+ * These are permitted to fail and return -1 and set errno = ENOSYS if
* _POSIX_PRIORITY_SCHEDULING is not defined.
*/
int sched_setparam(pid_t, const struct sched_param *);
diff -r 535494871926 -r 5cf1ee6db3a6 lib/libpthread/sched.c
--- a/lib/libpthread/sched.c Sat Oct 08 16:04:50 2005 +0000
+++ b/lib/libpthread/sched.c Mon Oct 10 11:32:28 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sched.c,v 1.3 2003/03/08 08:03:36 lukem Exp $ */
+/* $NetBSD: sched.c,v 1.3.6.1 2005/10/10 11:32:28 tron Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: sched.c,v 1.3 2003/03/08 08:03:36 lukem Exp $");
+__RCSID("$NetBSD: sched.c,v 1.3.6.1 2005/10/10 11:32:28 tron Exp $");
#include <errno.h>
#include <sched.h>
@@ -48,14 +48,18 @@
int
sched_setparam(pid_t pid, const struct sched_param *param)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
int
sched_getparam(pid_t pid, struct sched_param *param)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
@@ -63,33 +67,43 @@
sched_setscheduler(pid_t pid, int policy,
const struct sched_param *param)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
int
sched_getscheduler(pid_t pid)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
int
sched_get_priority_max(int policy)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
int
sched_get_priority_min(int policy)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
/* ARGSUSED */
int
sched_rr_get_interval(pid_t pid, struct timespec *interval)
{
- return ENOSYS;
+
+ errno = ENOSYS;
+ return -1;
}
Home |
Main Index |
Thread Index |
Old Index