diff options
Diffstat (limited to 'nptl/sysdeps/unix/sysv')
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c | 5 | ||||
-rw-r--r-- | nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c b/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c index e6c795b8b4..8a3f31d078 100644 --- a/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c +++ b/nptl/sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c @@ -35,7 +35,10 @@ pthread_attr_getaffinity_np (attr, cpuset) assert (sizeof (*attr) >= sizeof (struct pthread_attr)); iattr = (struct pthread_attr *) attr; - memcpy (cpuset, iattr->cpuset, sizeof (cpu_set_t)); + if (iattr->cpuset) + memcpy (cpuset, iattr->cpuset, sizeof (cpu_set_t)); + else + memset (cpuset, -1, sizeof (cpu_set_t)); return 0; } diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c b/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c index 70553d7e5f..41849ddadf 100644 --- a/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c +++ b/nptl/sysdeps/unix/sysv/linux/pthread_getaffinity.c @@ -41,3 +41,4 @@ pthread_getaffinity_np (th, cpuset) return 0; } +hidden_def (pthread_getaffinity_np) |