Initial revision

This commit is contained in:
rsc 2003-09-30 17:47:42 +00:00
parent ed7c8e8d02
commit 76193d7cb0
223 changed files with 32479 additions and 0 deletions

18
src/libthread/chanprint.c Normal file
View file

@ -0,0 +1,18 @@
#include "threadimpl.h"
int
chanprint(Channel *c, char *fmt, ...)
{
va_list arg;
char *p;
int n;
va_start(arg, fmt);
p = vsmprint(fmt, arg);
va_end(arg);
if(p == nil)
sysfatal("vsmprint failed: %r");
n = sendp(c, p);
yield(); /* let recipient handle message immediately */
return n;
}