From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13274 invoked by alias); 20 Mar 2004 06:56:36 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 13258 invoked from network); 20 Mar 2004 06:56:36 -0000 Received: from unknown (HELO Cantor.suse.de) (195.135.220.2) by sources.redhat.com with SMTP; 20 Mar 2004 06:56:36 -0000 Received: from hermes.suse.de (Hermes.suse.de [195.135.221.8]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by Cantor.suse.de (Postfix) with ESMTP id EA8EC32F764 for ; Sat, 20 Mar 2004 07:56:35 +0100 (CET) Received: from aj by arthur.inka.de with local (Exim 4.22) id 1B4aPK-0002T2-Uq for libc-hacker@sources.redhat.com; Sat, 20 Mar 2004 07:56:34 +0100 To: Glibc hackers Subject: Error in pthread_setaffinity From: Andreas Jaeger Date: Sun, 21 Mar 2004 06:33:00 -0000 Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Rational FORTRAN, linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2004-03/txt/msg00111.txt.bz2 --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-length: 3312 On ia64 and PPC platforms I saw: ../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c: In function `__pthre= ad_setaffinity_new': ../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:80: error: redeclarat= ion of `err' ../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:62: error: `err' prev= iously declared here ../nptl/sysdeps/unix/sysv/linux/pthread_setaffinity.c:62: warning: unused v= ariable `err' make[2]: *** [/usr/src/packages/BUILD/glibc-2.3/cc-nptl/nptl/pthread_setaff= inity.o] Error 1 The appended patch fixes the problems and the old interface. Ok to commit? Andreas 2004-03-20 Andreas Jaeger * 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. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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_ =20 #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); =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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; =20 - INTERNAL_SYSCALL_DECL (err); res =3D 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_ =20 #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); --=20 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj SuSE Linux AG, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GPG fingerprint =3D 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126 --=-=-= Content-Type: application/pgp-signature Content-length: 188 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQBAW+siOJpWPMJyoSYRAjWZAKCUIlU0nTrn+fBSTX/VQGdmpy8ORACfarWb KP3+fu8XsOwEsgS35qA2bX8= =fa/n -----END PGP SIGNATURE----- --=-=-=--