00001 #ifndef capdef_h 00002 #define capdef_h 00003 00004 #define CAP_K_ALL_USER -1 00005 #define CAP_K_ALL_USER_ADD -1 00006 #define CAP_K_ALL_CPU_ADD -1 00007 #define CAP_K_ALL_ACTIVE_CPUS -1 00008 #define CAP_K_ALL_USER_REMOVE 0 00009 #define CAP_K_ALL_CPU_REMOVE 0 00010 #define CAP_K_GET_FREE_CAP 0 00011 00012 #define CAP_M_USER1 0x1 00013 #define CAP_M_USER2 0x2 00014 #define CAP_M_USER3 0x4 00015 #define CAP_M_USER4 0x8 00016 #define CAP_M_USER5 0x10 00017 #define CAP_M_USER6 0x20 00018 #define CAP_M_USER7 0x40 00019 #define CAP_M_USER8 0x80 00020 #define CAP_M_USER9 0x100 00021 #define CAP_M_USER10 0x200 00022 #define CAP_M_USER11 0x400 00023 #define CAP_M_USER12 0x800 00024 #define CAP_M_USER13 0x1000 00025 #define CAP_M_USER14 0x2000 00026 #define CAP_M_USER15 0x4000 00027 #define CAP_M_USER16 0x8000 00028 00029 struct _cap { 00030 union { 00031 unsigned int cap_l_cap; 00032 struct { 00033 unsigned cap_v_user1 : 1; 00034 unsigned cap_v_user2 : 1; 00035 unsigned cap_v_user3 : 1; 00036 unsigned cap_v_user4 : 1; 00037 unsigned cap_v_user5 : 1; 00038 unsigned cap_v_user6 : 1; 00039 unsigned cap_v_user7 : 1; 00040 unsigned cap_v_user8 : 1; 00041 unsigned cap_v_user9 : 1; 00042 unsigned cap_v_user10 : 1; 00043 unsigned cap_v_user11 : 1; 00044 unsigned cap_v_user12 : 1; 00045 unsigned cap_v_user13 : 1; 00046 unsigned cap_v_user14 : 1; 00047 unsigned cap_v_user15 : 1; 00048 unsigned cap_v_user16 : 1; 00049 unsigned cap_v_fill_1 : 16; 00050 }; 00051 }; 00052 }; 00053 00054 #define CAP_M_CPU0 0x1 00055 #define CAP_M_CPU1 0x2 00056 #define CAP_M_CPU2 0x4 00057 #define CAP_M_CPU3 0x8 00058 #define CAP_M_CPU4 0x10 00059 #define CAP_M_CPU5 0x20 00060 #define CAP_M_CPU6 0x40 00061 #define CAP_M_CPU7 0x80 00062 #define CAP_M_CPU8 0x100 00063 #define CAP_M_CPU9 0x200 00064 #define CAP_M_CPU10 0x400 00065 #define CAP_M_CPU11 0x800 00066 #define CAP_M_CPU12 0x1000 00067 #define CAP_M_CPU13 0x2000 00068 #define CAP_M_CPU14 0x4000 00069 #define CAP_M_CPU15 0x8000 00070 #define CAP_M_CPU16 0x10000 00071 #define CAP_M_CPU17 0x20000 00072 #define CAP_M_CPU18 0x40000 00073 #define CAP_M_CPU19 0x80000 00074 #define CAP_M_CPU20 0x100000 00075 #define CAP_M_CPU21 0x200000 00076 #define CAP_M_CPU22 0x400000 00077 #define CAP_M_CPU23 0x800000 00078 #define CAP_M_CPU24 0x1000000 00079 #define CAP_M_CPU25 0x2000000 00080 #define CAP_M_CPU26 0x4000000 00081 #define CAP_M_CPU27 0x8000000 00082 #define CAP_M_CPU28 0x10000000 00083 #define CAP_M_CPU29 0x20000000 00084 #define CAP_M_CPU30 0x40000000 00085 #define CAP_M_CPU31 0x80000000 00086 00087 struct _cap_cpus { 00088 union { 00089 unsigned int cap_l_cap_cpus; 00090 struct { 00091 unsigned cap_v_cpu0 : 1; 00092 unsigned cap_v_cpu1 : 1; 00093 unsigned cap_v_cpu2 : 1; 00094 unsigned cap_v_cpu3 : 1; 00095 unsigned cap_v_cpu4 : 1; 00096 unsigned cap_v_cpu5 : 1; 00097 unsigned cap_v_cpu6 : 1; 00098 unsigned cap_v_cpu7 : 1; 00099 unsigned cap_v_cpu8 : 1; 00100 unsigned cap_v_cpu9 : 1; 00101 unsigned cap_v_cpu10 : 1; 00102 unsigned cap_v_cpu11 : 1; 00103 unsigned cap_v_cpu12 : 1; 00104 unsigned cap_v_cpu13 : 1; 00105 unsigned cap_v_cpu14 : 1; 00106 unsigned cap_v_cpu15 : 1; 00107 unsigned cap_v_cpu16 : 1; 00108 unsigned cap_v_cpu17 : 1; 00109 unsigned cap_v_cpu18 : 1; 00110 unsigned cap_v_cpu19 : 1; 00111 unsigned cap_v_cpu20 : 1; 00112 unsigned cap_v_cpu21 : 1; 00113 unsigned cap_v_cpu22 : 1; 00114 unsigned cap_v_cpu23 : 1; 00115 unsigned cap_v_cpu24 : 1; 00116 unsigned cap_v_cpu25 : 1; 00117 unsigned cap_v_cpu26 : 1; 00118 unsigned cap_v_cpu27 : 1; 00119 unsigned cap_v_cpu28 : 1; 00120 unsigned cap_v_cpu29 : 1; 00121 unsigned cap_v_cpu30 : 1; 00122 unsigned cap_v_cpu31 : 1; 00123 }; 00124 }; 00125 }; 00126 00127 #define CAP_M_IMPLICIT_AFFINITY_CLEAR 0x1 00128 #define CAP_M_IMPLICIT_AFFINITY_SET 0x2 00129 #define CAP_M_IMPLICIT_DEFAULT_ONLY 0x4 00130 #define CAP_M_IMPLICIT_ALL_THREADS 0x8 00131 00132 struct _imp_flags { 00133 struct { 00134 unsigned cap_v_implicit_affinity_clear : 1; 00135 unsigned cap_v_implicit_affinity_set : 1; 00136 unsigned cap_v_implicit_default_only : 1; 00137 unsigned cap_v_implicit_all_threads : 1; 00138 unsigned cap_v_fill_62_ : 4; 00139 }; 00140 }; 00141 00142 #define CAP_M_FLAG_CHECK_CPU 0x1 00143 #define CAP_M_FLAG_PERMANENT 0x2 00144 #define CAP_M_FLAG_CHECK_CPU_ACTIVE 0x8 00145 #define CAP_M_FLAG_DEFAULT_ONLY 0x10 00146 #define CAP_M_ALL_THREADS 0x20 00147 #define CAP_M_PURGE_WS_IF_NEW_RAD 0x40 00148 00149 struct _cap_flags { 00150 struct { 00151 unsigned cap_v_flag_check_cpu : 1; 00152 unsigned cap_v_flag_permanent : 1; 00153 unsigned cap_v_reserved1 : 1; 00154 unsigned cap_v_flag_check_cpu_active: 1; 00155 unsigned cap_v_flag_default_only : 1; 00156 unsigned cap_v_all_threads : 1; 00157 unsigned cap_v_purge_ws_if_new_rad : 1; 00158 unsigned cap_v_fill_63_ : 1; 00159 }; 00160 }; 00161 00162 #endif 00163 00164