Merge branch 'main' of github.com:betrusted-io/xous-core into main

This commit is contained in:
bunnie 2022-06-01 00:33:09 +08:00
commit 0f755629c0

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);