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
de600ada
Commit
de600ada
authored
Mar 27, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Mar 27, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Add improper_lock class implementation.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0a1a6533
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
29 deletions
+82
-29
concrt140.spec
dlls/concrt140/concrt140.spec
+4
-4
msvcr100.spec
dlls/msvcr100/msvcr100.spec
+4
-4
msvcr110.spec
dlls/msvcr110/msvcr110.spec
+6
-6
msvcr120.spec
dlls/msvcr120/msvcr120.spec
+6
-6
msvcr120_app.spec
dlls/msvcr120_app/msvcr120_app.spec
+6
-6
cpp.c
dlls/msvcrt/cpp.c
+52
-0
lock.c
dlls/msvcrt/lock.c
+3
-3
msvcrt.h
dlls/msvcrt/msvcrt.h
+1
-0
No files found.
dlls/concrt140/concrt140.spec
View file @
de600ada
...
...
@@ -76,10 +76,10 @@
@ stub -arch=win64 ??0default_scheduler_exists@Concurrency@@QEAA@XZ
@ thiscall -arch=win32 ??0event@Concurrency@@QAE@XZ(ptr) msvcr120.??0event@Concurrency@@QAE@XZ
@ cdecl -arch=win64 ??0event@Concurrency@@QEAA@XZ(ptr) msvcr120.??0event@Concurrency@@QEAA@XZ
@
stub -arch=i386
??0improper_lock@Concurrency@@QAE@PBD@Z
@
stub -arch=win64
??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
stub -arch=i386
??0improper_lock@Concurrency@@QAE@XZ
@
stub -arch=win64
??0improper_lock@Concurrency@@QEAA@XZ
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z(ptr str) msvcr120.
??0improper_lock@Concurrency@@QAE@PBD@Z
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z(ptr str) msvcr120.
??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ(ptr) msvcr120.
??0improper_lock@Concurrency@@QAE@XZ
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ(ptr) msvcr120.
??0improper_lock@Concurrency@@QEAA@XZ
@ stub -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ
...
...
dlls/msvcr100/msvcr100.spec
View file @
de600ada
...
...
@@ -74,10 +74,10 @@
@ cdecl -arch=win64 ??0exception@std@@QEAA@AEBV01@@Z(ptr ptr) MSVCRT_exception_copy_ctor
@ thiscall -arch=i386 ??0exception@std@@QAE@XZ(ptr) MSVCRT_exception_default_ctor
@ cdecl -arch=win64 ??0exception@std@@QEAA@XZ(ptr) MSVCRT_exception_default_ctor
@
stub -arch=win32 ??0improper_lock@Concurrency@@QAE@PBD@Z
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
stub -arch=win32 ??0improper_lock@Concurrency@@QAE@XZ
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z(ptr str) improper_lock_ctor_str
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z(ptr str) improper_lock_ctor_str
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ(ptr) improper_lock_ctor
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ(ptr) improper_lock_ctor
@ stub -arch=win32 ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=win32 ??0improper_scheduler_attach@Concurrency@@QAE@XZ
...
...
dlls/msvcr110/msvcr110.spec
View file @
de600ada
...
...
@@ -137,12 +137,12 @@
@ cdecl -arch=arm ??0exception@std@@QAA@XZ(ptr) MSVCRT_exception_default_ctor
@ thiscall -arch=i386 ??0exception@std@@QAE@XZ(ptr) MSVCRT_exception_default_ctor
@ cdecl -arch=win64 ??0exception@std@@QEAA@XZ(ptr) MSVCRT_exception_default_ctor
@
stub -arch=arm ??0improper_lock@Concurrency@@QAA@PBD@Z
@
stub -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
stub -arch=arm ??0improper_lock@Concurrency@@QAA@XZ
@
stub -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@PBD@Z(ptr str) improper_lock_ctor_str
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z(ptr str) improper_lock_ctor_str
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z(ptr str) improper_lock_ctor_str
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@XZ(ptr) improper_lock_ctor
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ(ptr) improper_lock_ctor
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ(ptr) improper_lock_ctor
@ stub -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
...
...
dlls/msvcr120/msvcr120.spec
View file @
de600ada
...
...
@@ -134,12 +134,12 @@
@ cdecl -arch=arm ??0exception@std@@QAA@XZ(ptr) MSVCRT_exception_default_ctor
@ thiscall -arch=i386 ??0exception@std@@QAE@XZ(ptr) MSVCRT_exception_default_ctor
@ cdecl -arch=win64 ??0exception@std@@QEAA@XZ(ptr) MSVCRT_exception_default_ctor
@
stub -arch=arm ??0improper_lock@Concurrency@@QAA@PBD@Z
@
stub -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
stub -arch=arm ??0improper_lock@Concurrency@@QAA@XZ
@
stub -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ
@
stub -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@PBD@Z(ptr str) improper_lock_ctor_str
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z(ptr str) improper_lock_ctor_str
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z(ptr str) improper_lock_ctor_str
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@XZ(ptr) improper_lock_ctor
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ(ptr) improper_lock_ctor
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ(ptr) improper_lock_ctor
@ stub -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
...
...
dlls/msvcr120_app/msvcr120_app.spec
View file @
de600ada
...
...
@@ -132,12 +132,12 @@
@ cdecl -arch=arm ??0exception@std@@QAA@XZ(ptr) msvcr120.??0exception@std@@QAA@XZ
@ thiscall -arch=i386 ??0exception@std@@QAE@XZ(ptr) msvcr120.??0exception@std@@QAE@XZ
@ cdecl -arch=win64 ??0exception@std@@QEAA@XZ(ptr) msvcr120.??0exception@std@@QEAA@XZ
@
stub -arch=arm
??0improper_lock@Concurrency@@QAA@PBD@Z
@
stub -arch=i386
??0improper_lock@Concurrency@@QAE@PBD@Z
@
stub -arch=win64
??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
stub -arch=arm
??0improper_lock@Concurrency@@QAA@XZ
@
stub -arch=i386
??0improper_lock@Concurrency@@QAE@XZ
@
stub -arch=win64
??0improper_lock@Concurrency@@QEAA@XZ
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@PBD@Z(ptr str) msvcr120.
??0improper_lock@Concurrency@@QAA@PBD@Z
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@PBD@Z(ptr str) msvcr120.
??0improper_lock@Concurrency@@QAE@PBD@Z
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@PEBD@Z(ptr str) msvcr120.
??0improper_lock@Concurrency@@QEAA@PEBD@Z
@
cdecl -arch=arm ??0improper_lock@Concurrency@@QAA@XZ(ptr) msvcr120.
??0improper_lock@Concurrency@@QAA@XZ
@
thiscall -arch=i386 ??0improper_lock@Concurrency@@QAE@XZ(ptr) msvcr120.
??0improper_lock@Concurrency@@QAE@XZ
@
cdecl -arch=win64 ??0improper_lock@Concurrency@@QEAA@XZ(ptr) msvcr120.
??0improper_lock@Concurrency@@QEAA@XZ
@ stub -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
...
...
dlls/msvcrt/cpp.c
View file @
de600ada
...
...
@@ -737,6 +737,44 @@ void __thiscall MSVCRT_scheduler_resource_allocation_error_dtor(
TRACE
(
"(%p)
\n
"
,
this
);
MSVCRT_exception_dtor
(
&
this
->
e
);
}
typedef
exception
improper_lock
;
extern
const
vtable_ptr
MSVCRT_improper_lock_vtable
;
/* ??0improper_lock@Concurrency@@QAE@PBD@Z */
/* ??0improper_lock@Concurrency@@QEAA@PEBD@Z */
DEFINE_THISCALL_WRAPPER
(
improper_lock_ctor_str
,
8
)
improper_lock
*
__thiscall
improper_lock_ctor_str
(
improper_lock
*
this
,
const
char
*
str
)
{
TRACE
(
"(%p %p)
\n
"
,
this
,
str
);
MSVCRT_exception_ctor
(
this
,
&
str
);
this
->
vtable
=
&
MSVCRT_improper_lock_vtable
;
return
this
;
}
/* ??0improper_lock@Concurrency@@QAE@XZ */
/* ??0improper_lock@Concurrency@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER
(
improper_lock_ctor
,
4
)
improper_lock
*
__thiscall
improper_lock_ctor
(
improper_lock
*
this
)
{
return
improper_lock_ctor_str
(
this
,
NULL
);
}
DEFINE_THISCALL_WRAPPER
(
MSVCRT_improper_lock_copy_ctor
,
8
)
improper_lock
*
__thiscall
MSVCRT_improper_lock_copy_ctor
(
improper_lock
*
_this
,
const
improper_lock
*
rhs
)
{
TRACE
(
"(%p %p)
\n
"
,
_this
,
rhs
);
MSVCRT_exception_copy_ctor
(
_this
,
rhs
);
_this
->
vtable
=
&
MSVCRT_improper_lock_vtable
;
return
_this
;
}
DEFINE_THISCALL_WRAPPER
(
MSVCRT_improper_lock_dtor
,
4
)
void
__thiscall
MSVCRT_improper_lock_dtor
(
improper_lock
*
_this
)
{
TRACE
(
"(%p)
\n
"
,
_this
);
MSVCRT_exception_dtor
(
_this
);
}
#endif
#ifndef __GNUC__
...
...
@@ -769,6 +807,9 @@ __ASM_VTABLE(__non_rtti_object,
__ASM_VTABLE
(
scheduler_resource_allocation_error
,
VTABLE_ADD_FUNC
(
MSVCRT_exception_vector_dtor
)
VTABLE_ADD_FUNC
(
MSVCRT_what_exception
));
__ASM_VTABLE
(
improper_lock
,
VTABLE_ADD_FUNC
(
MSVCRT_exception_vector_dtor
)
VTABLE_ADD_FUNC
(
MSVCRT_what_exception
));
#endif
#ifndef __GNUC__
...
...
@@ -792,6 +833,7 @@ DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exce
#if _MSVCR_VER >= 100
DEFINE_RTTI_DATA1
(
scheduler_resource_allocation_error
,
0
,
&
exception_rtti_base_descriptor
,
".?AVscheduler_resource_allocation_error@Concurrency@@"
)
DEFINE_RTTI_DATA1
(
improper_lock
,
0
,
&
exception_rtti_base_descriptor
,
".?AVimproper_lock@Concurrency@@"
)
#endif
DEFINE_EXCEPTION_TYPE_INFO
(
exception
,
0
,
NULL
,
NULL
)
...
...
@@ -803,6 +845,7 @@ DEFINE_EXCEPTION_TYPE_INFO( bad_alloc, 1, &exception_cxx_type_info, NULL )
#endif
#if _MSVCR_VER >= 100
DEFINE_EXCEPTION_TYPE_INFO
(
scheduler_resource_allocation_error
,
1
,
&
exception_cxx_type_info
,
NULL
)
DEFINE_EXCEPTION_TYPE_INFO
(
improper_lock
,
1
,
&
exception_cxx_type_info
,
NULL
)
#endif
void
msvcrt_init_exception
(
void
*
base
)
...
...
@@ -819,6 +862,7 @@ void msvcrt_init_exception(void *base)
init___non_rtti_object_rtti
(
base
);
#if _MSVCR_VER >= 100
init_scheduler_resource_allocation_error_rtti
(
base
);
init_improper_lock_rtti
(
base
);
#endif
init_exception_cxx
(
base
);
...
...
@@ -830,6 +874,7 @@ void msvcrt_init_exception(void *base)
#endif
#if _MSVCR_VER >= 100
init_scheduler_resource_allocation_error_cxx
(
base
);
init_improper_lock_cxx
(
base
);
#endif
#endif
}
...
...
@@ -850,6 +895,13 @@ void throw_scheduler_resource_allocation_error(const char *str, HRESULT hr)
scheduler_resource_allocation_error_ctor_name
(
&
e
,
str
,
hr
);
_CxxThrowException
(
&
e
.
e
,
&
scheduler_resource_allocation_error_exception_type
);
}
void
throw_improper_lock
(
const
char
*
str
)
{
improper_lock
e
;
improper_lock_ctor_str
(
&
e
,
str
);
_CxxThrowException
(
&
e
,
&
improper_lock_exception_type
);
}
#endif
/******************************************************************
...
...
dlls/msvcrt/lock.c
View file @
de600ada
...
...
@@ -1026,7 +1026,7 @@ void __thiscall reader_writer_lock_lock(reader_writer_lock *this)
TRACE
(
"(%p)
\n
"
,
this
);
if
(
this
->
thread_id
==
GetCurrentThreadId
())
FIXME
(
"throw improper_lock exception
\n
"
);
throw_improper_lock
(
"Already locked
"
);
last
=
InterlockedExchangePointer
((
void
**
)
&
this
->
writer_tail
,
&
q
);
if
(
last
)
{
...
...
@@ -1057,7 +1057,7 @@ void __thiscall reader_writer_lock_lock_read(reader_writer_lock *this)
TRACE
(
"(%p)
\n
"
,
this
);
if
(
this
->
thread_id
==
GetCurrentThreadId
())
FIXME
(
"throw improper_lock exception
\n
"
);
throw_improper_lock
(
"Already locked as writer
"
);
do
{
q
.
next
=
this
->
reader_head
;
...
...
@@ -1095,7 +1095,7 @@ MSVCRT_bool __thiscall reader_writer_lock_try_lock(reader_writer_lock *this)
TRACE
(
"(%p)
\n
"
,
this
);
if
(
this
->
thread_id
==
GetCurrentThreadId
())
FIXME
(
"throw improper_lock exception
\n
"
)
;
return
FALSE
;
if
(
InterlockedCompareExchangePointer
((
void
**
)
&
this
->
writer_tail
,
&
q
,
NULL
))
return
FALSE
;
...
...
dlls/msvcrt/msvcrt.h
View file @
de600ada
...
...
@@ -287,6 +287,7 @@ void throw_bad_alloc(const char*) DECLSPEC_HIDDEN;
#endif
#if _MSVCR_VER >= 100
void
throw_scheduler_resource_allocation_error
(
const
char
*
,
HRESULT
)
DECLSPEC_HIDDEN
;
void
throw_improper_lock
(
const
char
*
)
DECLSPEC_HIDDEN
;
#endif
void
__cdecl
_purecall
(
void
);
...
...
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