about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/sched_setaffinity.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-06-18 04:29:42 +0000
committerUlrich Drepper <drepper@redhat.com>2004-06-18 04:29:42 +0000
commit7c3164bc6650ceeecd67841dfb8fcf399d12a93f (patch)
tree23a7016e21d2848ec2d3fdfa1b8dc1abcf3e85d4 /sysdeps/unix/sysv/linux/sched_setaffinity.c
parent72e615009bfde798692487d04ae548d15eb423ba (diff)
downloadglibc-7c3164bc6650ceeecd67841dfb8fcf399d12a93f.tar.gz
glibc-7c3164bc6650ceeecd67841dfb8fcf399d12a93f.tar.xz
glibc-7c3164bc6650ceeecd67841dfb8fcf399d12a93f.zip
Update.
2004-06-17  Ulrich Drepper  <drepper@redhat.com>

	* 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.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sched_setaffinity.c')
-rw-r--r--sysdeps/unix/sysv/linux/sched_setaffinity.c9
1 files changed, 6 insertions, 3 deletions
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);
 }