From 80f536dbf20510cbabdb042c30baa453d0b069c1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 20 Jul 2003 08:56:05 +0000 Subject: Update. 2003-07-20 Ulrich Drepper * Makefile (libpthread-routines): Add pthread_attr_getaffinity and pthread_attr_setaffinity. * Versions [libpthread] (GLIBC_2.3.3): Likewise. * sysdeps/unix/sysv/linux/pthread_attr_getaffinity.c: New file. * sysdeps/unix/sysv/linux/pthread_attr_setaffinity.c: New file. * pthread_attr_destroy.c: Free cpuset element if allocated. * pthread_create.c: Pass iattr as additional parameter to create_thread. * sysdeps/pthread/createthread.c: If attribute is provided and a new thread is created with affinity set or scheduling parameters, start thread with CLONE_STOPPED. * sysdeps/pthread/pthread.h: Declare pthread_attr_getaffinity and pthread_attr_setaffinity. * sysdeps/unix/sysv/linux/internaltypes.h (struct pthread_attr): Add cpuset element. --- sysdeps/unix/sysv/linux/bits/sched.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix/sysv/linux/bits') diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h index b250752810..4e963d1baa 100644 --- a/sysdeps/unix/sysv/linux/bits/sched.h +++ b/sysdeps/unix/sysv/linux/bits/sched.h @@ -110,8 +110,8 @@ typedef struct # define __CPU_ZERO(cpusetp) \ do { \ unsigned int __i; \ - cpu_set *__arr = (cpusetp); \ - for (__i = 0; __i < sizeof (cpu_set) / sizeof (__cpu_mask); ++__i) \ + cpu_set_t *__arr = (cpusetp); \ + for (__i = 0; __i < sizeof (cpu_set_t) / sizeof (__cpu_mask); ++__i) \ __arr->__bits[__i] = 0; \ } while (0) # define __CPU_SET(cpu, cpusetp) \ -- cgit 1.4.1