diff options
| author | Nakidai <nakidai@disroot.org> | 2025-08-29 04:25:26 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2025-08-29 04:25:26 +0300 |
| commit | 260faf6104c70a72a81b2c9a01253fff56dbac24 (patch) | |
| tree | f7901dc141211005597ec38c2d15c8bf9427d06e /sami.h | |
| download | sami-260faf6104c70a72a81b2c9a01253fff56dbac24.tar.gz sami-260faf6104c70a72a81b2c9a01253fff56dbac24.zip | |
Add code
Diffstat (limited to 'sami.h')
| -rw-r--r-- | sami.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sami.h b/sami.h new file mode 100644 index 0000000..53e5ad8 --- /dev/null +++ b/sami.h @@ -0,0 +1,23 @@ +#ifndef __SAMI_H__ +#define __SAMI_H__ + +#include <stddef.h> +#include <unistd.h> + +extern int SAMI__fd; + +struct SAMI +{ + int fd; + pid_t pid; +}; +typedef struct SAMI SAMI; + +typedef void SAMI_Handler(void *arg); + +int SAMI_make(SAMI *actor, SAMI_Handler *handler, void *arg); +int SAMI_send(SAMI *actor, void *buf, size_t length); +int SAMI_recv(void *buf, size_t length); +int SAMI_kill(SAMI *actor); + +#endif /* __SAMI_H__ */ |