From e13bb426e39b067f1ef2632a4feccb3aacc70f89 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Tue, 5 Apr 2022 12:45:03 +0800 Subject: [PATCH] xous: additional documentation on server errors There are multiple reasons why a process might fail to create a new server. Add notes on why this might be. Signed-off-by: Sean Cross --- xous-rs/src/syscall.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xous-rs/src/syscall.rs b/xous-rs/src/syscall.rs index f62ad34d7..41a69479b 100644 --- a/xous-rs/src/syscall.rs +++ b/xous-rs/src/syscall.rs @@ -1281,7 +1281,9 @@ pub fn claim_interrupt( /// /// # Errors /// -/// * **OutOfMemory**: No more servers may be created +/// * **OutOfMemory**: No more servers may be created because the server +/// count limit has been reached, or the system does not +/// have enough memory for the backing store. /// * **ServerExists**: A server has already registered with that name /// * **InvalidString**: The name was not a valid UTF-8 string pub fn create_server_with_address(name_bytes: &[u8; 16]) -> core::result::Result { @@ -1304,7 +1306,9 @@ pub fn create_server_with_address(name_bytes: &[u8; 16]) -> core::result::Result /// /// # Errors /// -/// * **OutOfMemory**: No more servers may be created +/// * **OutOfMemory**: No more servers may be created because the server +/// count limit has been reached, or the system does not +/// have enough memory for the backing store. /// * **ServerExists**: A server has already registered with that name /// * **InvalidString**: The name was not a valid UTF-8 string pub fn create_server_with_sid(sid: SID) -> core::result::Result { @@ -1326,6 +1330,9 @@ pub fn create_server_with_sid(sid: SID) -> core::result::Result { /// # Errors /// /// * **ServerNotFound**: No more servers may be created +/// * **OutOfMemory**: No more servers may be created because the server +/// count limit has been reached, or the system does not +/// have enough memory for the backing store. pub fn create_server() -> core::result::Result { let result = rsyscall(SysCall::CreateServer)?; if let Result::NewServerID(sid, _cid) = result {