From 65d60af0a5097f04accb76b75c49b90d55547c34 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 7 Jul 2007 17:32:36 +0000 Subject: [PATCH] * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and cpusetsize if pthread_getaffinity_np failed with ENOSYS. --- nptl/ChangeLog | 5 +++++ nptl/pthread_getattr_np.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nptl/ChangeLog b/nptl/ChangeLog index bb7dd528ab..2294c9567e 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2007-06-22 Jakub Jelinek + + * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and + cpusetsize if pthread_getaffinity_np failed with ENOSYS. + 2007-05-28 Jakub Jelinek * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c index 4bdc7b5b15..396e8a8ac8 100644 --- a/nptl/pthread_getattr_np.c +++ b/nptl/pthread_getattr_np.c @@ -168,8 +168,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; + } } }