about summary refs log tree commit diff
path: root/sami.h
blob: fdab71c63d22d5ce092fc5706278179149fbc9f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef __SAMI_H__
#define __SAMI_H__

#include <stddef.h>
#include <unistd.h>


struct SAMI
{
	int fd;
	pid_t pid;
};
typedef struct SAMI SAMI;

typedef int SAMI_Handler(const SAMI *sender, void *message, size_t length);

int SAMI_make(SAMI *actor, SAMI_Handler *handler);
int SAMI_send(SAMI *actor, void *buf, size_t length);
int SAMI_kill(SAMI *actor);
SAMI *SAMI_parent(void);

#endif /* __SAMI_H__ */