msvcrt: Move invalid_scheduler_policy_thread_specification to concurrency.c.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a7bbdea089
commit
c9189a411b
|
@ -305,6 +305,9 @@ extern const vtable_ptr improper_lock_vtable;
|
|||
typedef exception invalid_scheduler_policy_key;
|
||||
extern const vtable_ptr invalid_scheduler_policy_key_vtable;
|
||||
|
||||
typedef exception invalid_scheduler_policy_thread_specification;
|
||||
extern const vtable_ptr invalid_scheduler_policy_thread_specification_vtable;
|
||||
|
||||
typedef exception invalid_scheduler_policy_value;
|
||||
extern const vtable_ptr invalid_scheduler_policy_value_vtable;
|
||||
|
||||
|
@ -394,6 +397,33 @@ invalid_scheduler_policy_key * __thiscall invalid_scheduler_policy_key_copy_ctor
|
|||
return __exception_copy_ctor(_this, rhs, &invalid_scheduler_policy_key_vtable);
|
||||
}
|
||||
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@PBD@Z */
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@PEBD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor_str, 8)
|
||||
invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor_str(
|
||||
invalid_scheduler_policy_thread_specification *this, const char *str)
|
||||
{
|
||||
TRACE("(%p %p)\n", this, str);
|
||||
return __exception_ctor(this, str, &invalid_scheduler_policy_thread_specification_vtable);
|
||||
}
|
||||
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@XZ */
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor, 4)
|
||||
invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor(
|
||||
invalid_scheduler_policy_thread_specification *this)
|
||||
{
|
||||
return invalid_scheduler_policy_thread_specification_ctor_str(this, NULL);
|
||||
}
|
||||
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_copy_ctor,8)
|
||||
invalid_scheduler_policy_thread_specification * __thiscall invalid_scheduler_policy_thread_specification_copy_ctor(
|
||||
invalid_scheduler_policy_thread_specification * _this, const invalid_scheduler_policy_thread_specification * rhs)
|
||||
{
|
||||
TRACE("(%p %p)\n", _this, rhs);
|
||||
return __exception_copy_ctor(_this, rhs, &invalid_scheduler_policy_thread_specification_vtable);
|
||||
}
|
||||
|
||||
/* ??0invalid_scheduler_policy_value@Concurrency@@QAE@PBD@Z */
|
||||
/* ??0invalid_scheduler_policy_value@Concurrency@@QEAA@PEBD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_value_ctor_str, 8)
|
||||
|
@ -470,6 +500,8 @@ DEFINE_RTTI_DATA1(improper_lock, 0, &cexception_rtti_base_descriptor,
|
|||
".?AVimproper_lock@Concurrency@@")
|
||||
DEFINE_RTTI_DATA1(invalid_scheduler_policy_key, 0, &cexception_rtti_base_descriptor,
|
||||
".?AVinvalid_scheduler_policy_key@Concurrency@@")
|
||||
DEFINE_RTTI_DATA1(invalid_scheduler_policy_thread_specification, 0, &cexception_rtti_base_descriptor,
|
||||
".?AVinvalid_scheduler_policy_thread_specification@Concurrency@@")
|
||||
DEFINE_RTTI_DATA1(invalid_scheduler_policy_value, 0, &cexception_rtti_base_descriptor,
|
||||
".?AVinvalid_scheduler_policy_value@Concurrency@@")
|
||||
DEFINE_RTTI_DATA1(scheduler_resource_allocation_error, 0, &cexception_rtti_base_descriptor,
|
||||
|
@ -477,6 +509,7 @@ DEFINE_RTTI_DATA1(scheduler_resource_allocation_error, 0, &cexception_rtti_base_
|
|||
|
||||
DEFINE_CXX_DATA1(improper_lock, &cexception_cxx_type_info, cexception_dtor)
|
||||
DEFINE_CXX_DATA1(invalid_scheduler_policy_key, &cexception_cxx_type_info, cexception_dtor)
|
||||
DEFINE_CXX_DATA1(invalid_scheduler_policy_thread_specification, &cexception_cxx_type_info, cexception_dtor)
|
||||
DEFINE_CXX_DATA1(invalid_scheduler_policy_value, &cexception_cxx_type_info, cexception_dtor)
|
||||
DEFINE_CXX_DATA1(scheduler_resource_allocation_error, &cexception_cxx_type_info, cexception_dtor)
|
||||
|
||||
|
@ -487,6 +520,9 @@ __ASM_BLOCK_BEGIN(concurrency_exception_vtables)
|
|||
__ASM_VTABLE(invalid_scheduler_policy_key,
|
||||
VTABLE_ADD_FUNC(cexception_vector_dtor)
|
||||
VTABLE_ADD_FUNC(cexception_what));
|
||||
__ASM_VTABLE(invalid_scheduler_policy_thread_specification,
|
||||
VTABLE_ADD_FUNC(cexception_vector_dtor)
|
||||
VTABLE_ADD_FUNC(cexception_what));
|
||||
__ASM_VTABLE(invalid_scheduler_policy_value,
|
||||
VTABLE_ADD_FUNC(cexception_vector_dtor)
|
||||
VTABLE_ADD_FUNC(cexception_what));
|
||||
|
@ -859,8 +895,11 @@ void __thiscall SchedulerPolicy_SetConcurrencyLimits(SchedulerPolicy *this,
|
|||
{
|
||||
TRACE("(%p %d %d)\n", this, min_concurrency, max_concurrency);
|
||||
|
||||
if (min_concurrency > max_concurrency)
|
||||
throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION, 0, NULL);
|
||||
if (min_concurrency > max_concurrency) {
|
||||
invalid_scheduler_policy_thread_specification e;
|
||||
invalid_scheduler_policy_thread_specification_ctor_str(&e, NULL);
|
||||
_CxxThrowException(&e, &invalid_scheduler_policy_thread_specification_exception_type);
|
||||
}
|
||||
if (!max_concurrency) {
|
||||
invalid_scheduler_policy_value e;
|
||||
invalid_scheduler_policy_value_ctor_str(&e, "MaxConcurrency");
|
||||
|
@ -2682,6 +2721,7 @@ void msvcrt_init_concurrency(void *base)
|
|||
init_cexception_rtti(base);
|
||||
init_improper_lock_rtti(base);
|
||||
init_invalid_scheduler_policy_key_rtti(base);
|
||||
init_invalid_scheduler_policy_thread_specification_rtti(base);
|
||||
init_invalid_scheduler_policy_value_rtti(base);
|
||||
init_scheduler_resource_allocation_error_rtti(base);
|
||||
init_Context_rtti(base);
|
||||
|
@ -2694,6 +2734,7 @@ void msvcrt_init_concurrency(void *base)
|
|||
init_cexception_cxx_type_info(base);
|
||||
init_improper_lock_cxx(base);
|
||||
init_invalid_scheduler_policy_key_cxx(base);
|
||||
init_invalid_scheduler_policy_thread_specification_cxx(base);
|
||||
init_invalid_scheduler_policy_value_cxx(base);
|
||||
init_scheduler_resource_allocation_error_cxx(base);
|
||||
#endif
|
||||
|
|
|
@ -551,36 +551,6 @@ void __thiscall bad_alloc_dtor(bad_alloc * _this)
|
|||
|
||||
#if _MSVCR_VER >= 100
|
||||
|
||||
typedef exception invalid_scheduler_policy_thread_specification;
|
||||
extern const vtable_ptr invalid_scheduler_policy_thread_specification_vtable;
|
||||
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@PBD@Z */
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@PEBD@Z */
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor_str, 8)
|
||||
invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor_str(
|
||||
invalid_scheduler_policy_thread_specification *this, const char *str)
|
||||
{
|
||||
TRACE("(%p %p)\n", this, str);
|
||||
return __exception_ctor(this, str, &invalid_scheduler_policy_thread_specification_vtable);
|
||||
}
|
||||
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QAE@XZ */
|
||||
/* ??0invalid_scheduler_policy_thread_specification@Concurrency@@QEAA@XZ */
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_ctor, 4)
|
||||
invalid_scheduler_policy_thread_specification* __thiscall invalid_scheduler_policy_thread_specification_ctor(
|
||||
invalid_scheduler_policy_thread_specification *this)
|
||||
{
|
||||
return invalid_scheduler_policy_thread_specification_ctor_str(this, NULL);
|
||||
}
|
||||
|
||||
DEFINE_THISCALL_WRAPPER(invalid_scheduler_policy_thread_specification_copy_ctor,8)
|
||||
invalid_scheduler_policy_thread_specification * __thiscall invalid_scheduler_policy_thread_specification_copy_ctor(
|
||||
invalid_scheduler_policy_thread_specification * _this, const invalid_scheduler_policy_thread_specification * rhs)
|
||||
{
|
||||
TRACE("(%p %p)\n", _this, rhs);
|
||||
return __exception_copy_ctor(_this, rhs, &invalid_scheduler_policy_thread_specification_vtable);
|
||||
}
|
||||
|
||||
typedef exception improper_scheduler_attach;
|
||||
extern const vtable_ptr improper_scheduler_attach_vtable;
|
||||
|
||||
|
@ -663,9 +633,6 @@ __ASM_VTABLE(__non_rtti_object,
|
|||
VTABLE_ADD_FUNC(__non_rtti_object_vector_dtor)
|
||||
VTABLE_ADD_FUNC(exception_what));
|
||||
#if _MSVCR_VER >= 100
|
||||
__ASM_VTABLE(invalid_scheduler_policy_thread_specification,
|
||||
VTABLE_ADD_FUNC(exception_vector_dtor)
|
||||
VTABLE_ADD_FUNC(exception_what));
|
||||
__ASM_VTABLE(improper_scheduler_attach,
|
||||
VTABLE_ADD_FUNC(exception_vector_dtor)
|
||||
VTABLE_ADD_FUNC(exception_what));
|
||||
|
@ -688,8 +655,6 @@ DEFINE_RTTI_DATA1( bad_cast, 0, &exception_rtti_base_descriptor, ".?AVbad_cast@@
|
|||
DEFINE_RTTI_DATA2( __non_rtti_object, 0, &bad_typeid_rtti_base_descriptor, &exception_rtti_base_descriptor, ".?AV__non_rtti_object@@" )
|
||||
#endif
|
||||
#if _MSVCR_VER >= 100
|
||||
DEFINE_RTTI_DATA1(invalid_scheduler_policy_thread_specification, 0, &exception_rtti_base_descriptor,
|
||||
".?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,
|
||||
|
@ -705,7 +670,6 @@ DEFINE_CXX_DATA2( __non_rtti_object, &bad_typeid_cxx_type_info,
|
|||
DEFINE_CXX_DATA1( bad_alloc, &exception_cxx_type_info, bad_alloc_dtor )
|
||||
#endif
|
||||
#if _MSVCR_VER >= 100
|
||||
DEFINE_CXX_DATA1(invalid_scheduler_policy_thread_specification, &exception_cxx_type_info, exception_dtor)
|
||||
DEFINE_CXX_DATA1(improper_scheduler_attach, &exception_cxx_type_info, exception_dtor)
|
||||
DEFINE_CXX_DATA1(improper_scheduler_detach, &exception_cxx_type_info, exception_dtor)
|
||||
#endif
|
||||
|
@ -723,7 +687,6 @@ void msvcrt_init_exception(void *base)
|
|||
init_bad_cast_rtti(base);
|
||||
init___non_rtti_object_rtti(base);
|
||||
#if _MSVCR_VER >= 100
|
||||
init_invalid_scheduler_policy_thread_specification_rtti(base);
|
||||
init_improper_scheduler_attach_rtti(base);
|
||||
init_improper_scheduler_detach_rtti(base);
|
||||
#endif
|
||||
|
@ -736,7 +699,6 @@ void msvcrt_init_exception(void *base)
|
|||
init_bad_alloc_cxx(base);
|
||||
#endif
|
||||
#if _MSVCR_VER >= 100
|
||||
init_invalid_scheduler_policy_thread_specification_cxx(base);
|
||||
init_improper_scheduler_attach_cxx(base);
|
||||
init_improper_scheduler_detach_cxx(base);
|
||||
#endif
|
||||
|
@ -753,11 +715,6 @@ void throw_exception(exception_type et, HRESULT hr, const char *str)
|
|||
_CxxThrowException(&e, &bad_alloc_exception_type);
|
||||
}
|
||||
#if _MSVCR_VER >= 100
|
||||
case EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION: {
|
||||
invalid_scheduler_policy_thread_specification e;
|
||||
invalid_scheduler_policy_thread_specification_ctor_str(&e, str);
|
||||
_CxxThrowException(&e, &invalid_scheduler_policy_thread_specification_exception_type);
|
||||
}
|
||||
case EXCEPTION_IMPROPER_SCHEDULER_ATTACH: {
|
||||
improper_scheduler_attach e;
|
||||
improper_scheduler_attach_ctor_str(&e, str);
|
||||
|
|
|
@ -190,7 +190,6 @@ void msvcrt_set_errno(int) DECLSPEC_HIDDEN;
|
|||
typedef enum {
|
||||
EXCEPTION_BAD_ALLOC,
|
||||
#if _MSVCR_VER >= 100
|
||||
EXCEPTION_INVALID_SCHEDULER_POLICY_THREAD_SPECIFICATION,
|
||||
EXCEPTION_IMPROPER_SCHEDULER_ATTACH,
|
||||
EXCEPTION_IMPROPER_SCHEDULER_DETACH,
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue