+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
* 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 );
/* 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 )
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 )
if (!DuplicateHandle(GetCurrentProcess(),
thread_h,
GetCurrentProcess(),
- &thread_table[i].handle,
+ (PHANDLE) &thread_table[i].handle,
0,
0,
DUPLICATE_SAME_ACCESS)) {