18 lines
906 B
C
18 lines
906 B
C
#ifndef AGILA_PORTS_H
|
|
#define AGILA_PORTS_H
|
|
#include <stdint.h>
|
|
/* Host demonstration ABI v0: single-threaded, trusted caller identities.
|
|
* Not a syscall API. receive requires a valid writable pointer or NULL.
|
|
* A handle is a generation-checked reference, not an unforgeable capability.
|
|
* create returns 0 for invalid owner or exhausted capacity.
|
|
*/
|
|
enum agila_status { AGILA_OK=0, AGILA_INVALID_HANDLE=1, AGILA_DENIED=2,
|
|
AGILA_FULL=3, AGILA_EMPTY=4, AGILA_EXHAUSTED=5, AGILA_INVALID_ARGUMENT=6 };
|
|
uint32_t agila_port_create(uint32_t owner);
|
|
int agila_port_allow_sender(uint32_t handle,uint32_t owner,uint32_t sender);
|
|
int agila_port_revoke_sender(uint32_t handle,uint32_t owner,uint32_t sender);
|
|
int agila_port_send(uint32_t handle,uint32_t caller,uint32_t value);
|
|
int agila_port_receive(uint32_t handle,uint32_t caller,uint32_t *value);
|
|
int agila_port_close(uint32_t handle,uint32_t caller);
|
|
#endif
|