File system stuff.
This commit is contained in:
parent
e97ceade5e
commit
d3df308747
29 changed files with 3316 additions and 0 deletions
27
src/libmux/thread.c
Normal file
27
src/libmux/thread.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/* Copyright (C) 2003 Russ Cox, Massachusetts Institute of Technology */
|
||||
/* See COPYRIGHT */
|
||||
|
||||
#include <u.h>
|
||||
#include <libc.h>
|
||||
#include <thread.h>
|
||||
#include <mux.h>
|
||||
|
||||
enum
|
||||
{
|
||||
STACK = 32768
|
||||
};
|
||||
|
||||
void
|
||||
muxthreads(Mux *mux)
|
||||
{
|
||||
proccreate(_muxrecvproc, mux, STACK);
|
||||
qlock(&mux->lk);
|
||||
while(!mux->writeq)
|
||||
rsleep(&mux->rpcfork);
|
||||
qunlock(&mux->lk);
|
||||
proccreate(_muxsendproc, mux, STACK);
|
||||
qlock(&mux->lk);
|
||||
while(!mux->writeq)
|
||||
rsleep(&mux->rpcfork);
|
||||
qunlock(&mux->lk);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue