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

msvcrt: Add improper_scheduler_detach class implementation.

parent 43b768d5
......@@ -84,10 +84,10 @@
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z(ptr str) msvcr120.??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z
@ thiscall -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ(ptr) msvcr120.??0improper_scheduler_attach@Concurrency@@QAE@XZ
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@XZ(ptr) msvcr120.??0improper_scheduler_attach@Concurrency@@QEAA@XZ
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z(ptr str) msvcr120.??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z(ptr str) msvcr120.??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ(ptr) msvcr120.??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ(ptr) msvcr120.??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ stub -arch=i386 ??0improper_scheduler_reference@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_reference@Concurrency@@QEAA@PEBD@Z
@ stub -arch=i386 ??0improper_scheduler_reference@Concurrency@@QAE@XZ
......
......@@ -82,10 +82,10 @@
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@PEBD@Z(ptr str) improper_scheduler_attach_ctor_str
@ thiscall -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ(ptr) improper_scheduler_attach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_attach_ctor
@ stub -arch=win32 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=win32 ??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ(ptr) improper_scheduler_detach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_detach_ctor
@ stub -arch=win32 ??0improper_scheduler_reference@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_reference@Concurrency@@QEAA@PEBD@Z
@ stub -arch=win32 ??0improper_scheduler_reference@Concurrency@@QAE@XZ
......
......@@ -149,12 +149,12 @@
@ cdecl -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@XZ(ptr) improper_scheduler_attach_ctor
@ thiscall -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ(ptr) improper_scheduler_attach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_attach_ctor
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ(ptr) improper_scheduler_detach_ctor
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ(ptr) improper_scheduler_detach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_detach_ctor
@ stub -arch=arm ??0improper_scheduler_reference@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_reference@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_reference@Concurrency@@QEAA@PEBD@Z
......
......@@ -146,12 +146,12 @@
@ cdecl -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@XZ(ptr) improper_scheduler_attach_ctor
@ thiscall -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ(ptr) improper_scheduler_attach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_attach_ctor
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z(ptr str) improper_scheduler_detach_ctor_str
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ(ptr) improper_scheduler_detach_ctor
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ(ptr) improper_scheduler_detach_ctor
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ(ptr) improper_scheduler_detach_ctor
@ stub -arch=arm ??0improper_scheduler_reference@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_reference@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_reference@Concurrency@@QEAA@PEBD@Z
......
......@@ -144,12 +144,12 @@
@ cdecl -arch=arm ??0improper_scheduler_attach@Concurrency@@QAA@XZ(ptr) msvcr120.??0improper_scheduler_attach@Concurrency@@QAA@XZ
@ thiscall -arch=i386 ??0improper_scheduler_attach@Concurrency@@QAE@XZ(ptr) msvcr120.??0improper_scheduler_attach@Concurrency@@QAE@XZ
@ cdecl -arch=win64 ??0improper_scheduler_attach@Concurrency@@QEAA@XZ(ptr) msvcr120.??0improper_scheduler_attach@Concurrency@@QEAA@XZ
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ stub -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ
@ stub -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z(ptr str) msvcr120.??0improper_scheduler_detach@Concurrency@@QAA@PBD@Z
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z(ptr str) msvcr120.??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z(ptr str) msvcr120.??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z
@ cdecl -arch=arm ??0improper_scheduler_detach@Concurrency@@QAA@XZ(ptr) msvcr120.??0improper_scheduler_detach@Concurrency@@QAA@XZ
@ thiscall -arch=i386 ??0improper_scheduler_detach@Concurrency@@QAE@XZ(ptr) msvcr120.??0improper_scheduler_detach@Concurrency@@QAE@XZ
@ cdecl -arch=win64 ??0improper_scheduler_detach@Concurrency@@QEAA@XZ(ptr) msvcr120.??0improper_scheduler_detach@Concurrency@@QEAA@XZ
@ stub -arch=arm ??0improper_scheduler_reference@Concurrency@@QAA@PBD@Z
@ stub -arch=i386 ??0improper_scheduler_reference@Concurrency@@QAE@PBD@Z
@ stub -arch=win64 ??0improper_scheduler_reference@Concurrency@@QEAA@PEBD@Z
......
......@@ -943,6 +943,48 @@ void __thiscall MSVCRT_improper_scheduler_attach_dtor(
TRACE("(%p)\n", _this);
MSVCRT_exception_dtor(_this);
}
typedef exception improper_scheduler_detach;
extern const vtable_ptr MSVCRT_improper_scheduler_detach_vtable;
/* ??0improper_scheduler_detach@Concurrency@@QAE@PBD@Z */
/* ??0improper_scheduler_detach@Concurrency@@QEAA@PEBD@Z */
DEFINE_THISCALL_WRAPPER(improper_scheduler_detach_ctor_str, 8)
improper_scheduler_detach* __thiscall improper_scheduler_detach_ctor_str(
improper_scheduler_detach *this, const char *str)
{
TRACE("(%p %p)\n", this, str);
MSVCRT_exception_ctor(this, &str);
this->vtable = &MSVCRT_improper_scheduler_detach_vtable;
return this;
}
/* ??0improper_scheduler_detach@Concurrency@@QAE@XZ */
/* ??0improper_scheduler_detach@Concurrency@@QEAA@XZ */
DEFINE_THISCALL_WRAPPER(improper_scheduler_detach_ctor, 4)
improper_scheduler_detach* __thiscall improper_scheduler_detach_ctor(
improper_scheduler_detach *this)
{
return improper_scheduler_detach_ctor_str(this, NULL);
}
DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_detach_copy_ctor,8)
improper_scheduler_detach * __thiscall MSVCRT_improper_scheduler_detach_copy_ctor(
improper_scheduler_detach * _this, const improper_scheduler_detach * rhs)
{
TRACE("(%p %p)\n", _this, rhs);
MSVCRT_exception_copy_ctor(_this, rhs);
_this->vtable = &MSVCRT_improper_scheduler_detach_vtable;
return _this;
}
DEFINE_THISCALL_WRAPPER(MSVCRT_improper_scheduler_detach_dtor,4)
void __thiscall MSVCRT_improper_scheduler_detach_dtor(
improper_scheduler_detach * _this)
{
TRACE("(%p)\n", _this);
MSVCRT_exception_dtor(_this);
}
#endif
#ifndef __GNUC__
......@@ -990,6 +1032,9 @@ __ASM_VTABLE(invalid_scheduler_policy_thread_specification,
__ASM_VTABLE(improper_scheduler_attach,
VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor)
VTABLE_ADD_FUNC(MSVCRT_what_exception));
__ASM_VTABLE(improper_scheduler_detach,
VTABLE_ADD_FUNC(MSVCRT_exception_vector_dtor)
VTABLE_ADD_FUNC(MSVCRT_what_exception));
#endif
#ifndef __GNUC__
......@@ -1022,6 +1067,8 @@ DEFINE_RTTI_DATA1(invalid_scheduler_policy_thread_specification, 0, &exception_r
".?AVinvalid_scheduler_policy_thread_specification@Concurrency@@" )
DEFINE_RTTI_DATA1(improper_scheduler_attach, 0, &exception_rtti_base_descriptor,
".?AVimproper_scheduler_attach@Concurrency@@" )
DEFINE_RTTI_DATA1(improper_scheduler_detach, 0, &exception_rtti_base_descriptor,
".?AVimproper_scheduler_detach@Concurrency@@" )
#endif
DEFINE_EXCEPTION_TYPE_INFO( exception, 0, NULL, NULL )
......@@ -1038,6 +1085,7 @@ DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_key, 1, &exception_cxx_type_
DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_value, 1, &exception_cxx_type_info, NULL)
DEFINE_EXCEPTION_TYPE_INFO(invalid_scheduler_policy_thread_specification, 1, &exception_cxx_type_info, NULL)
DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_attach, 1, &exception_cxx_type_info, NULL)
DEFINE_EXCEPTION_TYPE_INFO(improper_scheduler_detach, 1, &exception_cxx_type_info, NULL)
#endif
void msvcrt_init_exception(void *base)
......@@ -1059,6 +1107,7 @@ void msvcrt_init_exception(void *base)
init_invalid_scheduler_policy_value_rtti(base);
init_invalid_scheduler_policy_thread_specification_rtti(base);
init_improper_scheduler_attach_rtti(base);
init_improper_scheduler_detach_rtti(base);
#endif
init_exception_cxx(base);
......@@ -1075,6 +1124,7 @@ void msvcrt_init_exception(void *base)
init_invalid_scheduler_policy_value_cxx(base);
init_invalid_scheduler_policy_thread_specification_cxx(base);
init_improper_scheduler_attach_cxx(base);
init_improper_scheduler_detach_cxx(base);
#endif
#endif
}
......@@ -1119,6 +1169,11 @@ void throw_exception(exception_type et, HRESULT hr, const char *str)
improper_scheduler_attach_ctor_str(&e, str);
_CxxThrowException(&e, &improper_scheduler_attach_exception_type);
}
case EXCEPTION_IMPROPER_SCHEDULER_DETACH: {
improper_scheduler_detach e;
improper_scheduler_detach_ctor_str(&e, str);
_CxxThrowException(&e, &improper_scheduler_detach_exception_type);
}
#endif
}
}
......
......@@ -292,6 +292,7 @@ typedef enum {
EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE,
EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION,
EXCEPTION_IMPROPER_SCHEDULER_ATTACH,
EXCEPTION_IMPROPER_SCHEDULER_DETACH,
#endif
} exception_type;
void throw_exception(exception_type, HRESULT, const char*) DECLSPEC_HIDDEN;
......
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