about summary refs log tree commit diff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-07-29 22:22:34 +0000
committerUlrich Drepper <drepper@redhat.com>2007-07-29 22:22:34 +0000
commita14ad5ae4b0e9272877ad6e7cb97792632da94a8 (patch)
treebc947b1d54cb2dd153c0b36433da0e230df52029 /posix
parent1168be45be225c10ed91b1d81103fb9d1c49ab0a (diff)
downloadglibc-a14ad5ae4b0e9272877ad6e7cb97792632da94a8.tar.gz
glibc-a14ad5ae4b0e9272877ad6e7cb97792632da94a8.tar.xz
glibc-a14ad5ae4b0e9272877ad6e7cb97792632da94a8.zip
Define old CPU_* macros in temers of __CPU_*_S macros. Define CPU_*_S macros.
Diffstat (limited to 'posix')
-rw-r--r--posix/sched.h40
1 files changed, 35 insertions, 5 deletions
diff --git a/posix/sched.h b/posix/sched.h
index 62cca85b2e..c9a0840f7f 100644
--- a/posix/sched.h
+++ b/posix/sched.h
@@ -69,11 +69,41 @@ extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __THROW;
 #ifdef __USE_GNU
 /* Access macros for `cpu_set'.  */
 # define CPU_SETSIZE __CPU_SETSIZE
-# define CPU_SET(cpu, cpusetp)	 __CPU_SET (cpu, cpusetp)
-# define CPU_CLR(cpu, cpusetp)	 __CPU_CLR (cpu, cpusetp)
-# define CPU_ISSET(cpu, cpusetp) __CPU_ISSET (cpu, cpusetp)
-# define CPU_ZERO(cpusetp)	 __CPU_ZERO (cpusetp)
-# define CPU_COUNT(cpusetp)	 __CPU_COUNT (cpusetp)
+# define CPU_SET(cpu, cpusetp)	 __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
+# define CPU_CLR(cpu, cpusetp)	 __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
+# define CPU_ISSET(cpu, cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), \
+						cpusetp)
+# define CPU_ZERO(cpusetp)	 __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
+# define CPU_COUNT(cpusetp)	 __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
+
+# define CPU_SET_S(cpu, setsize, cpusetp)   __CPU_SET_S (cpu, setsize, cpusetp)
+# define CPU_CLR_S(cpu, setsize, cpusetp)   __CPU_CLR_S (cpu, setsize, cpusetp)
+# define CPU_ISSET_S(cpu, setsize, cpusetp) __CPU_ISSET_S (cpu, setsize, \
+							   cpusetp)
+# define CPU_ZERO_S(setsize, cpusetp)	    __CPU_ZERO_S (setsize, cpusetp)
+# define CPU_COUNT_S(setsize, cpusetp)	    __CPU_COUNT_S (setsize, cpusetp)
+
+# define CPU_EQUAL(cpusetp1, cpusetp2) \
+  __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
+# define CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
+  __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
+
+# define CPU_AND(destset, srcset1, srcset2) \
+  __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
+# define CPU_OR(destset, srcset1, srcset2) \
+  __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
+# define CPU_XOR(destset, srcset1, srcset2) \
+  __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
+# define CPU_AND_S(setsize, destset, srcset1, srcset2) \
+  __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
+# define CPU_OR_S(setsize, destset, srcset1, srcset2) \
+  __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
+# define CPU_XOR_S(setsize, destset, srcset1, srcset2) \
+  __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
+
+# define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
+# define CPU_ALLOC(count) __CPU_ALLOC (count)
+# define CPU_FREE(count) __CPU_FREE (count)
 
 
 /* Set the CPU affinity for a task */