public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Jaeger <aj@suse.de>
To: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Error in pthread_setaffinity
Date: Sun, 21 Mar 2004 06:33:00 -0000	[thread overview]
Message-ID: <m37jxg80ri.fsf@gromit.moeb> (raw)

[-- Attachment #1: Type: text/plain, Size: 3099 bytes --]


On ia64 and PPC platforms I saw:

../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c: In function `__pthread_setaffinity_new':
../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:80: error: redeclaration of `err'
../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:62: error: `err' previously declared here
../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:62: warning: unused variable `err'
make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nptl/pthread_setaffinity.o] Error 1

The appended patch fixes the problems and the old interface.  Ok to
commit?

Andreas

2004-03-20  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/pthread_setaffinity.c
	(__pthread_setaffinity_old): Fix interface.
	* sysdeps/unix/sysv/linux/pthread_getaffinity.c
	(__pthread_getaffinity_old): Likewise.

	* sysdeps/unix/sysv/linux/pthread_setaffinity.c
	(__pthread_setaffinity_new): Remove duplicate declaration.

============================================================
Index: nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c
--- nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c	18 Mar 2004 23:55:19 -0000	1.3
+++ nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c	20 Mar 2004 06:56:21 -0000
@@ -50,10 +50,10 @@ versioned_symbol (libpthread, __pthread_
 
 #if SHLIB_COMPAT(libpthread, 2_3_3, 2_3_4)
 int
-__pthread_getaffinity_old (const pthread_attr_t *attr, cpu_set_t *cpuset)
+__pthread_getaffinity_old (pthread_t th, cpu_set_t *cpuset)
 {
   /* The old interface by default assumed a 1024 processor bitmap.  */
-  return __pthread_getaffinity_new (attr, 128, cpuset);
+  return __pthread_getaffinity_new (th, 128, cpuset);
 }
 compat_symbol (libpthread, __pthread_getaffinity_old, pthread_getaffinity_np,
 	       GLIBC_2_3_3);
============================================================
Index: nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c
--- nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c	18 Mar 2004 23:55:19 -0000	1.2
+++ nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c	20 Mar 2004 06:56:21 -0000
@@ -77,7 +77,6 @@ __pthread_setaffinity_new (pthread_t th,
 	 fulfilled.  */
       return EINVAL;
 
-  INTERNAL_SYSCALL_DECL (err);
   res = INTERNAL_SYSCALL (sched_setaffinity, err, 3, pd->tid, cpusetsize,
 			  cpuset);
   return (INTERNAL_SYSCALL_ERROR_P (res, err)
@@ -90,10 +89,10 @@ versioned_symbol (libpthread, __pthread_
 
 #if SHLIB_COMPAT(libpthread, 2_3_3, 2_3_4)
 int
-__pthread_setaffinity_old (const pthread_attr_t *attr, cpu_set_t *cpuset)
+__pthread_setaffinity_old (pthread_t th, cpu_set_t *cpuset)
 {
   /* The old interface by default assumed a 1024 processor bitmap.  */
-  return __pthread_setaffinity_new (attr, 128, cpuset);
+  return __pthread_setaffinity_new (th, 128, cpuset);
 }
 compat_symbol (libpthread, __pthread_setaffinity_old, pthread_setaffinity_np,
 	       GLIBC_2_3_3);

-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]

             reply	other threads:[~2004-03-20  6:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-21  6:33 Andreas Jaeger [this message]
2004-03-21  7:12 ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m37jxg80ri.fsf@gromit.moeb \
    --to=aj@suse.de \
    --cc=libc-hacker@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).