xous: add a small comment to nameserver

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2022-05-31 14:51:21 +08:00 committed by nworbnhoj
parent f620296a94
commit b1ff16dee7

View file

@ -53,6 +53,7 @@ impl ConnectRequest {
}
}
/// Request a connection to the nameserver-managed `name`.
pub fn connect(name: &str) -> Option<crate::CID> {
let mut request = ConnectRequest::new(name)?;
let ns_cid = nameserver();
@ -96,6 +97,7 @@ pub fn connect(name: &str) -> Option<crate::CID> {
}
}
/// Return the connection ID of the nameserver
pub(crate) fn nameserver() -> crate::CID {
static NAMESERVER_CID: AtomicU32 = AtomicU32::new(0);