* pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
authorjakub <jakub>
Sat, 7 Jul 2007 17:32:36 +0000 (17:32 +0000)
committerjakub <jakub>
Sat, 7 Jul 2007 17:32:36 +0000 (17:32 +0000)
cpusetsize if pthread_getaffinity_np failed with ENOSYS.

nptl/ChangeLog
nptl/pthread_getattr_np.c

index bb7dd52..2294c95 100644 (file)
@@ -1,3 +1,8 @@
+2007-06-22  Jakub Jelinek  <jakub@redhat.com>
+
+       * pthread_getattr_np.c (pthread_getattr_np): Clear cpuset and
+       cpusetsize if pthread_getaffinity_np failed with ENOSYS.
+
 2007-05-28  Jakub Jelinek  <jakub@redhat.com>
 
        * sysdeps/i386/tls.h (THREAD_GSCOPE_RESET_FLAG): Use explicit
index 4bdc7b5..396e8a8 100644 (file)
@@ -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;
+           }
        }
     }