still more files

This commit is contained in:
rsc 2004-11-08 16:04:01 +00:00
parent cf4f3eafc6
commit 24f4e66b12
5 changed files with 300 additions and 0 deletions

43
src/libthread/tsignal.c Normal file
View file

@ -0,0 +1,43 @@
#include <u.h>
#include <libc.h>
#include <thread.h>
extern int _threaddebuglevel;
void
usage(void)
{
fprint(2, "usage: tsignal [-[ednf] note]*\n");
threadexitsall("usage");
}
void
threadmain(int argc, char **argv)
{
Channel *c;
char *msg;
ARGBEGIN{
case 'D':
_threaddebuglevel = ~0;
break;
default:
usage();
case 'e':
notifyenable(EARGF(usage()));
break;
case 'd':
notifydisable(EARGF(usage()));
break;
case 'n':
notifyon(EARGF(usage()));
break;
case 'f':
notifyoff(EARGF(usage()));
break;
}ARGEND
c = threadnotechan();
while((msg = recvp(c)) != nil)
print("note: %s\n", msg);
}