Wants top of stack, not bottom...
authorKevin Klues <klueska@cs.berkeley.edu>
Tue, 1 May 2012 02:43:45 +0000 (19:43 -0700)
committerKevin Klues <klueska@cs.berkeley.edu>
Tue, 1 May 2012 02:43:45 +0000 (19:43 -0700)
user/parlib/include/uthread.h

index fcfe42e..be0c1a1 100644 (file)
@@ -82,7 +82,7 @@ static inline void
 init_uthread_tf(uthread_t *uth, void (*entry)(void),
                 void *stack_bottom, uint32_t size)
 {
-  init_user_tf(&uth->utf, (long)entry, (long)(stack_bottom));
+  init_user_tf(&uth->utf, (long)entry, (long)(stack_bottom) + size);
 }
 
 #define uthread_set_tls_var(uthread, name, val)                          \