@@ -3158,42 +3158,6 @@ f! {
3158
3158
}
3159
3159
}
3160
3160
3161
- pub fn WIFSTOPPED ( status: :: c_int) -> bool {
3162
- ( status & 0xff ) == 0x7f
3163
- }
3164
-
3165
- pub fn WSTOPSIG ( status: :: c_int) -> :: c_int {
3166
- ( status >> 8 ) & 0xff
3167
- }
3168
-
3169
- pub fn WIFCONTINUED ( status: :: c_int) -> bool {
3170
- status == 0xffff
3171
- }
3172
-
3173
- pub fn WIFSIGNALED ( status: :: c_int) -> bool {
3174
- ( ( status & 0x7f ) + 1 ) as i8 >= 2
3175
- }
3176
-
3177
- pub fn WTERMSIG ( status: :: c_int) -> :: c_int {
3178
- status & 0x7f
3179
- }
3180
-
3181
- pub fn WIFEXITED ( status: :: c_int) -> bool {
3182
- ( status & 0x7f ) == 0
3183
- }
3184
-
3185
- pub fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
3186
- ( status >> 8 ) & 0xff
3187
- }
3188
-
3189
- pub fn WCOREDUMP ( status: :: c_int) -> bool {
3190
- ( status & 0x80 ) != 0
3191
- }
3192
-
3193
- pub fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
3194
- ( cmd << 8 ) | ( type_ & 0x00ff )
3195
- }
3196
-
3197
3161
pub fn CPU_ZERO ( cpuset: & mut cpu_set_t) -> ( ) {
3198
3162
for slot in cpuset. bits. iter_mut( ) {
3199
3163
* slot = 0 ;
@@ -3291,6 +3255,44 @@ f! {
3291
3255
}
3292
3256
}
3293
3257
3258
+ safe_f ! {
3259
+ pub { const } fn WIFSTOPPED ( status: :: c_int) -> bool {
3260
+ ( status & 0xff ) == 0x7f
3261
+ }
3262
+
3263
+ pub { const } fn WSTOPSIG ( status: :: c_int) -> :: c_int {
3264
+ ( status >> 8 ) & 0xff
3265
+ }
3266
+
3267
+ pub { const } fn WIFCONTINUED ( status: :: c_int) -> bool {
3268
+ status == 0xffff
3269
+ }
3270
+
3271
+ pub { const } fn WIFSIGNALED ( status: :: c_int) -> bool {
3272
+ ( ( status & 0x7f ) + 1 ) as i8 >= 2
3273
+ }
3274
+
3275
+ pub { const } fn WTERMSIG ( status: :: c_int) -> :: c_int {
3276
+ status & 0x7f
3277
+ }
3278
+
3279
+ pub { const } fn WIFEXITED ( status: :: c_int) -> bool {
3280
+ ( status & 0x7f ) == 0
3281
+ }
3282
+
3283
+ pub { const } fn WEXITSTATUS ( status: :: c_int) -> :: c_int {
3284
+ ( status >> 8 ) & 0xff
3285
+ }
3286
+
3287
+ pub { const } fn WCOREDUMP ( status: :: c_int) -> bool {
3288
+ ( status & 0x80 ) != 0
3289
+ }
3290
+
3291
+ pub { const } fn QCMD ( cmd: :: c_int, type_: :: c_int) -> :: c_int {
3292
+ ( cmd << 8 ) | ( type_ & 0x00ff )
3293
+ }
3294
+ }
3295
+
3294
3296
fn __CMSG_LEN ( cmsg : * const cmsghdr ) -> :: ssize_t {
3295
3297
( ( unsafe { ( * cmsg) . cmsg_len as :: size_t } + :: mem:: size_of :: < :: c_long > ( )
3296
3298
- 1 )
@@ -3302,9 +3304,8 @@ fn __CMSG_NEXT(cmsg: *const cmsghdr) -> *mut c_uchar {
3302
3304
}
3303
3305
3304
3306
fn __MHDR_END ( mhdr : * const msghdr ) -> * mut c_uchar {
3305
- unsafe {
3306
- ( * mhdr) . msg_control . offset ( ( * mhdr) . msg_controllen as isize )
3307
- } . cast ( )
3307
+ unsafe { ( * mhdr) . msg_control . offset ( ( * mhdr) . msg_controllen as isize ) }
3308
+ . cast ( )
3308
3309
}
3309
3310
3310
3311
// EXTERN_FN
0 commit comments