Endpoint syscalls implemented
This commit is contained in:
parent
69501bfe01
commit
c064af5fa7
27 changed files with 391 additions and 42 deletions
|
|
@ -6,9 +6,18 @@ glcr::ErrorOr<EndpointServer> EndpointServer::Create() {
|
|||
return EndpointServer(cap);
|
||||
}
|
||||
|
||||
EndpointServer EndpointServer::Adopt(z_cap_t endpoint_cap) {
|
||||
return EndpointServer(endpoint_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);
|
||||
}
|
||||
|
||||
glcr::ErrorCode EndpointServer::Recieve(uint64_t* num_bytes, void* data,
|
||||
z_cap_t* reply_port_cap) {
|
||||
return ZEndpointRecv(endpoint_cap_, num_bytes, data, reply_port_cap);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue