mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
fix prototypes of _beginthread and _beginthreadex
svn path=/trunk/; revision=34649
This commit is contained in:
parent
4e1f4eaa28
commit
533f66b5f7
3 changed files with 8 additions and 6 deletions
|
@ -17,6 +17,8 @@
|
|||
/* Includes a definition of _pid_t and pid_t */
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*
|
||||
* Constants for cwait actions.
|
||||
* Obsolete for Win32.
|
||||
|
@ -92,12 +94,12 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _spawnvpe (int, const char*, const char* con
|
|||
*
|
||||
* NOTE: No old names for these functions. Use the underscore.
|
||||
*/
|
||||
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
|
||||
_CRTIMP uintptr_t __cdecl __MINGW_NOTHROW
|
||||
_beginthread (void (*)(void *), unsigned, void*);
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _endthread (void);
|
||||
|
||||
#ifdef __MSVCRT__
|
||||
_CRTIMP unsigned long __cdecl __MINGW_NOTHROW
|
||||
_CRTIMP uintptr_t __cdecl __MINGW_NOTHROW
|
||||
_beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
|
||||
void*, unsigned, unsigned*);
|
||||
_CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);
|
||||
|
|
|
@ -80,7 +80,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
|
|||
/*********************************************************************
|
||||
* _beginthread (MSVCRT.@)
|
||||
*/
|
||||
unsigned long _beginthread(
|
||||
uintptr_t _beginthread(
|
||||
_beginthread_start_routine_t start_address, /* [in] Start address of routine that begins execution of new thread */
|
||||
unsigned int stack_size, /* [in] Stack size for new thread or 0 */
|
||||
void *arglist) /* [in] Argument list to be passed to new thread or NULL */
|
||||
|
@ -98,7 +98,7 @@ unsigned long _beginthread(
|
|||
trampoline->arglist = arglist;
|
||||
|
||||
/* FIXME */
|
||||
return (unsigned long)CreateThread(NULL, stack_size, _beginthread_trampoline,
|
||||
return (uintptr_t)CreateThread(NULL, stack_size, _beginthread_trampoline,
|
||||
trampoline, 0, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
unsigned long CDECL _beginthreadex(
|
||||
uintptr_t CDECL _beginthreadex(
|
||||
void* security,
|
||||
unsigned stack_size,
|
||||
unsigned (__stdcall *start_address)(void*),
|
||||
|
@ -25,7 +25,7 @@ unsigned long CDECL _beginthreadex(
|
|||
_dosmaperr( GetLastError() );
|
||||
}
|
||||
|
||||
return (unsigned long) NewThread;
|
||||
return (uintptr_t) NewThread;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue