File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ mod cpuset_attribs {
87
87
}
88
88
}
89
89
90
- #[ cfg( all( target_arch = "arm" , any ( target_os = "linux" , target_os = "android" ) ) ) ]
90
+ #[ cfg( all( any ( target_arch = "arm" , target_arch = "mips" ) , target_os = "android" ) ) ]
91
91
mod cpuset_attribs {
92
92
use super :: CpuMask ;
93
93
// bionic only supports up to 32 independent CPUs, instead of 1024.
@@ -105,6 +105,22 @@ mod cpuset_attribs {
105
105
}
106
106
}
107
107
108
+ #[ cfg( all( any( target_arch = "arm" , target_arch = "mips" ) , target_os = "linux" ) ) ]
109
+ mod cpuset_attribs {
110
+ use super :: CpuMask ;
111
+ pub const CPU_SETSIZE : usize = 1024 ;
112
+ pub const CPU_MASK_BITS : usize = 32 ;
113
+
114
+ #[ inline]
115
+ pub fn set_cpu_mask_flag ( cur : CpuMask , bit : usize ) -> CpuMask {
116
+ cur | ( 1u32 << bit)
117
+ }
118
+
119
+ #[ inline]
120
+ pub fn clear_cpu_mask_flag ( cur : CpuMask , bit : usize ) -> CpuMask {
121
+ cur & !( 1u32 << bit)
122
+ }
123
+ }
108
124
109
125
pub type CloneCb < ' a > = Box < FnMut ( ) -> isize + ' a > ;
110
126
Original file line number Diff line number Diff line change @@ -44,6 +44,15 @@ mod arch {
44
44
pub static MEMFD_CREATE : Syscall = 385 ;
45
45
}
46
46
47
+ #[ cfg( target_arch = "mips" ) ]
48
+ mod arch {
49
+ use libc:: c_long;
50
+
51
+ pub type Syscall = c_long ;
52
+
53
+ pub static SYSPIVOTROOT : Syscall = 216 ;
54
+ pub static MEMFD_CREATE : Syscall = 354 ;
55
+ }
47
56
48
57
extern {
49
58
pub fn syscall ( num : Syscall , ...) -> c_int ;
You can’t perform that action at this time.
0 commit comments