X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fx86-win32-os.c;h=0b15ad260f7dbc9e029a68992da4da3ef374ba00;hb=4f8f4b25cb564509437d8fc26038143150077f14;hp=c07d1db982d3ad4490402459fa0e2ee33cb5b604;hpb=3df286f570d93bceaf806d125ffcd276f7ae26b8;p=sbcl.git diff --git a/src/runtime/x86-win32-os.c b/src/runtime/x86-win32-os.c index c07d1db..0b15ad2 100644 --- a/src/runtime/x86-win32-os.c +++ b/src/runtime/x86-win32-os.c @@ -44,44 +44,44 @@ size_t os_vm_page_size; int arch_os_thread_init(struct thread *thread) { { - void *top_exception_frame; + void *top_exception_frame; void *cur_stack_end; - void *cur_stack_start; + void *cur_stack_start; asm volatile ("movl %%fs:0,%0": "=r" (top_exception_frame)); asm volatile ("movl %%fs:4,%0": "=r" (cur_stack_end)); - /* - * Can't pull stack start from fs:4 or fs:8 or whatever, - * because that's only what currently has memory behind - * it from being used. Our basic options are to know, - * a priori, what the stack size is (1 meg by default) - * or to grub the default size out of the executable - * header in memory by means of hardcoded addresses and - * offsets. - * - * We'll just assume it's 1 megabyte. Easiest that way. - */ - cur_stack_start = cur_stack_end - 0x100000; - - /* - * We use top_exception_frame rather than cur_stack_end - * to elide the last few (boring) stack entries at the - * bottom of the backtrace. - */ - thread->control_stack_start = cur_stack_start; + /* + * Can't pull stack start from fs:4 or fs:8 or whatever, + * because that's only what currently has memory behind + * it from being used. Our basic options are to know, + * a priori, what the stack size is (1 meg by default) + * or to grub the default size out of the executable + * header in memory by means of hardcoded addresses and + * offsets. + * + * We'll just assume it's 1 megabyte. Easiest that way. + */ + cur_stack_start = cur_stack_end - 0x100000; + + /* + * We use top_exception_frame rather than cur_stack_end + * to elide the last few (boring) stack entries at the + * bottom of the backtrace. + */ + thread->control_stack_start = cur_stack_start; thread->control_stack_end = top_exception_frame; #ifndef LISP_FEATURE_SB_THREAD - /* - * Theoretically, threaded SBCL binds directly against - * the thread structure for these values. We don't do - * threads yet, but we'll probably do the same. We do - * need to reset these, though, because they were - * initialized based on the wrong stack space. - */ - SetSymbolValue(CONTROL_STACK_START,(lispobj)thread->control_stack_start,thread); - SetSymbolValue(CONTROL_STACK_END,(lispobj)thread->control_stack_end,thread); + /* + * Theoretically, threaded SBCL binds directly against + * the thread structure for these values. We don't do + * threads yet, but we'll probably do the same. We do + * need to reset these, though, because they were + * initialized based on the wrong stack space. + */ + SetSymbolValue(CONTROL_STACK_START,(lispobj)thread->control_stack_start,thread); + SetSymbolValue(CONTROL_STACK_END,(lispobj)thread->control_stack_end,thread); #endif }