diff options
| author | rsc <devnull@localhost> | 2004-05-11 17:51:27 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2004-05-11 17:51:27 +0000 |
| commit | c4097c29512269f4547ebefb8abdc57a2892b479 (patch) | |
| tree | e84c61a845b196bfa903088e15b772ae0b16c8bb /src/libthread/386.c | |
| parent | 2f2df5e02ef22c9727ae2b8269d5c76a061d296f (diff) | |
| download | plan9port-c4097c29512269f4547ebefb8abdc57a2892b479.tar.gz plan9port-c4097c29512269f4547ebefb8abdc57a2892b479.zip | |
Fix small bugs.
Diffstat (limited to 'src/libthread/386.c')
| -rw-r--r-- | src/libthread/386.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/libthread/386.c b/src/libthread/386.c index d8052f09..2c611e45 100644 --- a/src/libthread/386.c +++ b/src/libthread/386.c @@ -15,7 +15,7 @@ launcher386(void (*f)(void *arg), void *arg) p = _threadgetproc(); t = p->thread; - _threadstacklimit(t->stk); + _threadstacklimit(t->stk, t->stk+t->stksize); (*f)(arg); threadexits(nil); @@ -39,18 +39,19 @@ _threadinswitch(int enter) USED(enter); #ifdef USEVALGRIND if(enter) - VALGRIND_SET_STACK_LIMIT(0, 0, 1); - else VALGRIND_SET_STACK_LIMIT(0, 0, 0); + else + VALGRIND_SET_STACK_LIMIT(0, 0, 1); #endif } void -_threadstacklimit(void *addr) +_threadstacklimit(void *bottom, void *top) { - USED(addr); + USED(bottom); + USED(top); #ifdef USEVALGRIND - VALGRIND_SET_STACK_LIMIT(1, addr, 0); + VALGRIND_SET_STACK_LIMIT(1, bottom, top); #endif } |
