1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
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.
This commit is contained in:
Ulrich Drepper
2004-06-18 04:29:42 +00:00
parent 72e615009b
commit 7c3164bc66
8 changed files with 112 additions and 11 deletions

View File

@ -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);
}