Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
typedef struct Msg Msg;
2
struct Msg
3
{
4
	Msg *link;
5
	uchar *rp;
6
	uchar *ep;
7
};
8
 
9
typedef struct Client Client;
10
struct Client
11
{
12
	int moribund;
13
	int activethread;
14
	int num;
15
	int ref;
16
	int status;
17
	int pid;
18
	char *cmd;
19
	int fd[2];
20
	char err[ERRMAX];
21
 
22
	Req *execreq;
23
	Channel *execpid;
24
 
25
	Req *rq, **erq;		/* reading */
26
	Msg *mq, **emq;
27
	Ioproc *readerproc;
28
 
29
	Channel *writerkick;
30
	Req *wq, **ewq;	/* writing */
31
	Req *curw;		/* currently writing */
32
	Ioproc *writerproc;	/* writing */
33
};
34
extern int nclient;
35
extern Client **client;
36
extern void dataread(Req*, Client*);
37
extern int newclient(void);
38
extern void closeclient(Client*);
39
extern void datawrite(Req*, Client*);
40
extern void ctlwrite(Req*, Client*);
41
extern void clientflush(Req*, Client*);
42
 
43
#define emalloc emalloc9p
44
#define estrdup estrdup9p
45
#define erealloc erealloc9p
46
 
47
extern Srv fs;
48
extern void initfs(void);
49
extern void setexecname(char*);
50
 
51
enum
52
{
53
	STACK = 8192,
54
};
55
 
56
enum	/* Client.status */
57
{
58
	Closed,
59
	Exec,
60
	Established,
61
	Hangup,
62
};
63