From 7c3164bc6650ceeecd67841dfb8fcf399d12a93f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 18 Jun 2004 04:29:42 +0000 Subject: Update. 2004-06-17 Ulrich Drepper * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait): Also check for negativ nanoseconds. * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S (__pthread_cond_timedwait): Check for invalid nanosecond in timeout value. * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise. * tst-cond19.c: New file. * Makefile: Add rules to build and run tst-cond19. --- sysdeps/unix/sysv/linux/sched_setaffinity.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/sysv') diff --git a/sysdeps/unix/sysv/linux/sched_setaffinity.c b/sysdeps/unix/sysv/linux/sched_setaffinity.c index 36f73d4a59..5b1b8ee878 100644 --- a/sysdeps/unix/sysv/linux/sched_setaffinity.c +++ b/sysdeps/unix/sysv/linux/sched_setaffinity.c @@ -60,9 +60,12 @@ __sched_setaffinity_new (pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset) does not request to set a bit beyond that. */ for (size_t cnt = __kernel_cpumask_size; cnt < cpusetsize; ++cnt) if (((char *) cpuset)[cnt] != '\0') - /* Found a nonzero byte. This means the user request cannot be - fulfilled. */ - return EINVAL; + { + /* Found a nonzero byte. This means the user request cannot be + fulfilled. */ + __set_errno (EINVAL); + return -1; + } return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset); } -- cgit v1.2.3