[all] Add stub for new Endpoint kernel object
This commit is contained in:
parent
1f7a15eed4
commit
69501bfe01
15 changed files with 144 additions and 38 deletions
14
lib/mammoth/src/endpoint_server.cpp
Normal file
14
lib/mammoth/src/endpoint_server.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#include "mammoth/endpoint_server.h"
|
||||
|
||||
glcr::ErrorOr<EndpointServer> EndpointServer::Create() {
|
||||
uint64_t cap;
|
||||
RET_ERR(ZEndpointCreate(&cap));
|
||||
return EndpointServer(cap);
|
||||
}
|
||||
|
||||
glcr::ErrorOr<EndpointClient> EndpointServer::CreateClient() {
|
||||
uint64_t client_cap;
|
||||
// FIXME: Restrict permissions to send-only here.
|
||||
RET_ERR(ZCapDuplicate(endpoint_cap_, &client_cap));
|
||||
return EndpointClient::AdoptEndpoint(client_cap);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue