1
- //! Definitions for l4re- uclibc on 64bit systems
2
-
1
+ //! Definitions for uclibc on 64bit systems
2
+ //!
3
3
pub type blkcnt_t = i64 ;
4
4
pub type blksize_t = i64 ;
5
5
pub type clock_t = i64 ;
@@ -22,12 +22,6 @@ pub type wchar_t = ::c_int;
22
22
//pub type d_ino = ::c_ulong;
23
23
pub type nfds_t = :: c_ulong ;
24
24
25
- // L4Re specifics
26
- // Some of these aren't actually part of the libc, but of l4sys, but since libc
27
- // depends on l4sys on this platform, we should dump the few important
28
- // definitions here.
29
- pub type l4_umword_t = :: c_ulong ; // Unsigned machine word.
30
-
31
25
s ! {
32
26
pub struct dirent {
33
27
pub d_ino: :: ino64_t,
59
53
__unused2: :: c_ulong
60
54
}
61
55
62
- /// CPU sets.
63
- pub struct l4_sched_cpu_set_t {
64
- // from the L4Re docs
65
- /// Combination of granularity and offset.
66
- ///
67
- /// The granularity defines how many CPUs each bit in map describes.
68
- /// The offset is the numer of the first CPU described by the first
69
- /// bit in the bitmap.
70
- /// offset must be a multiple of 2^graularity.
71
- ///
72
- /// | MSB | LSB |
73
- /// | ---------------- | ------------------- |
74
- /// | 8bit granularity | 24bit offset .. |
75
- gran_offset: l4_umword_t ,
76
- /// Bitmap of CPUs.
77
- map: l4_umword_t ,
78
- }
79
-
56
+ #[ cfg( not( target_os = "l4re" ) ) ]
80
57
pub struct pthread_attr_t {
81
58
__detachstate: :: c_int,
82
59
__schedpolicy: :: c_int,
87
64
__stackaddr_set: :: c_int,
88
65
__stackaddr: * mut :: c_void, // better don't use it
89
66
__stacksize: :: size_t,
90
- // L4Re specifics
91
- affinity: l4_sched_cpu_set_t,
92
- create_flags: :: c_uint,
93
67
}
94
68
95
69
pub struct __sched_param {
@@ -399,7 +373,7 @@ pub const O_EXCL: ::c_int = 0200;
399
373
pub const O_NONBLOCK : :: c_int = 04000 ;
400
374
pub const O_TRUNC : :: c_int = 01000 ;
401
375
pub const NCCS : usize = 32 ;
402
- pub const PTHREAD_STACK_MIN : :: c_int = 16384 ;
376
+ pub const PTHREAD_STACK_MIN : usize = 16384 ;
403
377
pub const SIG_SETMASK : :: c_int = 2 ; // Set the set of blocked signals
404
378
pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40 ;
405
379
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4 ;
@@ -415,3 +389,11 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56;
415
389
extern {
416
390
pub fn memalign ( align : :: size_t , size : :: size_t ) -> * mut :: c_void ;
417
391
}
392
+
393
+ cfg_if ! {
394
+ if #[ cfg( target_os = "l4re" ) ] {
395
+ mod l4re;
396
+ pub use self :: l4re:: * ;
397
+ } else { }
398
+ }
399
+
0 commit comments