2002-11-24  Robert Love  <rml@tech9.net>

	* posix/sched.h: Second parameter of sched_setaffinity and
	sched_getaffinity is `unsigned int', not `unsigned long'.
	* sysdeps/generic/sched_setaffinity.c: Likewise.
	* sysdeps/generic/sched_getaffinity.c: Likewise.

	Reported by John Levon <levon@movementarian.org>.
This commit is contained in:
Ulrich Drepper 2003-02-06 19:15:14 +00:00
parent 11090a992d
commit ce96c93de5
8 changed files with 35 additions and 28 deletions

View File

@ -1,7 +1,14 @@
2002-11-24 Robert Love <rml@tech9.net>
* posix/sched.h: Second parameter of sched_setaffinity and
sched_getaffinity is `unsigned int', not `unsigned long'.
* sysdeps/generic/sched_setaffinity.c: Likewise.
* sysdeps/generic/sched_getaffinity.c: Likewise.
2003-02-05 Ulrich Drepper <drepper@redhat.com>
* debug/catchsegv.sh: Fix typo in error messsage.
Reported by John Levon <leven@movementarian.org>.
Reported by John Levon <levon@movementarian.org>.
* sysdeps/unix/sysv/linux/posix_fadvise.c: New file.
* sysdeps/unix/sysv/linux/syscalls.list: Add posix_fadvise64 syscall.

View File

@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1993,1995-1998,2000,2001,2003 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
@ -474,7 +474,7 @@ enum
# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \
|| defined __USE_LARGEFILE)
_CS_LFS_CFLAGS = 1000,
# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
_CS_LFS_LDFLAGS,
# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
_CS_LFS_LIBS,
@ -486,7 +486,7 @@ enum
_CS_LFS64_LDFLAGS,
# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
_CS_LFS64_LIBS,
# define _CS_LFS64_LIBS _CS_LFS64_LIBS
# define _CS_LFS64_LIBS _CS_LFS64_LIBS
_CS_LFS64_LINTFLAGS,
# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
# endif

View File

@ -56,20 +56,20 @@ __pthread_cond_broadcast:
testl %eax, %eax
jne 1f
2: movl total_seq+4(%ebx), %eax
movl total_seq(%ebx), %ecx
cmpl wakeup_seq+4(%ebx), %eax
2: addl $wakeup_seq, %ebx
movl total_seq+4-wakeup_seq(%ebx), %eax
movl total_seq-wakeup_seq(%ebx), %ecx
cmpl 4(%ebx), %eax
ja 3f
jb 4f
cmpl wakeup_seq(%ebx), %ecx
cmpl (%ebx), %ecx
jna 4f
/* Case all currently waiting threads to wake up. */
3: movl %ecx, wakeup_seq(%ebx)
movl %eax, wakeup_seq+4(%ebx)
3: movl %ecx, (%ebx)
movl %eax, 4(%ebx)
/* Wake up all threads. */
addl $wakeup_seq, %ebx
movl $FUTEX_WAKE, %ecx
xorl %esi, %esi
movl $SYS_futex, %eax

View File

@ -56,20 +56,20 @@ __pthread_cond_signal:
testl %eax, %eax
jne 1f
2: movl total_seq+4(%ebx), %eax
movl total_seq(%ebx), %ecx
cmpl wakeup_seq+4(%ebx), %eax
2: addl $wakeup_seq, %ebx
movl total_seq+4-wakeup_seq(%ebx), %eax
movl total_seq-wakeup_seq(%ebx), %ecx
cmpl 4(%ebx), %eax
ja 3f
jb 4f
cmpl wakeup_seq(%ebx), %ecx
cmpl (%ebx), %ecx
jbe 4f
/* Bump the wakeup number. */
3: addl $1, wakeup_seq(%ebx)
adcl $0, wakeup_seq+4(%ebx)
3: addl $1, (%ebx)
adcl $0, 4(%ebx)
/* Wake up one thread. */
addl $wakeup_seq, %ebx
movl $FUTEX_WAKE, %ecx
xorl %esi, %esi
movl $SYS_futex, %eax

View File

@ -1,5 +1,5 @@
/* Definitions for POSIX 1003.1b-1993 (aka POSIX.4) scheduling interface.
Copyright (C) 1996, 1997, 1999, 2001, 2002 Free Software Foundation, Inc.
Copyright (C) 1996,1997,1999,2001,2002,2003 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
@ -65,11 +65,11 @@ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
#ifdef __USE_GNU
/* Set the CPU affinity for a task */
extern int sched_setaffinity (__pid_t __pid, unsigned long int __len,
extern int sched_setaffinity (__pid_t __pid, unsigned int __len,
unsigned long int *__mask) __THROW;
/* Get the CPU affinity for a task */
extern int sched_getaffinity (__pid_t __pid, unsigned long int __len,
extern int sched_getaffinity (__pid_t __pid, unsigned int __len,
unsigned long int *__mask) __THROW;
#endif

View File

@ -1,5 +1,5 @@
/* `sysconf', `pathconf', and `confstr' NAME values. Generic version.
Copyright (C) 1993, 1995-1998, 2000, 2001 Free Software Foundation, Inc.
Copyright (C) 1993,1995-1998,2000,2001,2003 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
@ -474,7 +474,7 @@ enum
# if (defined __USE_FILE_OFFSET64 || defined __USE_LARGEFILE64 \
|| defined __USE_LARGEFILE)
_CS_LFS_CFLAGS = 1000,
# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
# define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
_CS_LFS_LDFLAGS,
# define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
_CS_LFS_LIBS,
@ -486,7 +486,7 @@ enum
_CS_LFS64_LDFLAGS,
# define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
_CS_LFS64_LIBS,
# define _CS_LFS64_LIBS _CS_LFS64_LIBS
# define _CS_LFS64_LIBS _CS_LFS64_LIBS
_CS_LFS64_LINTFLAGS,
# define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
# endif

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Copyright (C) 2002, 2003 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
@ -25,7 +25,7 @@
int
sched_getaffinity (pid, len, mask)
pid_t pid;
unsigned long int len;
unsigned int len;
unsigned long int *mask;
{
__set_errno (ENOSYS);

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2002 Free Software Foundation, Inc.
/* Copyright (C) 2002, 2003 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
@ -25,7 +25,7 @@
int
sched_setaffinity (pid, len, mask)
pid_t pid;
unsigned long int len;
unsigned int len;
unsigned long int *mask;
{
__set_errno (ENOSYS);