[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[patches] Backport pthread_getattr_np fix
- To: patches@xxxxxxxxxx
- Subject: [patches] Backport pthread_getattr_np fix
- From: Paul Brook <paul@xxxxxxxxxxxxxxxx>
- Date: Wed, 16 Apr 2008 18:52:20 +0100
I'd like to backport the patch below to the eglibc 2.5 branch.
The original submission can be found there:
http://sources.redhat.com/ml/libc-hacker/2007-06/msg00018.html
I'm currently working with an arm target that experiences this crash.
This patch is already present on later branches.
Ok?
Paul
2008-04-16 Paul Brook <paul@xxxxxxxxxxxxxxxx>
Backport:
2007-06-22 Jakub Jelinek <jakub@xxxxxxxxxx>
* pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
cpusetsize if pthread_getaffinity_np failed with ENOSYS.
--- libc/nptl/pthread_getattr_np.c.jj 2007-06-04 08:42:05.000000000 +0200
+++ libc/nptl/pthread_getattr_np.c 2007-06-22 11:41:48.000000000 +0200
@@ -164,8 +164,12 @@ pthread_getattr_np (thread_id, attr)
{
free (cpuset);
if (ret == ENOSYS)
- /* There is no such functionality. */
- ret = 0;
+ {
+ /* There is no such functionality. */
+ ret = 0;
+ iattr->cpuset = NULL;
+ iattr->cpusetsize = 0;
+ }
}
}