sel4-sys: fix reference to __sel4_ipc_buffer

Change-Id: I6521cfc2693b949ca2f288ac4465bd5032ecaf26
GitOrigin-RevId: bb9bc2359a57d62d75d250861a0c128218c333f5
This commit is contained in:
Sam Leffler
2021-10-01 20:02:35 +00:00
parent 3f4e3fb7f0
commit 0e3ca70769
2 changed files with 4 additions and 2 deletions

View File

@@ -94,9 +94,10 @@ pub enum seL4_ObjectType {
#[inline(always)] #[inline(always)]
pub unsafe fn seL4_GetIPCBuffer() -> *mut seL4_IPCBuffer { pub unsafe fn seL4_GetIPCBuffer() -> *mut seL4_IPCBuffer {
// Magic external symbol setup by runtime once TLS is primed // Use magic external symbol setup by runtime once TLS is primed
enum c_void {} enum c_void {}
extern "C" { extern "C" {
#[thread_local]
static __sel4_ipc_buffer: *const c_void; static __sel4_ipc_buffer: *const c_void;
} }
__sel4_ipc_buffer as *mut seL4_IPCBuffer __sel4_ipc_buffer as *mut seL4_IPCBuffer

View File

@@ -9,6 +9,7 @@
*/ */
#![no_std] #![no_std]
#![feature(asm)] #![feature(asm)]
#![feature(thread_local)]
#![allow(bad_style, unused_parens, unused_assignments)] #![allow(bad_style, unused_parens, unused_assignments)]
// NB: this mimics the logic in build.rs // NB: this mimics the logic in build.rs
@@ -151,7 +152,7 @@ pub const seL4_MsgMaxLength: usize = 120;
pub const seL4_MsgExtraCapBits: usize = 2; pub const seL4_MsgExtraCapBits: usize = 2;
pub const seL4_MsgMaxExtraCaps: usize = (1usize << seL4_MsgExtraCapBits) - 1; pub const seL4_MsgMaxExtraCaps: usize = (1usize << seL4_MsgExtraCapBits) - 1;
#[derive(Copy)] #[derive(Copy, Debug)]
/// Buffer used to store received IPC messages /// Buffer used to store received IPC messages
pub struct seL4_IPCBuffer { pub struct seL4_IPCBuffer {
/// Message tag /// Message tag