@@ -6,6 +6,7 @@ pub type ino_t = ::c_ulong;
6
6
pub type shmatt_t = :: c_uint ;
7
7
pub type kpaddr_t = u64 ;
8
8
pub type kssize_t = i64 ;
9
+ pub type domainset_t = __c_anonymous_domainset ;
9
10
10
11
s ! {
11
12
pub struct shmid_ds {
49
50
pub kp_offset: :: off_t,
50
51
pub kp_len: :: size_t,
51
52
}
53
+
54
+ pub struct __c_anonymous_domainset {
55
+ _priv: [ :: uintptr_t; 4 ] ,
56
+ }
52
57
}
53
58
54
59
s_no_extra_traits ! {
@@ -222,6 +227,13 @@ pub const KF_TYPE_EVENTFD: ::c_int = 13;
222
227
pub const SPECNAMELEN : :: c_int = 255 ;
223
228
pub const KI_NSPARE_PTR : usize = 5 ;
224
229
230
+ /// domainset policies
231
+ pub const DOMAINSET_POLICY_INVALID : :: c_int = 0 ;
232
+ pub const DOMAINSET_POLICY_ROUNDROBIN : :: c_int = 1 ;
233
+ pub const DOMAINSET_POLICY_FIRSTTOUCH : :: c_int = 2 ;
234
+ pub const DOMAINSET_POLICY_PREFER : :: c_int = 3 ;
235
+ pub const DOMAINSET_POLICY_INTERLEAVE : :: c_int = 4 ;
236
+
225
237
f ! {
226
238
pub fn SOCKCRED2SIZE ( ngrps: usize ) -> usize {
227
239
let ngrps = if ngrps > 0 {
@@ -261,6 +273,23 @@ extern "C" {
261
273
pub fn setproctitle_fast ( fmt : * const :: c_char , ...) ;
262
274
pub fn timingsafe_bcmp ( a : * const :: c_void , b : * const :: c_void , len : :: size_t ) -> :: c_int ;
263
275
pub fn timingsafe_memcmp ( a : * const :: c_void , b : * const :: c_void , len : :: size_t ) -> :: c_int ;
276
+
277
+ pub fn cpuset_getdomain (
278
+ level : :: cpulevel_t ,
279
+ which : :: cpuwhich_t ,
280
+ id : :: id_t ,
281
+ setsize : :: size_t ,
282
+ mask : * mut :: domainset_t ,
283
+ policy : * mut :: c_int ,
284
+ ) -> :: c_int ;
285
+ pub fn cpuset_setdomain (
286
+ level : :: cpulevel_t ,
287
+ which : :: cpuwhich_t ,
288
+ id : :: id_t ,
289
+ setsize : :: size_t ,
290
+ mask : * const :: domainset_t ,
291
+ policy : :: c_int ,
292
+ ) -> :: c_int ;
264
293
}
265
294
266
295
#[ link( name = "kvm" ) ]
0 commit comments