about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--bits/confname.h6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S14
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S14
-rw-r--r--posix/sched.h6
-rw-r--r--sysdeps/generic/bits/confname.h6
-rw-r--r--sysdeps/generic/sched_getaffinity.c4
-rw-r--r--sysdeps/generic/sched_setaffinity.c4
8 files changed, 35 insertions, 28 deletions
diff --git a/ChangeLog b/ChangeLog
index 129efa8ed0..a69d3b8ad3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/bits/confname.h b/bits/confname.h
index ba8868af49..6cb5b3f7fb 100644
--- a/bits/confname.h
+++ b/bits/confname.h
@@ -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
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
index 81a4623a9c..b2a5d53e31 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_broadcast.S
@@ -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
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
index a581c127b2..404bb4ff85 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_signal.S
@@ -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
diff --git a/posix/sched.h b/posix/sched.h
index fe38c10974..ce00d9df4a 100644
--- a/posix/sched.h
+++ b/posix/sched.h
@@ -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
 
diff --git a/sysdeps/generic/bits/confname.h b/sysdeps/generic/bits/confname.h
index ba8868af49..6cb5b3f7fb 100644
--- a/sysdeps/generic/bits/confname.h
+++ b/sysdeps/generic/bits/confname.h
@@ -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
diff --git a/sysdeps/generic/sched_getaffinity.c b/sysdeps/generic/sched_getaffinity.c
index fc3f48f9a3..5c444cb5c8 100644
--- a/sysdeps/generic/sched_getaffinity.c
+++ b/sysdeps/generic/sched_getaffinity.c
@@ -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);
diff --git a/sysdeps/generic/sched_setaffinity.c b/sysdeps/generic/sched_setaffinity.c
index 0f80184095..e734e70b91 100644
--- a/sysdeps/generic/sched_setaffinity.c
+++ b/sysdeps/generic/sched_setaffinity.c
@@ -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);