aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-23 22:57:53 +0000
committerrsc <devnull@localhost>2005-01-23 22:57:53 +0000
commit1fdb4a54500c8bda4cbe262280509f8f98b3bfed (patch)
treed8db3f71d444f3a759a1229f224fb06acb34a35d
parent0753502edfd4f214190883db848593f0033ac74c (diff)
downloadplan9port-1fdb4a54500c8bda4cbe262280509f8f98b3bfed.tar.gz
plan9port-1fdb4a54500c8bda4cbe262280509f8f98b3bfed.tar.bz2
plan9port-1fdb4a54500c8bda4cbe262280509f8f98b3bfed.zip
rename scheduler to have a more distinctive name, so stack traces can end there
-rw-r--r--src/libthread/thread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libthread/thread.c b/src/libthread/thread.c
index 646d2659..cac2d497 100644
--- a/src/libthread/thread.c
+++ b/src/libthread/thread.c
@@ -15,7 +15,7 @@ static void delthread(_Threadlist*, _Thread*);
static void addthreadinproc(Proc*, _Thread*);
static void delthreadinproc(Proc*, _Thread*);
static void contextswitch(Context *from, Context *to);
-static void scheduler(Proc*);
+static void procscheduler(Proc*);
static void
_threaddebug(char *fmt, ...)
@@ -178,7 +178,7 @@ proccreate(void (*fn)(void*), void *arg, uint stack)
p = procalloc();
t = _threadcreate(p, fn, arg, stack);
id = t->id; /* t might be freed after _procstart */
- _procstart(p, scheduler);
+ _procstart(p, procscheduler);
return id;
}
@@ -245,7 +245,7 @@ contextswitch(Context *from, Context *to)
}
static void
-scheduler(Proc *p)
+procscheduler(Proc *p)
{
_Thread *t;
@@ -358,7 +358,7 @@ needstack(int n)
if((char*)&t <= (char*)t->stk
|| (char*)&t - (char*)t->stk < 256+n){
- fprint(2, "thread stack overflow\n");
+ fprint(2, "thread stack overflow: &t=%p tstk=%p n=%d\n", &t, t->stk, 256+n);
abort();
}
}
@@ -580,7 +580,7 @@ main(int argc, char **argv)
if(mainstacksize == 0)
mainstacksize = 256*1024;
_threadcreate(p, threadmainstart, nil, mainstacksize);
- scheduler(p);
+ procscheduler(p);
_threaddaemonize();
_threadpexit();
return 0;