mirror of
https://github.com/AmbiML/sparrow-kata-full.git
synced 2025-08-17 12:46:59 +00:00
Merge "sel4-sys: make seL4_GetCapReceivePath more Rust-friendly"
GitOrigin-RevId: 8a14f93d1f13718784e8377056d50377187f2343
This commit is contained in:
parent
c24f1fc9d7
commit
3e37996648
@ -183,23 +183,11 @@ pub unsafe fn seL4_SetCap(index: usize, cptr: seL4_CPtr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn seL4_GetCapReceivePath(
|
pub unsafe fn seL4_GetCapReceivePath() -> (seL4_CPtr, seL4_CPtr, seL4_CPtr) {
|
||||||
receiveCNode: *mut seL4_CPtr,
|
|
||||||
receiveIndex: *mut seL4_CPtr,
|
|
||||||
receiveDepth: *mut seL4_Word,
|
|
||||||
) {
|
|
||||||
let ipcbuffer = seL4_GetIPCBuffer();
|
let ipcbuffer = seL4_GetIPCBuffer();
|
||||||
if !receiveCNode.is_null() {
|
((*ipcbuffer).receiveCNode,
|
||||||
*receiveCNode = (*ipcbuffer).receiveCNode;
|
(*ipcbuffer).receiveIndex,
|
||||||
}
|
(*ipcbuffer).receiveDepth)
|
||||||
|
|
||||||
if !receiveIndex.is_null() {
|
|
||||||
*receiveIndex = (*ipcbuffer).receiveIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
if !receiveDepth.is_null() {
|
|
||||||
*receiveDepth = (*ipcbuffer).receiveDepth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -172,23 +172,11 @@ pub unsafe fn seL4_SetCap(index: usize, cptr: seL4_CPtr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn seL4_GetCapReceivePath(
|
pub unsafe fn seL4_GetCapReceivePath() -> (seL4_CPtr, seL4_CPtr, seL4_CPtr) {
|
||||||
receiveCNode: *mut seL4_CPtr,
|
|
||||||
receiveIndex: *mut seL4_CPtr,
|
|
||||||
receiveDepth: *mut seL4_Word,
|
|
||||||
) {
|
|
||||||
let ipcbuffer = seL4_GetIPCBuffer();
|
let ipcbuffer = seL4_GetIPCBuffer();
|
||||||
if !receiveCNode.is_null() {
|
((*ipcbuffer).receiveCNode,
|
||||||
*receiveCNode = (*ipcbuffer).receiveCNode;
|
(*ipcbuffer).receiveIndex,
|
||||||
}
|
(*ipcbuffer).receiveDepth)
|
||||||
|
|
||||||
if !receiveIndex.is_null() {
|
|
||||||
*receiveIndex = (*ipcbuffer).receiveIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
if !receiveDepth.is_null() {
|
|
||||||
*receiveDepth = (*ipcbuffer).receiveDepth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -196,21 +196,11 @@ pub unsafe fn seL4_SetCap(index: usize, cptr: seL4_CPtr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn seL4_GetCapReceivePath(
|
pub unsafe fn seL4_GetCapReceivePath() -> (seL4_CPtr, seL4_CPtr, seL4_CPtr) {
|
||||||
receiveCNode: *mut seL4_CPtr,
|
|
||||||
receiveIndex: *mut seL4_CPtr,
|
|
||||||
receiveDepth: *mut seL4_Word,
|
|
||||||
) {
|
|
||||||
let ipcbuffer = seL4_GetIPCBuffer();
|
let ipcbuffer = seL4_GetIPCBuffer();
|
||||||
if !receiveCNode.is_null() {
|
((*ipcbuffer).receiveCNode,
|
||||||
*receiveCNode = (*ipcbuffer).receiveCNode;
|
(*ipcbuffer).receiveIndex,
|
||||||
}
|
(*ipcbuffer).receiveDepth)
|
||||||
if !receiveIndex.is_null() {
|
|
||||||
*receiveIndex = (*ipcbuffer).receiveIndex;
|
|
||||||
}
|
|
||||||
if !receiveDepth.is_null() {
|
|
||||||
*receiveDepth = (*ipcbuffer).receiveDepth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
@ -267,21 +267,11 @@ pub unsafe fn seL4_SetCap(index: usize, cptr: seL4_CPtr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
pub unsafe fn seL4_GetCapReceivePath(
|
pub unsafe fn seL4_GetCapReceivePath() -> (seL4_CPtr, seL4_CPtr, seL4_CPtr) {
|
||||||
receiveCNode: *mut seL4_CPtr,
|
|
||||||
receiveIndex: *mut seL4_CPtr,
|
|
||||||
receiveDepth: *mut seL4_Word,
|
|
||||||
) {
|
|
||||||
let ipcbuffer = seL4_GetIPCBuffer();
|
let ipcbuffer = seL4_GetIPCBuffer();
|
||||||
if !receiveCNode.is_null() {
|
((*ipcbuffer).receiveCNode,
|
||||||
*receiveCNode = (*ipcbuffer).receiveCNode;
|
(*ipcbuffer).receiveIndex,
|
||||||
}
|
(*ipcbuffer).receiveDepth)
|
||||||
if !receiveIndex.is_null() {
|
|
||||||
*receiveIndex = (*ipcbuffer).receiveIndex;
|
|
||||||
}
|
|
||||||
if !receiveDepth.is_null() {
|
|
||||||
*receiveDepth = (*ipcbuffer).receiveDepth;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
|
Loading…
Reference in New Issue
Block a user