gc stack moved to unlimited main stack
[cacao.git] / alpha / threads.h
index c2b8e86a0f48c322d239b3640e6e7d09567eadcf..52ad08b7b6383c0fa2b95700fc7e804b2ab4d314 100644 (file)
 
 #include "../threads/thread.h"
 
-void perform_alpha_threadswitch (u1 **from, u1 **to);
+void perform_alpha_threadswitch (u1 **from, u1 **to, u1 **stackTop);
 u1* initialize_thread_stack (void *func, u1 *stack);
-u1* used_stack_top (void);
+void asm_switchstackandcall (void *stack, void *func);
 
-#define        THREADSTACKSIZE         (64 * 1024)
+#define        THREADSTACKSIZE         (32 * 1024)
 
 #define        THREADSWITCH(to, from)     perform_alpha_threadswitch(&(from)->restorePoint,\
-                                                              &(to)->restorePoint)
+                                                              &(to)->restorePoint, &(from)->usedStackTop)
 
 #define THREADINIT(to, func)       (to)->restorePoint = \
                                      initialize_thread_stack((u1*)(func), \
                                                              (to)->stackEnd)
 
-#define USEDSTACKTOP(top)          (top) = used_stack_top()
-
 #define        THREADINFO(ee)                                          \
                do {                                            \
                        (ee)->restorePoint = 0;                 \