about summary refs log tree commit diff
path: root/sami.h
diff options
context:
space:
mode:
Diffstat (limited to 'sami.h')
-rw-r--r--sami.h23
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__ */