Commit dab64179 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr100: Add critical_section::scoped_lock implementation.

parent 6c35e765
......@@ -144,8 +144,8 @@
@ stub -arch=win64 ??0scheduler_resource_allocation_error@Concurrency@@QEAA@J@Z
@ stub -arch=win32 ??0scheduler_resource_allocation_error@Concurrency@@QAE@PBDJ@Z
@ stub -arch=win64 ??0scheduler_resource_allocation_error@Concurrency@@QEAA@PEBDJ@Z
@ stub -arch=win32 ??0scoped_lock@critical_section@Concurrency@@QAE@AAV12@@Z
@ stub -arch=win64 ??0scoped_lock@critical_section@Concurrency@@QEAA@AEAV12@@Z
@ thiscall -arch=win32 ??0scoped_lock@critical_section@Concurrency@@QAE@AAV12@@Z(ptr ptr) critical_section_scoped_lock_ctor
@ cdecl -arch=win64 ??0scoped_lock@critical_section@Concurrency@@QEAA@AEAV12@@Z(ptr ptr) critical_section_scoped_lock_ctor
@ stub -arch=win32 ??0scoped_lock@reader_writer_lock@Concurrency@@QAE@AAV12@@Z
@ stub -arch=win64 ??0scoped_lock@reader_writer_lock@Concurrency@@QEAA@AEAV12@@Z
@ stub -arch=win32 ??0scoped_lock_read@reader_writer_lock@Concurrency@@QAE@AAV12@@Z
......@@ -188,8 +188,8 @@
@ cdecl -arch=win64 ??1exception@std@@UEAA@XZ(ptr) MSVCRT_exception_dtor
@ stub -arch=win32 ??1reader_writer_lock@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1reader_writer_lock@Concurrency@@QEAA@XZ
@ stub -arch=win32 ??1scoped_lock@critical_section@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1scoped_lock@critical_section@Concurrency@@QEAA@XZ
@ thiscall -arch=win32 ??1scoped_lock@critical_section@Concurrency@@QAE@XZ(ptr) critical_section_scoped_lock_dtor
@ cdecl -arch=win64 ??1scoped_lock@critical_section@Concurrency@@QEAA@XZ(ptr) critical_section_scoped_lock_dtor
@ stub -arch=win32 ??1scoped_lock@reader_writer_lock@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1scoped_lock@reader_writer_lock@Concurrency@@QEAA@XZ
@ stub -arch=win32 ??1scoped_lock_read@reader_writer_lock@Concurrency@@QAE@XZ
......
......@@ -248,9 +248,9 @@
@ stub -arch=arm ??0scheduler_worker_creation_error@Concurrency@@QAA@PBDJ@Z
@ stub -arch=i386 ??0scheduler_worker_creation_error@Concurrency@@QAE@PBDJ@Z
@ stub -arch=win64 ??0scheduler_worker_creation_error@Concurrency@@QEAA@PEBDJ@Z
@ stub -arch=arm ??0scoped_lock@critical_section@Concurrency@@QAA@AAV12@@Z
@ stub -arch=i386 ??0scoped_lock@critical_section@Concurrency@@QAE@AAV12@@Z
@ stub -arch=win64 ??0scoped_lock@critical_section@Concurrency@@QEAA@AEAV12@@Z
@ cdecl -arch=arm ??0scoped_lock@critical_section@Concurrency@@QAA@AAV12@@Z(ptr ptr) critical_section_scoped_lock_ctor
@ thiscall -arch=i386 ??0scoped_lock@critical_section@Concurrency@@QAE@AAV12@@Z(ptr ptr) critical_section_scoped_lock_ctor
@ cdecl -arch=win64 ??0scoped_lock@critical_section@Concurrency@@QEAA@AEAV12@@Z(ptr ptr) critical_section_scoped_lock_ctor
@ stub -arch=arm ??0scoped_lock@reader_writer_lock@Concurrency@@QAA@AAV12@@Z
@ stub -arch=i386 ??0scoped_lock@reader_writer_lock@Concurrency@@QAE@AAV12@@Z
@ stub -arch=win64 ??0scoped_lock@reader_writer_lock@Concurrency@@QEAA@AEAV12@@Z
......@@ -323,9 +323,9 @@
@ stub -arch=arm ??1reader_writer_lock@Concurrency@@QAA@XZ
@ stub -arch=i386 ??1reader_writer_lock@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1reader_writer_lock@Concurrency@@QEAA@XZ
@ stub -arch=arm ??1scoped_lock@critical_section@Concurrency@@QAA@XZ
@ stub -arch=i386 ??1scoped_lock@critical_section@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1scoped_lock@critical_section@Concurrency@@QEAA@XZ
@ cdecl -arch=arm ??1scoped_lock@critical_section@Concurrency@@QAA@XZ(ptr) critical_section_scoped_lock_dtor
@ thiscall -arch=i386 ??1scoped_lock@critical_section@Concurrency@@QAE@XZ(ptr) critical_section_scoped_lock_dtor
@ cdecl -arch=win64 ??1scoped_lock@critical_section@Concurrency@@QEAA@XZ(ptr) critical_section_scoped_lock_dtor
@ stub -arch=arm ??1scoped_lock@reader_writer_lock@Concurrency@@QAA@XZ
@ stub -arch=i386 ??1scoped_lock@reader_writer_lock@Concurrency@@QAE@XZ
@ stub -arch=win64 ??1scoped_lock@reader_writer_lock@Concurrency@@QEAA@XZ
......
......@@ -366,4 +366,31 @@ critical_section* __thiscall critical_section_native_handle(critical_section *th
TRACE("(%p)\n", this);
return this;
}
typedef struct
{
critical_section *cs;
void *unknown[3];
} critical_section_scoped_lock;
/* ??0scoped_lock@critical_section@Concurrency@@QAE@AAV12@@Z */
/* ??0scoped_lock@critical_section@Concurrency@@QEAA@AEAV12@@Z */
DEFINE_THISCALL_WRAPPER(critical_section_scoped_lock_ctor, 8)
critical_section_scoped_lock* __thiscall critical_section_scoped_lock_ctor(
critical_section_scoped_lock *this, critical_section *cs)
{
TRACE("(%p %p)\n", this, cs);
this->cs = cs;
critical_section_lock(this->cs);
return this;
}
/* ??1scoped_lock@critical_section@Concurrency@@QAE@XZ */
/* ??1scoped_lock@critical_section@Concurrency@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER(critical_section_scoped_lock_dtor, 4)
void __thiscall critical_section_scoped_lock_dtor(critical_section_scoped_lock *this)
{
TRACE("(%p)\n", this);
critical_section_unlock(this->cs);
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment