Skip to content

Commit 46f5119

Browse files
committed
Define the C interface to vxWorks for x86, x86_64, ARM, ARM 64-bit, PowerPC, PowerPC SPE and PowerPC 64-bit.
1 parent 97c35cd commit 46f5119

File tree

10 files changed

+1564
-1421
lines changed

10 files changed

+1564
-1421
lines changed

ci/build.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,13 @@ x86_64-unknown-haiku \
215215
x86_64-unknown-hermit \
216216
x86_64-unknown-l4re-uclibc \
217217
x86_64-unknown-openbsd \
218+
armv7-wrs-vxworks \
219+
aarch64-wrs-vxworks \
220+
i686-wrs-vxworks \
221+
x86_64-wrs-vxworks \
222+
powerpc-wrs-vxworks \
223+
powerpc-wrs-vxworks-spe \
224+
powerpc64-wrs-vxworks \
218225
"
219226

220227
if [ "${RUST}" = "nightly" ] && [ "${OS}" = "linux" ]; then

src/vxworks/aarch64.rs

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,3 @@
1+
pub type c_char = u8;
12
pub type c_long = i64;
23
pub type c_ulong = u64;
3-
4-
#[cfg(feature = "_WRS_KERNEL")]
5-
pub type _Vx_TASK_ID = *mut ::windTcb;
6-
7-
#[cfg(feature = "_WRS_KERNEL")]
8-
s! {
9-
pub struct OBJ_CORE {
10-
pub handle : ::HANDLE,
11-
pub ownerList : ::DL_LIST,
12-
pub ownerNode : ::DL_NODE,
13-
pub classNode : ::DL_NODE,
14-
pub ownerId : *mut ::OBJ_CORE,
15-
pub ownerRtpId : ::RTP_ID,
16-
pub name : *mut ::c_char,
17-
pub pObjClass : *mut ::wind_class,
18-
pub objHandleList : ::DL_LIST,
19-
pub refCnt : u16,
20-
pub accessCnt : u16,
21-
pub padding : u32, // There is a chance that Rust automatically pads, but
22-
// no point in risking it
23-
}
24-
25-
// semLibP.h
26-
pub struct semaphore {
27-
#[repr(align(16))]
28-
pub magic : ::OBJ_CORE,
29-
pub semType : u8,
30-
pub options : u8,
31-
pub recurse : u16,
32-
pub priInheritFlag : ::BOOL,
33-
pub qHead : ::Q_HEAD,
34-
pub state : ::size_t, //state is union of UINT and struct pointer
35-
pub events : ::EVENTS_RSRC,
36-
}
37-
38-
}

src/vxworks/arm.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub type c_char = u8;
2+
pub type c_long = i32;
3+
pub type c_ulong = u32;

src/vxworks/armv7.rs

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,2 @@
11
pub type c_long = i32;
22
pub type c_ulong = u32;
3-
4-
#[cfg(feature = "_WRS_KERNEL")]
5-
pub type _Vx_TASK_ID = ::c_int;
6-
7-
#[cfg(feature = "_WRS_KERNEL")]
8-
s! {
9-
pub struct OBJ_CORE {
10-
pub handle : ::HANDLE,
11-
pub ownerList : ::DL_LIST,
12-
pub ownerNode : ::DL_NODE,
13-
pub classNode : ::DL_NODE,
14-
pub ownerId : *mut ::OBJ_CORE,
15-
pub ownerRtpId : ::RTP_ID,
16-
pub name : *mut ::c_char,
17-
pub pObjClass : *mut ::wind_class,
18-
pub objHandleList : ::DL_LIST,
19-
pub refCnt : u16,
20-
pub accessCnt : u16,
21-
}
22-
23-
// semLibP.h
24-
pub struct semaphore {
25-
#[repr(align(8))]
26-
pub magic : ::OBJ_CORE,
27-
pub semType : u8,
28-
pub options : u8,
29-
pub recurse : u16,
30-
pub priInheritFlag : ::BOOL,
31-
pub qHead : ::Q_HEAD,
32-
pub state : ::size_t, //state is union of UINT and struct pointer
33-
pub events : ::EVENTS_RSRC,
34-
}
35-
}

src/vxworks/armv7le.rs

Whitespace-only changes.

0 commit comments

Comments
 (0)