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
6482ce76
Commit
6482ce76
authored
Nov 19, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Enable multi-thread locking by default.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
66618e62
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
36 additions
and
49 deletions
+36
-49
Makefile.in
dlls/crtdll/Makefile.in
+1
-1
Makefile.in
dlls/msvcr100/Makefile.in
+1
-1
Makefile.in
dlls/msvcr110/Makefile.in
+1
-1
Makefile.in
dlls/msvcr120/Makefile.in
+1
-1
Makefile.in
dlls/msvcr70/Makefile.in
+1
-1
Makefile.in
dlls/msvcr71/Makefile.in
+1
-1
Makefile.in
dlls/msvcr80/Makefile.in
+1
-1
Makefile.in
dlls/msvcr90/Makefile.in
+1
-1
Makefile.in
dlls/msvcrt/Makefile.in
+1
-1
console.c
dlls/msvcrt/console.c
+2
-2
exit.c
dlls/msvcrt/exit.c
+2
-2
heap.c
dlls/msvcrt/heap.c
+2
-2
locale.c
dlls/msvcrt/locale.c
+2
-2
mtdll.h
dlls/msvcrt/mtdll.h
+0
-13
onexit.c
dlls/msvcrt/onexit.c
+7
-7
process.c
dlls/msvcrt/process.c
+6
-6
time.c
dlls/msvcrt/time.c
+4
-4
Makefile.in
dlls/msvcrtd/Makefile.in
+1
-1
Makefile.in
dlls/ucrtbase/Makefile.in
+1
-1
No files found.
dlls/crtdll/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
0
-D_CRTDLL
EXTRADEFS
=
-D_MSVCR_VER
=
0
-D_CRTDLL
MODULE
=
crtdll.dll
PARENTSRC
=
../msvcrt
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr100/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
100
EXTRADEFS
=
-D_MSVCR_VER
=
100
MODULE
=
msvcr100.dll
IMPORTLIB
=
msvcr100
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr110/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
110
EXTRADEFS
=
-D_MSVCR_VER
=
110
MODULE
=
msvcr110.dll
IMPORTLIB
=
msvcr110
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr120/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
120
EXTRADEFS
=
-D_MSVCR_VER
=
120
MODULE
=
msvcr120.dll
IMPORTLIB
=
msvcr120
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr70/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
70
EXTRADEFS
=
-D_MSVCR_VER
=
70
MODULE
=
msvcr70.dll
IMPORTLIB
=
msvcr70
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr71/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
71
EXTRADEFS
=
-D_MSVCR_VER
=
71
MODULE
=
msvcr71.dll
IMPORTLIB
=
msvcr71
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr80/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
80
EXTRADEFS
=
-D_MSVCR_VER
=
80
MODULE
=
msvcr80.dll
IMPORTLIB
=
msvcr80
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcr90/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
90
EXTRADEFS
=
-D_MSVCR_VER
=
90
MODULE
=
msvcr90.dll
IMPORTLIB
=
msvcr90
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcrt/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
0
EXTRADEFS
=
-D_MSVCR_VER
=
0
MODULE
=
msvcrt.dll
IMPORTLIB
=
msvcrt
DELAYIMPORTS
=
advapi32 user32
...
...
dlls/msvcrt/console.c
View file @
6482ce76
...
...
@@ -32,8 +32,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
/* MT */
#define LOCK_CONSOLE _
m
lock(_CONIO_LOCK)
#define UNLOCK_CONSOLE _
m
unlock(_CONIO_LOCK)
#define LOCK_CONSOLE _lock(_CONIO_LOCK)
#define UNLOCK_CONSOLE _unlock(_CONIO_LOCK)
static
HANDLE
MSVCRT_console_in
=
INVALID_HANDLE_VALUE
;
static
HANDLE
MSVCRT_console_out
=
INVALID_HANDLE_VALUE
;
...
...
dlls/msvcrt/exit.c
View file @
6482ce76
...
...
@@ -26,8 +26,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/* MT */
#define LOCK_EXIT _
m
lock(_EXIT_LOCK1)
#define UNLOCK_EXIT _
m
unlock(_EXIT_LOCK1)
#define LOCK_EXIT _lock(_EXIT_LOCK1)
#define UNLOCK_EXIT _unlock(_EXIT_LOCK1)
static
MSVCRT_purecall_handler
purecall_handler
=
NULL
;
...
...
dlls/msvcrt/heap.c
View file @
6482ce76
...
...
@@ -29,8 +29,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/* MT */
#define LOCK_HEAP _
m
lock( _HEAP_LOCK )
#define UNLOCK_HEAP _
m
unlock( _HEAP_LOCK )
#define LOCK_HEAP _lock( _HEAP_LOCK )
#define UNLOCK_HEAP _unlock( _HEAP_LOCK )
/* _aligned */
#define SAVED_PTR(x) ((void *)((DWORD_PTR)((char *)x - sizeof(void *)) & \
...
...
dlls/msvcrt/locale.c
View file @
6482ce76
...
...
@@ -1122,7 +1122,7 @@ void free_mbcinfo(MSVCRT_pthreadmbcinfo mbcinfo)
*/
void
CDECL
_lock_locales
(
void
)
{
_
m
lock
(
_SETLOCALE_LOCK
);
_lock
(
_SETLOCALE_LOCK
);
}
/*********************************************************************
...
...
@@ -1130,7 +1130,7 @@ void CDECL _lock_locales(void)
*/
void
CDECL
_unlock_locales
(
void
)
{
_
m
unlock
(
_SETLOCALE_LOCK
);
_unlock
(
_SETLOCALE_LOCK
);
}
MSVCRT__locale_t
CDECL
get_current_locale_noalloc
(
MSVCRT__locale_t
locale
)
...
...
dlls/msvcrt/mtdll.h
View file @
6482ce76
...
...
@@ -19,22 +19,9 @@
#ifndef WINE_MTDLL_H
#define WINE_MTDLL_H
#if defined(_MT)
#define _mlock(locknum) _lock(locknum)
#define _munlock(locknum) _unlock(locknum)
void
__cdecl
_unlock
(
int
locknum
);
void
__cdecl
_lock
(
int
locknum
);
#else
#define _mlock(locknum) do {} while(0)
#define _munlock(locknum) do {} while(0)
#endif
#define _SIGNAL_LOCK 1
#define _IOB_SCAN_LOCK 2
#define _TMPNAM_LOCK 3
...
...
dlls/msvcrt/onexit.c
View file @
6482ce76
...
...
@@ -51,13 +51,13 @@ int __cdecl _register_onexit_function(_onexit_table_t *table, _onexit_t func)
if
(
!
table
)
return
-
1
;
_
m
lock
(
_EXIT_LOCK1
);
_lock
(
_EXIT_LOCK1
);
if
(
!
table
->
_first
)
{
table
->
_first
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
32
*
sizeof
(
void
*
));
if
(
!
table
->
_first
)
{
_
m
unlock
(
_EXIT_LOCK1
);
_unlock
(
_EXIT_LOCK1
);
return
-
1
;
}
table
->
_last
=
table
->
_first
;
...
...
@@ -71,7 +71,7 @@ int __cdecl _register_onexit_function(_onexit_table_t *table, _onexit_t func)
_PVFV
*
tmp
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
table
->
_first
,
2
*
len
*
sizeof
(
void
*
));
if
(
!
tmp
)
{
_
m
unlock
(
_EXIT_LOCK1
);
_unlock
(
_EXIT_LOCK1
);
return
-
1
;
}
table
->
_first
=
tmp
;
...
...
@@ -81,7 +81,7 @@ int __cdecl _register_onexit_function(_onexit_table_t *table, _onexit_t func)
*
table
->
_last
=
(
_PVFV
)
func
;
table
->
_last
++
;
_
m
unlock
(
_EXIT_LOCK1
);
_unlock
(
_EXIT_LOCK1
);
return
0
;
}
...
...
@@ -97,10 +97,10 @@ int __cdecl _execute_onexit_table(_onexit_table_t *table)
if
(
!
table
)
return
-
1
;
_
m
lock
(
_EXIT_LOCK1
);
_lock
(
_EXIT_LOCK1
);
if
(
!
table
->
_first
||
table
->
_first
>=
table
->
_last
)
{
_
m
unlock
(
_EXIT_LOCK1
);
_unlock
(
_EXIT_LOCK1
);
return
0
;
}
copy
.
_first
=
table
->
_first
;
...
...
@@ -108,7 +108,7 @@ int __cdecl _execute_onexit_table(_onexit_table_t *table)
copy
.
_end
=
table
->
_end
;
memset
(
table
,
0
,
sizeof
(
*
table
));
_initialize_onexit_table
(
table
);
_
m
unlock
(
_EXIT_LOCK1
);
_unlock
(
_EXIT_LOCK1
);
for
(
func
=
copy
.
_last
-
1
;
func
>=
copy
.
_first
;
func
--
)
{
...
...
dlls/msvcrt/process.c
View file @
6482ce76
...
...
@@ -1083,7 +1083,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
fdToDup
=
readPipe
?
1
:
0
;
fdToOpen
=
readPipe
?
0
:
1
;
_
m
lock
(
_POPEN_LOCK
);
_lock
(
_POPEN_LOCK
);
for
(
i
=
0
;
i
<
popen_handles_size
;
i
++
)
{
if
(
!
popen_handles
[
i
].
f
)
...
...
@@ -1135,7 +1135,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
MSVCRT__close
(
fds
[
fdToOpen
]);
container
->
f
=
ret
;
}
_
m
unlock
(
_POPEN_LOCK
);
_unlock
(
_POPEN_LOCK
);
HeapFree
(
GetProcessHeap
(),
0
,
comspec
);
HeapFree
(
GetProcessHeap
(),
0
,
fullcmd
);
MSVCRT__dup2
(
fdStdHandle
,
fdToDup
);
...
...
@@ -1143,7 +1143,7 @@ MSVCRT_FILE* CDECL MSVCRT__wpopen(const MSVCRT_wchar_t* command, const MSVCRT_wc
return
ret
;
error:
_
m
unlock
(
_POPEN_LOCK
);
_unlock
(
_POPEN_LOCK
);
if
(
fdStdHandle
!=
-
1
)
MSVCRT__close
(
fdStdHandle
);
MSVCRT__close
(
fds
[
0
]);
MSVCRT__close
(
fds
[
1
]);
...
...
@@ -1187,7 +1187,7 @@ int CDECL MSVCRT__pclose(MSVCRT_FILE* file)
if
(
!
MSVCRT_CHECK_PMT
(
file
!=
NULL
))
return
-
1
;
_
m
lock
(
_POPEN_LOCK
);
_lock
(
_POPEN_LOCK
);
for
(
i
=
0
;
i
<
popen_handles_size
;
i
++
)
{
if
(
popen_handles
[
i
].
f
==
file
)
...
...
@@ -1195,14 +1195,14 @@ int CDECL MSVCRT__pclose(MSVCRT_FILE* file)
}
if
(
i
==
popen_handles_size
)
{
_
m
unlock
(
_POPEN_LOCK
);
_unlock
(
_POPEN_LOCK
);
*
MSVCRT__errno
()
=
MSVCRT_EBADF
;
return
-
1
;
}
h
=
popen_handles
[
i
].
proc
;
popen_handles
[
i
].
f
=
NULL
;
_
m
unlock
(
_POPEN_LOCK
);
_unlock
(
_POPEN_LOCK
);
MSVCRT_fclose
(
file
);
if
(
WaitForSingleObject
(
h
,
INFINITE
)
==
WAIT_FAILED
||
!
GetExitCodeProcess
(
h
,
&
i
))
...
...
dlls/msvcrt/time.c
View file @
6482ce76
...
...
@@ -111,7 +111,7 @@ void CDECL MSVCRT__tzset(void)
char
*
tz
=
MSVCRT_getenv
(
"TZ"
);
BOOL
error
;
_
m
lock
(
_TIME_LOCK
);
_lock
(
_TIME_LOCK
);
if
(
tz
&&
tz
[
0
])
{
BOOL
neg_zone
=
FALSE
;
...
...
@@ -158,7 +158,7 @@ void CDECL MSVCRT__tzset(void)
sizeof
(
tzname_dst
),
NULL
,
&
error
)
||
error
)
*
MSVCRT__tzname
[
0
]
=
0
;
}
_
m
unlock
(
_TIME_LOCK
);
_unlock
(
_TIME_LOCK
);
}
static
void
_tzset_init
(
void
)
...
...
@@ -166,12 +166,12 @@ static void _tzset_init(void)
static
BOOL
init
=
FALSE
;
if
(
!
init
)
{
_
m
lock
(
_TIME_LOCK
);
_lock
(
_TIME_LOCK
);
if
(
!
init
)
{
MSVCRT__tzset
();
init
=
TRUE
;
}
_
m
unlock
(
_TIME_LOCK
);
_unlock
(
_TIME_LOCK
);
}
}
...
...
dlls/msvcrtd/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
0
EXTRADEFS
=
-D_MSVCR_VER
=
0
MODULE
=
msvcrtd.dll
IMPORTLIB
=
msvcrtd
PARENTSRC
=
../msvcrt
...
...
dlls/ucrtbase/Makefile.in
View file @
6482ce76
EXTRADEFS
=
-D_M
T
-D_M
SVCR_VER
=
140
EXTRADEFS
=
-D_MSVCR_VER
=
140
MODULE
=
ucrtbase.dll
IMPORTLIB
=
ucrtbase
DELAYIMPORTS
=
advapi32 user32
...
...
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