diff options
author | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-31 04:52:36 +0000 |
---|---|---|
committer | dannysmith <dannysmith@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-07-31 04:52:36 +0000 |
commit | d60af7074658f6109e223ba388627d08401ebcd4 (patch) | |
tree | 80c5f1f071b174114f7b403b765d7a05135d75f9 /boehm-gc | |
parent | f64ee4c48990432a3198c76976e26bd5302c592f (diff) | |
download | gcc-d60af7074658f6109e223ba388627d08401ebcd4.tar.gz |
* include/gc.h (GC_CreateThread): Declare with WINAPI
attribute.
* win32_threads.c (GC_CreateThread): Make definitions consistent
with declaration. Cast &thread_table[i].handle to PHANDLE
in call to DuplicateHandle
(thread_start): Declare as static.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc')
-rw-r--r-- | boehm-gc/ChangeLog | 9 | ||||
-rw-r--r-- | boehm-gc/include/gc.h | 2 | ||||
-rw-r--r-- | boehm-gc/win32_threads.c | 8 |
3 files changed, 14 insertions, 5 deletions
diff --git a/boehm-gc/ChangeLog b/boehm-gc/ChangeLog index 633eef54c16..7e0d9109829 100644 --- a/boehm-gc/ChangeLog +++ b/boehm-gc/ChangeLog @@ -1,3 +1,12 @@ +2003-07-31 Danny Smith <dannysmith@users.sourceforge.net> + + * include/gc.h (GC_CreateThread): Declare with WINAPI + attribute. + * win32_threads.c (GC_CreateThread): Make definitions consistent + with declaration. Cast &thread_table[i].handle to PHANDLE + in call to DuplicateHandle + (thread_start): Declare as static. + 2003-07-30 Andreas Tobler <a.tobler@schweiz.ch> * dyn_load.c: Define __private_extern__ to match Apple's system diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h index d49cd9d60b1..4444e991ff3 100644 --- a/boehm-gc/include/gc.h +++ b/boehm-gc/include/gc.h @@ -895,7 +895,7 @@ extern void GC_thr_init(); /* Needed for Solaris/X86 */ * and does then use DllMain to keep track of thread creations. But new code * should be built to call GC_CreateThread. */ - GC_API HANDLE GC_CreateThread( + GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ); diff --git a/boehm-gc/win32_threads.c b/boehm-gc/win32_threads.c index ff1d06625f8..10cfef9d9eb 100644 --- a/boehm-gc/win32_threads.c +++ b/boehm-gc/win32_threads.c @@ -376,7 +376,7 @@ void GC_get_next_stack(char *start, char **lo, char **hi) /* We register threads from DllMain */ -GC_API HANDLE GC_CreateThread( +GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) @@ -397,9 +397,9 @@ typedef struct { LPVOID param; } thread_args; -DWORD WINAPI thread_start(LPVOID arg); +static DWORD WINAPI thread_start(LPVOID arg); -HANDLE WINAPI GC_CreateThread( +GC_API HANDLE WINAPI GC_CreateThread( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, LPTHREAD_START_ROUTINE lpStartAddress, LPVOID lpParameter, DWORD dwCreationFlags, LPDWORD lpThreadId ) @@ -445,7 +445,7 @@ HANDLE WINAPI GC_CreateThread( if (!DuplicateHandle(GetCurrentProcess(), thread_h, GetCurrentProcess(), - &thread_table[i].handle, + (PHANDLE) &thread_table[i].handle, 0, 0, DUPLICATE_SAME_ACCESS)) { |