Commit dc52dd28 authored by Jeremy Soller's avatar Jeremy Soller

Fix init definitions

parent 4b87ab0d
......@@ -562,7 +562,7 @@ enum
pte_cleanup_t _cleanup; \
\
pte_push_cleanup( &_cleanup, (pte_cleanup_callback_t) (_rout), (_arg) ); \
#define pthread_cleanup_pop( _execute ) \
(void) pte_pop_cleanup( _execute ); \
}
......@@ -666,7 +666,7 @@ extern "C" {
* ===============
*/
int pthread_init (void);
void pthread_init (void);
void pthread_terminate (void);
/*
......
......@@ -46,9 +46,9 @@
#include "pthread.h"
#include "implement.h"
int (*pthread_init_ptr)(void) __attribute__ ((section (".init_array"))) = &pthread_init;
__attribute__((section(".preinit_array"))) typeof(pthread_init) *__pthread_init = pthread_init;
int pthread_init(void)
void pthread_init(void)
{
if (pte_processInitialized)
......@@ -60,7 +60,7 @@ int pthread_init(void)
* since this initialization routine is automatically called only when
* the dll is loaded.
*/
return PTE_TRUE;
return;
}
pte_processInitialized = PTE_TRUE;
......@@ -88,6 +88,5 @@ int pthread_init(void)
pte_osMutexCreate (&pte_spinlock_test_init_lock);
return (pte_processInitialized);
return;
}
......@@ -46,7 +46,7 @@
#include "pthread.h"
#include "implement.h"
void (*pthread_terminate_ptr)(void) __attribute__ ((section (".fini_array"))) = &pthread_terminate;
__attribute__((section(".fini_array"))) typeof(pthread_terminate) *__pthread_terminate = pthread_terminate;
void pthread_terminate(void)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment