#ifndef __MINITHREAD_MD_H_ #define __MINITHREAD_MD_H_ /* * minithread_md.h: * * Machine dependent routines for the minithread package. * These routines support Alphas running DIGITAL Unix. */ /* * Basic register state that must be saved and restored across * context switches. All other registers (i.e., arguments, temps, etc) * are saved and restored by the compiler. */ typedef struct initial_stack_state { void *initial_proc; /* s0 */ void *initial_arg; /* s1 */ void *body_proc; /* s2 */ void *body_arg; /* s3 */ void *finally_proc; /* s4 */ void *finally_arg; /* s5 */ void *unused1; /* s6 */ void *unused2[8]; /* $f2 - $f9 */ void *unused3; /* gp */ void *root_proc; /* ra */ void *unused4; /* to make the structure quad aligned */ } *initial_stack_state_t; typedef void *stack_pointer_t; #define STACK_GROWS_DOWN 1 #define STACKSIZE (16 * 1024) #define STACKALIGN 07 #define TAS_LENGTH 5 /* 4 instructions in atomic_test_and_set, +1 for slop */ #define INSTR_LENGTH 4 /* 4 bytes per instruction */ #define ADDR_TO_INT(addr) (long long int)(addr) #define MINITHREAD_ROOT (void *) minithread_root #endif /* __MINITHREAD_MD_H_ */