about summary refs log tree commit diff
path: root/nptl/pthread_getattr_np.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-06-22 22:13:52 +0000
committerUlrich Drepper <drepper@redhat.com>2007-06-22 22:13:52 +0000
commita28876d013accb785592925a13160b6ef7d4fa60 (patch)
treecdb11f734cb20348241f646ae4f2117e027bdf88 /nptl/pthread_getattr_np.c
parenta4915df27a603a4ccb5febc994d938ce434c9195 (diff)
downloadglibc-a28876d013accb785592925a13160b6ef7d4fa60.tar.gz
glibc-a28876d013accb785592925a13160b6ef7d4fa60.tar.xz
glibc-a28876d013accb785592925a13160b6ef7d4fa60.zip
(pthread_getattr_np): Clear cpuset and cpusetsize if pthread_getaffinity_np failed with ENOSYS.
Diffstat (limited to 'nptl/pthread_getattr_np.c')
-rw-r--r--nptl/pthread_getattr_np.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 9c0e4ed866..87cf56482f 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -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;
+	    }
 	}
     }