add -W to specify window size.

various other little fixes.
This commit is contained in:
rsc 2004-04-29 17:13:24 +00:00
parent 3d72637f9b
commit be36ff6885
36 changed files with 332 additions and 304 deletions

View file

@ -155,6 +155,7 @@ _newproc(void (*f)(void *arg), void *arg, uint stacksize, char *name, int grp, i
else
*_threadpq.tail = p;
_threadpq.tail = &p->next;
if(_threadprocs == 1)
_threadmultiproc();
_threadprocs++;

View file

@ -52,20 +52,20 @@ threadgetgrp(void)
}
void
threadsetname(char *name)
threadsetname(char *fmt, ...)
{
/*
int fd, n;
char buf[128], *s;
*/
Proc *p;
Thread *t;
va_list arg;
p = _threadgetproc();
t = p->thread;
if (t->cmdname)
free(t->cmdname);
t->cmdname = strdup(name);
va_start(arg, fmt);
t->cmdname = vsmprint(fmt, arg);
va_end(fmt);
/* Plan 9 only
if(p->nthreads == 1){
snprint(buf, sizeof buf, "#p/%d/args", getpid());

View file

@ -52,7 +52,7 @@ threadmain(int argc, char **argv)
buffer = atoi(ARGF());
break;
case 'p':
fn=proccreate;
fn = proccreate;
break;
}ARGEND