Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
887c035b
Commit
887c035b
authored
Jun 19, 2001
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jun 19, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Added, cleaned up and/or documentated _{begin,end}thread{,ex}.
- _lfind and _ltow are implemented (not stubs).
parent
6ac11083
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
71 additions
and
16 deletions
+71
-16
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+4
-4
thread.c
dlls/msvcrt/thread.c
+61
-9
process.h
include/msvcrt/process.h
+6
-3
No files found.
dlls/msvcrt/msvcrt.spec
View file @
887c035b
...
@@ -173,7 +173,7 @@ debug_channels (msvcrt)
...
@@ -173,7 +173,7 @@ debug_channels (msvcrt)
@ stub _atoi64 #(str)
@ stub _atoi64 #(str)
@ stub _atoldbl
@ stub _atoldbl
@ cdecl _beep(long long) _beep
@ cdecl _beep(long long) _beep
@
stub _beginthread #(ptr long ptr)
@
cdecl _beginthread (ptr long ptr) _beginthread
@ cdecl _beginthreadex (ptr long ptr ptr long ptr) _beginthreadex
@ cdecl _beginthreadex (ptr long ptr ptr long ptr) _beginthreadex
@ cdecl _c_exit() MSVCRT__c_exit
@ cdecl _c_exit() MSVCRT__c_exit
@ cdecl _cabs(long) _cabs
@ cdecl _cabs(long) _cabs
...
@@ -204,7 +204,7 @@ debug_channels (msvcrt)
...
@@ -204,7 +204,7 @@ debug_channels (msvcrt)
@ stub _dup #(long)
@ stub _dup #(long)
@ stub _dup2 #(long long)
@ stub _dup2 #(long long)
@ cdecl _ecvt( double long ptr ptr) ecvt
@ cdecl _ecvt( double long ptr ptr) ecvt
@
stub _endthread #()
@
cdecl _endthread () _endthread
@ cdecl _endthreadex(long) _endthreadex
@ cdecl _endthreadex(long) _endthreadex
@ extern _environ MSVCRT__environ
@ extern _environ MSVCRT__environ
@ cdecl _eof(long) _eof
@ cdecl _eof(long) _eof
...
@@ -322,7 +322,7 @@ debug_channels (msvcrt)
...
@@ -322,7 +322,7 @@ debug_channels (msvcrt)
@ cdecl _j1(double) j1
@ cdecl _j1(double) j1
@ cdecl _jn(long double) jn
@ cdecl _jn(long double) jn
@ cdecl _kbhit() _kbhit
@ cdecl _kbhit() _kbhit
@
stub
_lfind
@
cdecl _lfind(ptr ptr ptr long ptr)
_lfind
@ cdecl _loaddll(str) _loaddll
@ cdecl _loaddll(str) _loaddll
@ cdecl _local_unwind2(ptr long) _local_unwind2
@ cdecl _local_unwind2(ptr long) _local_unwind2
@ stub _lock
@ stub _lock
...
@@ -335,7 +335,7 @@ debug_channels (msvcrt)
...
@@ -335,7 +335,7 @@ debug_channels (msvcrt)
@ cdecl _lseek(long long long) _lseek
@ cdecl _lseek(long long long) _lseek
@ stub _lseeki64 #(long long long)
@ stub _lseeki64 #(long long long)
@ forward -noimport _ltoa ntdll._ltoa
@ forward -noimport _ltoa ntdll._ltoa
@
stub _ltow #(long)
@
cdecl _ltow(long ptr long) _ltow
@ cdecl _makepath(str str str str str) _makepath
@ cdecl _makepath(str str str str str) _makepath
@ cdecl _matherr(ptr) _matherr
@ cdecl _matherr(ptr) _matherr
@ cdecl _mbbtombc(long) _mbbtombc
@ cdecl _mbbtombc(long) _mbbtombc
...
...
dlls/msvcrt/thread.c
View file @
887c035b
...
@@ -9,27 +9,79 @@
...
@@ -9,27 +9,79 @@
DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/********************************************************************/
typedef
struct
{
_beginthread_start_routine_t
start_address
;
void
*
arglist
;
}
_beginthread_trampoline_t
;
/*********************************************************************
* _beginthread_trampoline
*/
static
DWORD
CALLBACK
_beginthread_trampoline
(
LPVOID
arg
)
{
_beginthread_trampoline_t
*
trampoline
=
arg
;
trampoline
->
start_address
(
trampoline
->
arglist
);
return
0
;
}
/*********************************************************************
* _beginthread (MSVCRT.@)
*/
unsigned
long
_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 */
{
_beginthread_trampoline_t
trampoline
;
TRACE
(
"(%p, %d, %p)
\n
"
,
start_address
,
stack_size
,
arglist
);
trampoline
.
start_address
=
start_address
;
trampoline
.
arglist
=
arglist
;
/* FIXME */
return
CreateThread
(
NULL
,
stack_size
,
_beginthread_trampoline
,
&
trampoline
,
0
,
NULL
);
}
/*********************************************************************
/*********************************************************************
* _beginthreadex (MSVCRT.@)
* _beginthreadex (MSVCRT.@)
*/
*/
unsigned
long
_beginthreadex
(
void
*
sec
,
unsigned
long
_beginthreadex
(
unsigned
int
stack
,
void
*
security
,
/* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */
unsigned
__stdcall
(
*
start
)(
void
*
),
unsigned
int
stack_size
,
/* [in] Stack size for new thread or 0 */
void
*
arg
,
unsigned
int
flag
,
_beginthreadex_start_routine_t
start_address
,
/* [in] Start address of routine that begins execution of new thread */
unsigned
int
*
addr
)
void
*
arglist
,
/* [in] Argument list to be passed to new thread or NULL */
unsigned
int
initflag
,
/* [in] Initial state of new thread (0 for running or CREATE_SUSPEND for suspended) */
unsigned
int
*
thrdaddr
)
/* [out] Points to a 32-bit variable that receives the thread identifier */
{
TRACE
(
"(%p, %d, %p, %p, %d, %p)
\n
"
,
security
,
stack_size
,
start_address
,
arglist
,
initflag
,
thrdaddr
);
/* FIXME */
return
CreateThread
(
security
,
stack_size
,
(
LPTHREAD_START_ROUTINE
)
start_address
,
arglist
,
initflag
,
(
LPDWORD
)
thrdaddr
);
}
/*********************************************************************
* _endthread (MSVCRT.@)
*/
void
_endthread
(
void
)
{
{
TRACE
(
"(%p,%d,%p,%p,%d,%p)
\n
"
,
sec
,
stack
,
start
,
arg
,
flag
,
addr
);
TRACE
(
"(void)
\n
"
);
/* FIXME */
/* FIXME */
return
CreateThread
(
sec
,
stack
,
(
LPTHREAD_START_ROUTINE
)
start
,
arg
,
flag
,(
LPDWORD
)
addr
);
ExitThread
(
0
);
}
}
/*********************************************************************
/*********************************************************************
* _endthreadex (MSVCRT.@)
* _endthreadex (MSVCRT.@)
*/
*/
void
_endthreadex
(
unsigned
int
retval
)
void
_endthreadex
(
unsigned
int
retval
)
/* [in] Thread exit code */
{
{
TRACE
(
"(%d)
\n
"
,
retval
);
TRACE
(
"(%d)
\n
"
,
retval
);
/* FIXME */
/* FIXME */
ExitThread
(
retval
);
ExitThread
(
retval
);
}
}
...
...
include/msvcrt/process.h
View file @
887c035b
...
@@ -32,11 +32,14 @@
...
@@ -32,11 +32,14 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
unsigned
long
_beginthread
(
void
(
*
)(
void
*
),
unsigned
,
void
*
);
typedef
void
__cdecl
(
*
_beginthread_start_routine_t
)(
void
*
);
unsigned
long
_beginthreadex
(
void
*
,
unsigned
,
unsigned
__stdcall
(
*
)(
void
*
),
void
*
,
unsigned
,
unsigned
*
);
typedef
unsigned
int
__stdcall
(
*
_beginthreadex_start_routine_t
)(
void
*
);
unsigned
long
_beginthread
(
_beginthread_start_routine_t
,
unsigned
int
,
void
*
);
unsigned
long
_beginthreadex
(
void
*
,
unsigned
int
,
_beginthreadex_start_routine_t
,
void
*
,
unsigned
int
,
unsigned
int
*
);
int
_cwait
(
int
*
,
int
,
int
);
int
_cwait
(
int
*
,
int
,
int
);
void
_endthread
(
void
);
void
_endthread
(
void
);
void
_endthreadex
(
unsigned
);
void
_endthreadex
(
unsigned
int
);
int
_execl
(
const
char
*
,
const
char
*
,...);
int
_execl
(
const
char
*
,
const
char
*
,...);
int
_execle
(
const
char
*
,
const
char
*
,...);
int
_execle
(
const
char
*
,
const
char
*
,...);
int
_execlp
(
const
char
*
,
const
char
*
,...);
int
_execlp
(
const
char
*
,
const
char
*
,...);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment