From cb45d7c240f4aabbd1dd716dd8bf7ab5b2107ff2 Mon Sep 17 00:00:00 2001 From: gingold Date: Sun, 18 Dec 2005 14:46:45 +0000 Subject: ghdl 0.21 is out --- translate/grt/config/pthread.c | 21 ++++++++++++--------- translate/grt/config/win32.c | 6 ++++-- 2 files changed, 16 insertions(+), 11 deletions(-) (limited to 'translate/grt/config') diff --git a/translate/grt/config/pthread.c b/translate/grt/config/pthread.c index f611bb6..f0cee39 100644 --- a/translate/grt/config/pthread.c +++ b/translate/grt/config/pthread.c @@ -42,9 +42,9 @@ typedef struct } Stack_Type_t, *Stack_Type; Stack_Type_t main_stack_context; -extern Stack_Type grt_stack_main_stack; +extern void grt_set_main_stack (Stack_Type_t *stack); -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- void grt_stack_init(void) // Initialize the stacks package. // This may adjust stack sizes. @@ -58,10 +58,10 @@ void grt_stack_init(void) // lock the mutex, as we are currently running pthread_mutex_lock(&(main_stack_context.mutex)); - grt_stack_main_stack= &main_stack_context; + grt_set_main_stack (&main_stack_context); } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- static void* grt_stack_loop(void* pv_myStack) { Stack_Type myStack= (Stack_Type)pv_myStack; @@ -84,7 +84,7 @@ static void* grt_stack_loop(void* pv_myStack) return 0; } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- Stack_Type grt_stack_create(void* Func, void* Arg) // Create a new stack, which on first execution will call FUNC with // an argument ARG. @@ -115,7 +115,7 @@ Stack_Type grt_stack_create(void* Func, void* Arg) return newStack; } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- void grt_stack_switch(Stack_Type To, Stack_Type From) // Resume stack TO and save the current context to the stack pointed by // CUR. @@ -134,14 +134,16 @@ void grt_stack_switch(Stack_Type To, Stack_Type From) pthread_mutex_lock(&(From->mutex)); } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- void grt_stack_delete(Stack_Type Stack) // Delete stack STACK, which must not be currently executed. // => procedure Stack_Delete (Stack : Stack_Type); { INFO("grt_stack_delete\n"); } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- + +#ifndef WITH_GNAT_RUN_TIME void __gnat_raise_storage_error(void) { abort (); @@ -151,7 +153,8 @@ void __gnat_raise_program_error(void) { abort (); } +#endif /* WITH_GNAT_RUN_TIME */ -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- // end of file diff --git a/translate/grt/config/win32.c b/translate/grt/config/win32.c index 6c55f7b..80ea270 100644 --- a/translate/grt/config/win32.c +++ b/translate/grt/config/win32.c @@ -148,7 +148,8 @@ void grt_stack_delete(Stack_Type Stack) { INFO("grt_stack_delete\n"); } -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- +#ifndef WITH_GNAT_RUN_TIME void __gnat_raise_storage_error(void) { abort (); @@ -158,7 +159,8 @@ void __gnat_raise_program_error(void) { abort (); } +#endif -//------------------------------------------------------------------------------ +//---------------------------------------------------------------------------- // end of file -- cgit