X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=libgc%2Fwin32_threads.c;h=5533b8f2e252bf750dba873d24aeecf78b79facd;hb=df03eb3fac273fc8687c26324e45c3a5b4a1bc1b;hp=a2cd0fda43ee3dbd88bf8d15884bc76c1f35c750;hpb=cc9fa96a3163b4ac0b2df0726c72963017d802d6;p=mono.git diff --git a/libgc/win32_threads.c b/libgc/win32_threads.c index a2cd0fda43e..5533b8f2e25 100644 --- a/libgc/win32_threads.c +++ b/libgc/win32_threads.c @@ -85,6 +85,26 @@ int GC_thread_is_registered (void) #endif } +void GC_allow_register_threads (void) +{ + /* No-op for GC pre-v7. */ +} + +int GC_register_my_thread (struct GC_stack_base *sb) +{ +# if defined(GC_DLL) || defined(GC_INSIDE_DLL) + /* Registered by DllMain. */ + return GC_DUPLICATE; +# else + /* TODO: Implement. */ + return GC_UNIMPLEMENTED; +# endif +} + +void GC_register_altstack (void *stack, int stack_size, void *altstack, int altstack_size) +{ +} + /* * This may be called from DllMain, and hence operates under unusual * constraints. @@ -164,7 +184,7 @@ static GC_thread GC_new_thread(void) { #ifdef __GNUC__ __inline__ #endif -LONG GC_get_max_thread_index() +static LONG GC_get_max_thread_index() { LONG my_max = GC_max_thread_index; @@ -385,10 +405,10 @@ void GC_push_all_stacks() # define PUSH4(r1,r2,r3,r4) PUSH2(r1,r2), PUSH2(r3,r4) # if defined(I386) PUSH4(Edi,Esi,Ebx,Edx), PUSH2(Ecx,Eax), PUSH1(Ebp); - sp = (ptr_t)context.Esp; -# elif defined(X86_64) - PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi); - PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15); + sp = (ptr_t)context.Esp; +# elif defined(X86_64) + PUSH4(Rax,Rcx,Rdx,Rbx); PUSH2(Rbp, Rsi); PUSH1(Rdi); + PUSH4(R8, R9, R10, R11); PUSH4(R12, R13, R14, R15); sp = (ptr_t)context.Rsp; # elif defined(ARM32) PUSH4(R0,R1,R2,R3),PUSH4(R4,R5,R6,R7),PUSH4(R8,R9,R10,R11),PUSH1(R12);