~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/util/cpu-set-sched.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/perf/util/cpu-set-sched.h (Architecture sparc) and /tools/perf/util/cpu-set-sched.h (Architecture m68k)


  1 // SPDX-License-Identifier: LGPL-2.1                1 // SPDX-License-Identifier: LGPL-2.1
  2 // Definitions taken from glibc for use with o      2 // Definitions taken from glibc for use with older systems, same licensing.
  3 #ifndef _CPU_SET_SCHED_PERF_H                       3 #ifndef _CPU_SET_SCHED_PERF_H
  4 #define _CPU_SET_SCHED_PERF_H                       4 #define _CPU_SET_SCHED_PERF_H
  5                                                     5 
  6 #include <features.h>                               6 #include <features.h>
  7 #include <sched.h>                                  7 #include <sched.h>
  8                                                     8 
  9 #ifndef CPU_EQUAL                                   9 #ifndef CPU_EQUAL
 10 #ifndef __CPU_EQUAL_S                              10 #ifndef __CPU_EQUAL_S
 11 #if __GNUC_PREREQ (2, 91)                          11 #if __GNUC_PREREQ (2, 91)
 12 # define __CPU_EQUAL_S(setsize, cpusetp1, cpus     12 # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
 13   (__builtin_memcmp (cpusetp1, cpusetp2, setsi     13   (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
 14 #else                                              14 #else
 15 # define __CPU_EQUAL_S(setsize, cpusetp1, cpus     15 # define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
 16   (__extension__                                   16   (__extension__                                                              \
 17    ({ const __cpu_mask *__arr1 = (cpusetp1)->_     17    ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits;                          \
 18       const __cpu_mask *__arr2 = (cpusetp2)->_     18       const __cpu_mask *__arr2 = (cpusetp2)->__bits;                          \
 19       size_t __imax = (setsize) / sizeof (__cp     19       size_t __imax = (setsize) / sizeof (__cpu_mask);                        \
 20       size_t __i;                                  20       size_t __i;                                                             \
 21       for (__i = 0; __i < __imax; ++__i)           21       for (__i = 0; __i < __imax; ++__i)                                      \
 22         if (__arr1[__i] != __arr2[__i])            22         if (__arr1[__i] != __arr2[__i])                                       \
 23           break;                                   23           break;                                                              \
 24       __i == __imax; }))                           24       __i == __imax; }))
 25 #endif                                             25 #endif
 26 #endif // __CPU_EQUAL_S                            26 #endif // __CPU_EQUAL_S
 27                                                    27 
 28 #define CPU_EQUAL(cpusetp1, cpusetp2) \            28 #define CPU_EQUAL(cpusetp1, cpusetp2) \
 29   __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1,     29   __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
 30 #endif // CPU_EQUAL                                30 #endif // CPU_EQUAL
 31                                                    31 
 32 #ifndef CPU_OR                                     32 #ifndef CPU_OR
 33 #ifndef __CPU_OP_S                                 33 #ifndef __CPU_OP_S
 34 #define __CPU_OP_S(setsize, destset, srcset1,      34 #define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
 35   (__extension__                                   35   (__extension__                                                              \
 36    ({ cpu_set_t *__dest = (destset);               36    ({ cpu_set_t *__dest = (destset);                                          \
 37       const __cpu_mask *__arr1 = (srcset1)->__     37       const __cpu_mask *__arr1 = (srcset1)->__bits;                           \
 38       const __cpu_mask *__arr2 = (srcset2)->__     38       const __cpu_mask *__arr2 = (srcset2)->__bits;                           \
 39       size_t __imax = (setsize) / sizeof (__cp     39       size_t __imax = (setsize) / sizeof (__cpu_mask);                        \
 40       size_t __i;                                  40       size_t __i;                                                             \
 41       for (__i = 0; __i < __imax; ++__i)           41       for (__i = 0; __i < __imax; ++__i)                                      \
 42         ((__cpu_mask *) __dest->__bits)[__i] =     42         ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];    \
 43       __dest; }))                                  43       __dest; }))
 44 #endif // __CPU_OP_S                               44 #endif // __CPU_OP_S
 45                                                    45 
 46 #define CPU_OR(destset, srcset1, srcset2) \        46 #define CPU_OR(destset, srcset1, srcset2) \
 47   __CPU_OP_S (sizeof (cpu_set_t), destset, src     47   __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
 48 #endif // CPU_OR                                   48 #endif // CPU_OR
 49                                                    49 
 50 #endif // _CPU_SET_SCHED_PERF_H                    50 #endif // _CPU_SET_SCHED_PERF_H
 51                                                    51 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php