Skip to content

Commit 7833bf8

Browse files
SpriteOvOJohnTitor
authored andcommitted
Add pthread mutex initializer constants for riscv64
1 parent c9f2d1d commit 7833bf8

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

libc-test/semver/linux-riscv64gc.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ NFT_MSG_DELOBJ
3030
NFT_MSG_GETOBJ
3131
NFT_MSG_GETOBJ_RESET
3232
NFT_MSG_NEWOBJ
33+
PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
34+
PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP
35+
PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
3336
SCM_TIMESTAMPNS
3437
SCM_WIFI_STATUS
3538
SIGSTKFLT

src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use crate::prelude::*;
44
use crate::{
55
off64_t,
66
off_t,
7+
pthread_mutex_t,
78
};
89

910
pub type wchar_t = c_int;
@@ -293,6 +294,49 @@ s_no_extra_traits! {
293294
}
294295
}
295296

297+
#[cfg(target_endian = "little")]
298+
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
299+
size: [
300+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
301+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
302+
],
303+
};
304+
#[cfg(target_endian = "little")]
305+
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
306+
size: [
307+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
308+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
309+
],
310+
};
311+
#[cfg(target_endian = "little")]
312+
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
313+
size: [
314+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
315+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
316+
],
317+
};
318+
#[cfg(target_endian = "big")]
319+
pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
320+
size: [
321+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
322+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
323+
],
324+
};
325+
#[cfg(target_endian = "big")]
326+
pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
327+
size: [
328+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
329+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
330+
],
331+
};
332+
#[cfg(target_endian = "big")]
333+
pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: pthread_mutex_t = pthread_mutex_t {
334+
size: [
335+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
336+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
337+
],
338+
};
339+
296340
pub const POSIX_FADV_DONTNEED: c_int = 4;
297341
pub const POSIX_FADV_NOREUSE: c_int = 5;
298342
pub const VEOF: usize = 4;

0 commit comments

Comments
 (0)