[Glibc-bsd-commits] r2859 - trunk/glibc-ports/kfreebsd/bits

Petr Salinger ps-guest at alioth.debian.org
Fri Nov 20 19:00:48 UTC 2009


Author: ps-guest
Date: 2009-11-20 19:00:47 +0000 (Fri, 20 Nov 2009)
New Revision: 2859

Modified:
   trunk/glibc-ports/kfreebsd/bits/sched.h
Log:
Use __const in cast to not throw away const-ness of parameters in 
	(__CPU_ISSET_S)
        (__CPU_EQUAL_S)
        (__CPU_OP_S)



Modified: trunk/glibc-ports/kfreebsd/bits/sched.h
===================================================================
--- trunk/glibc-ports/kfreebsd/bits/sched.h	2009-11-20 18:54:48 UTC (rev 2858)
+++ trunk/glibc-ports/kfreebsd/bits/sched.h	2009-11-20 19:00:47 UTC (rev 2859)
@@ -132,7 +132,7 @@
   (__extension__							      \
    ({ size_t __cpu = (cpu);						      \
       __cpu < 8 * (setsize)						      \
-      ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]	      \
+      ? ((((__const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)]	      \
 	  & __CPUMASK (__cpu))) != 0					      \
       : 0; }))
 
@@ -145,8 +145,8 @@
 # else
 #  define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
   (__extension__							      \
-   ({ __cpu_mask *__arr1 = (cpusetp1)->__bits;				      \
-      __cpu_mask *__arr2 = (cpusetp2)->__bits;				      \
+   ({ __const __cpu_mask *__arr1 = (cpusetp1)->__bits;				      \
+      __const __cpu_mask *__arr2 = (cpusetp2)->__bits;				      \
       size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
       size_t __i;							      \
       for (__i = 0; __i < __imax; ++__i)				      \
@@ -158,8 +158,8 @@
 # define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
   (__extension__							      \
    ({ cpu_set_t *__dest = (destset);					      \
-      __cpu_mask *__arr1 = (srcset1)->__bits;				      \
-      __cpu_mask *__arr2 = (srcset2)->__bits;				      \
+      __const __cpu_mask *__arr1 = (srcset1)->__bits;				      \
+      __const __cpu_mask *__arr2 = (srcset2)->__bits;				      \
       size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
       size_t __i;							      \
       for (__i = 0; __i < __imax; ++__i)				      \




More information about the Glibc-bsd-commits mailing list