winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2017
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
717 discussions
Start a n
N
ew thread
Jacek Caban : server: Added support for flushing client pipe.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 975c5381ede8f797b6f60a3e8fded712804c1c68 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=975c5381ede8f797b6f60a3e8…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Mar 26 12:52:50 2017 +0200 server: Added support for flushing client pipe. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/pipe.c | 7 +++++++ server/named_pipe.c | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 58bad06..cf2a3a3 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -2853,6 +2853,9 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode) trace("testing %s, %s server->client writes...\n", msg_mode ? "message mode" : "byte mode", msg_read_mode ? "message read" : "byte read"); test_blocking_rw(server, client, 5000, msg_mode, msg_read_mode); + trace("testing %s, %s client->server writes...\n", + msg_mode ? "message mode" : "byte mode", msg_read_mode ? "message read" : "byte read"); + test_blocking_rw(client, server, 6000, msg_mode, msg_read_mode); CloseHandle(client); CloseHandle(server); @@ -2869,18 +2872,22 @@ static void test_overlapped_transport(BOOL msg_mode, BOOL msg_read_mode) /* close server with pending writes */ create_overlapped_pipe(create_flags, &client, &server); overlapped_write_async(client, buf, 7000, &overlapped); + flush = test_flush_async(client, ERROR_BROKEN_PIPE); CloseHandle(server); test_overlapped_failure(client, &overlapped, ERROR_BROKEN_PIPE); + test_flush_done(flush); CloseHandle(client); /* disconnect with pending writes */ create_overlapped_pipe(create_flags, &client, &server); overlapped_write_async(client, buf, 7000, &overlapped); overlapped_write_async(server, buf, 7000, &overlapped2); + flush = test_flush_async(client, ERROR_PIPE_NOT_CONNECTED); res = DisconnectNamedPipe(server); ok(res, "DisconnectNamedPipe failed: %u\n", GetLastError()); test_overlapped_failure(client, &overlapped, ERROR_PIPE_NOT_CONNECTED); test_overlapped_failure(client, &overlapped2, ERROR_PIPE_NOT_CONNECTED); + test_flush_done(flush); CloseHandle(server); CloseHandle(client); } diff --git a/server/named_pipe.c b/server/named_pipe.c index e5b6dd1..bbdf3bc 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -656,6 +656,9 @@ static obj_handle_t pipe_end_flush( struct pipe_end *pipe_end, struct async *asy { obj_handle_t handle = 0; + if (use_server_io( pipe_end ) && (!pipe_end->connection || list_empty( &pipe_end->connection->message_queue ))) + return 0; + if (!fd_queue_async( pipe_end->fd, async, ASYNC_TYPE_WAIT )) return 0; if (!blocking || (handle = alloc_handle( current->process, async, SYNCHRONIZE, 0 ))) @@ -682,8 +685,9 @@ static obj_handle_t pipe_server_flush( struct fd *fd, struct async *async, int b static obj_handle_t pipe_client_flush( struct fd *fd, struct async *async, int blocking ) { - /* FIXME: what do we have to do for this? */ - return 0; + struct pipe_end *pipe_end = get_fd_user( fd ); + /* FIXME: Support byte mode. */ + return use_server_io( pipe_end ) ? pipe_end_flush( pipe_end, async, blocking ) : 0; } static void message_queue_read( struct pipe_end *pipe_end, struct iosb *iosb )
1
0
0
0
Jacek Caban : server: Added support for message mode named pipe reads.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: aa472f5eb50009c7f7e31526918119ed3f202de0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa472f5eb50009c7f7e315269…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Sun Mar 26 12:52:39 2017 +0200 server: Added support for message mode named pipe reads. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/pipe.c | 45 ++++++--------------------------------------- server/named_pipe.c | 26 +++++++++++++++++--------- 2 files changed, 23 insertions(+), 48 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=aa472f5eb50009c7f7e31…
1
0
0
0
Alex Henrie : winecfg: Paint text on About tab with the right background color.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 127bb951e17a934a6d64b4e8554292256edeee7a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=127bb951e17a934a6d64b4e85…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun Mar 26 21:26:16 2017 -0600 winecfg: Paint text on About tab with the right background color. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winecfg/about.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/winecfg/about.c b/programs/winecfg/about.c index 09cc015..a2b4022 100644 --- a/programs/winecfg/about.c +++ b/programs/winecfg/about.c @@ -171,6 +171,7 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case IDC_ABT_PANEL_TEXT: case IDC_ABT_LICENSE_TEXT: case IDC_ABT_WEB_LINK: + SetBkColor((HDC)wParam, GetSysColor(COLOR_WINDOW)); return (INT_PTR)CreateSolidBrush(GetSysColor(COLOR_WINDOW)); } break;
1
0
0
0
Piotr Caban : msvcrt: Throw improper_lock exception in critical_section:: lock and try_lock_for.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: c03b7fd9cb416ef5a4bd44729ac234ef71481553 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c03b7fd9cb416ef5a4bd44729…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:28:29 2017 +0200 msvcrt: Throw improper_lock exception in critical_section::lock and try_lock_for. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/lock.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index f4cf558..8e2bcc9 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -366,10 +366,8 @@ void __thiscall critical_section_lock(critical_section *this) TRACE("(%p)\n", this); - if(this->unk_thread_id == GetCurrentThreadId()) { - FIXME("throw exception\n"); - return; - } + if(this->unk_thread_id == GetCurrentThreadId()) + throw_exception(EXCEPTION_IMPROPER_LOCK, 0, "Already locked"); memset(&q, 0, sizeof(q)); last = InterlockedExchangePointer(&this->tail, &q); @@ -394,10 +392,8 @@ MSVCRT_bool __thiscall critical_section_try_lock(critical_section *this) TRACE("(%p)\n", this); - if(this->unk_thread_id == GetCurrentThreadId()) { - FIXME("throw exception\n"); + if(this->unk_thread_id == GetCurrentThreadId()) return FALSE; - } memset(&q, 0, sizeof(q)); if(!InterlockedCompareExchangePointer(&this->tail, &q, NULL)) { @@ -466,10 +462,8 @@ MSVCRT_bool __thiscall critical_section_try_lock_for( TRACE("(%p %d)\n", this, timeout); - if(this->unk_thread_id == GetCurrentThreadId()) { - FIXME("throw exception\n"); - return FALSE; - } + if(this->unk_thread_id == GetCurrentThreadId()) + throw_exception(EXCEPTION_IMPROPER_LOCK, 0, "Already locked"); if(!(q = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*q)))) return critical_section_try_lock(this);
1
0
0
0
Piotr Caban : msvcrt: Add SchedulerPolicy class implementation.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: e71edd0a1e2578ac50e26668372e49e4808adb25 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e71edd0a1e2578ac50e266683…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:28:19 2017 +0200 msvcrt: Add SchedulerPolicy class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/msvcrt.h | 2 + dlls/msvcrt/scheduler.c | 120 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 108 insertions(+), 14 deletions(-) diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 04c97a8..e24f500 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1411,4 +1411,6 @@ static inline BOOL heap_free(void *mem) { return HeapFree(GetProcessHeap(), 0, mem); } + +#define INHERIT_THREAD_PRIORITY 0xF000 #endif /* __WINE_MSVCRT_H */ diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 9551810..23220b8 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -330,6 +330,7 @@ typedef enum { ContextPriority, SchedulingProtocol, DynamicProgressFeedback, + WinRTInitialization, last_policy_id } PolicyElementKey; @@ -345,8 +346,47 @@ DEFINE_THISCALL_WRAPPER(SchedulerPolicy_SetPolicyValue, 12) unsigned int __thiscall SchedulerPolicy_SetPolicyValue(SchedulerPolicy *this, PolicyElementKey policy, unsigned int val) { - FIXME("(%p %d %d) stub\n", this, policy, val); - return 0; + unsigned int ret; + + TRACE("(%p %d %d)\n", this, policy, val); + + if (policy == MinConcurrency) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "MinConcurrency"); + if (policy == MaxConcurrency) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "MaxConcurrency"); + if (policy < SchedulerKind || policy >= last_policy_id) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "Invalid policy"); + + switch(policy) { + case SchedulerKind: + if (val) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, 0, "SchedulerKind"); + break; + case TargetOversubscriptionFactor: + if (!val) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, + 0, "TargetOversubscriptionFactor"); + break; + case ContextPriority: + if (((int)val < -7 /* THREAD_PRIORITY_REALTIME_LOWEST */ + || val > 6 /* THREAD_PRIORITY_REALTIME_HIGHEST */) + && val != THREAD_PRIORITY_IDLE && val != THREAD_PRIORITY_TIME_CRITICAL + && val != INHERIT_THREAD_PRIORITY) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, 0, "ContextPriority"); + break; + case SchedulingProtocol: + case DynamicProgressFeedback: + case WinRTInitialization: + if (val != 0 && val != 1) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, 0, "SchedulingProtocol"); + break; + default: + break; + } + + ret = this->policy_container->policies[policy]; + this->policy_container->policies[policy] = val; + return ret; } /* ?SetConcurrencyLimits@SchedulerPolicy@Concurrency@@QAEXII@Z */ @@ -355,7 +395,15 @@ DEFINE_THISCALL_WRAPPER(SchedulerPolicy_SetConcurrencyLimits, 12) void __thiscall SchedulerPolicy_SetConcurrencyLimits(SchedulerPolicy *this, unsigned int min_concurrency, unsigned int max_concurrency) { - FIXME("(%p %d %d) stub\n", this, min_concurrency, max_concurrency); + 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 (!max_concurrency) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_VALUE, 0, "MaxConcurrency"); + + this->policy_container->policies[MinConcurrency] = min_concurrency; + this->policy_container->policies[MaxConcurrency] = max_concurrency; } /* ?GetPolicyValue@SchedulerPolicy@Concurrency@@QBEIW4PolicyElementKey@2@@Z */ @@ -364,8 +412,11 @@ DEFINE_THISCALL_WRAPPER(SchedulerPolicy_GetPolicyValue, 8) unsigned int __thiscall SchedulerPolicy_GetPolicyValue( const SchedulerPolicy *this, PolicyElementKey policy) { - FIXME("(%p %d) stub\n", this, policy); - return 0; + TRACE("(%p %d)\n", this, policy); + + if (policy < SchedulerKind || policy >= last_policy_id) + throw_exception(EXCEPTION_INVALID_SCHEDULER_POLICY_KEY, 0, "Invalid policy"); + return this->policy_container->policies[policy]; } /* ??0SchedulerPolicy@Concurrency@@QAE@XZ */ @@ -373,17 +424,54 @@ unsigned int __thiscall SchedulerPolicy_GetPolicyValue( DEFINE_THISCALL_WRAPPER(SchedulerPolicy_ctor, 4) SchedulerPolicy* __thiscall SchedulerPolicy_ctor(SchedulerPolicy *this) { - FIXME("(%p) stub\n", this); - return NULL; + TRACE("(%p)\n", this); + + this->policy_container = MSVCRT_operator_new(sizeof(*this->policy_container)); + /* TODO: default values can probably be affected by CurrentScheduler */ + this->policy_container->policies[SchedulerKind] = 0; + this->policy_container->policies[MaxConcurrency] = -1; + this->policy_container->policies[MinConcurrency] = 1; + this->policy_container->policies[TargetOversubscriptionFactor] = 1; + this->policy_container->policies[LocalContextCacheSize] = 8; + this->policy_container->policies[ContextStackSize] = 0; + this->policy_container->policies[ContextPriority] = THREAD_PRIORITY_NORMAL; + this->policy_container->policies[SchedulingProtocol] = 0; + this->policy_container->policies[DynamicProgressFeedback] = 1; + return this; } /* ??0SchedulerPolicy@Concurrency@@QAA@IZZ */ /* ??0SchedulerPolicy@Concurrency@@QEAA@_KZZ */ +/* TODO: don't leak policy_container on exception */ SchedulerPolicy* __cdecl SchedulerPolicy_ctor_policies( SchedulerPolicy *this, MSVCRT_size_t n, ...) { - FIXME("(%p %ld) stub\n", this, n); - return NULL; + unsigned int min_concurrency, max_concurrency; + __ms_va_list valist; + MSVCRT_size_t i; + + TRACE("(%p %ld)\n", this, n); + + SchedulerPolicy_ctor(this); + min_concurrency = this->policy_container->policies[MinConcurrency]; + max_concurrency = this->policy_container->policies[MaxConcurrency]; + + __ms_va_start(valist, n); + for(i=0; i<n; i++) { + PolicyElementKey policy = va_arg(valist, PolicyElementKey); + unsigned int val = va_arg(valist, unsigned int); + + if(policy == MinConcurrency) + min_concurrency = val; + else if(policy == MaxConcurrency) + max_concurrency = val; + else + SchedulerPolicy_SetPolicyValue(this, policy, val); + } + __ms_va_end(valist); + + SchedulerPolicy_SetConcurrencyLimits(this, min_concurrency, max_concurrency); + return this; } /* ??4SchedulerPolicy@Concurrency@@QAEAAV01@ABV01@@Z */ @@ -392,8 +480,10 @@ DEFINE_THISCALL_WRAPPER(SchedulerPolicy_op_assign, 8) SchedulerPolicy* __thiscall SchedulerPolicy_op_assign( SchedulerPolicy *this, const SchedulerPolicy *rhs) { - FIXME("(%p %p) stub\n", this, rhs); - return NULL; + TRACE("(%p %p)\n", this, rhs); + memcpy(this->policy_container->policies, rhs->policy_container->policies, + sizeof(this->policy_container->policies)); + return this; } /* ??0SchedulerPolicy@Concurrency@@QAE@ABV01@@Z */ @@ -402,8 +492,9 @@ DEFINE_THISCALL_WRAPPER(SchedulerPolicy_copy_ctor, 8) SchedulerPolicy* __thiscall SchedulerPolicy_copy_ctor( SchedulerPolicy *this, const SchedulerPolicy *rhs) { - FIXME("(%p %p) stub\n", this, rhs); - return NULL; + TRACE("(%p %p)\n", this, rhs); + SchedulerPolicy_ctor(this); + return SchedulerPolicy_op_assign(this, rhs); } /* ??1SchedulerPolicy@Concurrency@@QAE@XZ */ @@ -411,7 +502,8 @@ SchedulerPolicy* __thiscall SchedulerPolicy_copy_ctor( DEFINE_THISCALL_WRAPPER(SchedulerPolicy_dtor, 4) void __thiscall SchedulerPolicy_dtor(SchedulerPolicy *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + MSVCRT_operator_delete(this->policy_container); } extern const vtable_ptr MSVCRT_type_info_vtable;
1
0
0
0
Piotr Caban : msvcrt: Add invalid_scheduler_policy_thread_specification class implementation.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 9bb7731e8ec641ad92db320db86a174b11f7bbe5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9bb7731e8ec641ad92db320db…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:27:33 2017 +0200 msvcrt: Add invalid_scheduler_policy_thread_specification class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 8 +++--- dlls/msvcr100/msvcr100.spec | 8 +++--- dlls/msvcr110/msvcr110.spec | 12 ++++---- dlls/msvcr120/msvcr120.spec | 12 ++++---- dlls/msvcr120_app/msvcr120_app.spec | 12 ++++---- dlls/msvcrt/cpp.c | 55 +++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.h | 1 + 7 files changed, 82 insertions(+), 26 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9bb7731e8ec641ad92db3…
1
0
0
0
Piotr Caban : msvcrt: Add invalid_scheduler_policy_value class implementation.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 04d8ace09d481dc42fb707ee2879d1029ae862d6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04d8ace09d481dc42fb707ee2…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:27:22 2017 +0200 msvcrt: Add invalid_scheduler_policy_value class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 8 +++--- dlls/msvcr100/msvcr100.spec | 8 +++--- dlls/msvcr110/msvcr110.spec | 12 ++++---- dlls/msvcr120/msvcr120.spec | 12 ++++---- dlls/msvcr120_app/msvcr120_app.spec | 12 ++++---- dlls/msvcrt/cpp.c | 55 +++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.h | 1 + 7 files changed, 82 insertions(+), 26 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=04d8ace09d481dc42fb70…
1
0
0
0
Piotr Caban : msvcrt: Add invalid_scheduler_policy_key class implementation.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 11fbb1023d34f36d202869d23f9b6ba850cd0ef1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=11fbb1023d34f36d202869d23…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:27:08 2017 +0200 msvcrt: Add invalid_scheduler_policy_key class implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 8 +++--- dlls/msvcr100/msvcr100.spec | 8 +++--- dlls/msvcr110/msvcr110.spec | 12 ++++---- dlls/msvcr120/msvcr120.spec | 12 ++++---- dlls/msvcr120_app/msvcr120_app.spec | 12 ++++---- dlls/msvcrt/cpp.c | 55 +++++++++++++++++++++++++++++++++++++ dlls/msvcrt/msvcrt.h | 1 + 7 files changed, 82 insertions(+), 26 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=11fbb1023d34f36d20286…
1
0
0
0
Piotr Caban : msvcrt: Add helper for exception throwing.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 90307e067f985f5963b62829993b320537578333 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=90307e067f985f5963b628299…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:26:54 2017 +0200 msvcrt: Add helper for exception throwing. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/cpp.c | 38 +++++++++++++++++++------------------- dlls/msvcrt/heap.c | 2 +- dlls/msvcrt/lock.c | 8 ++++---- dlls/msvcrt/msvcrt.h | 11 +++++++---- dlls/msvcrt/scheduler.c | 4 ++-- 5 files changed, 33 insertions(+), 30 deletions(-) diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index 70f5cb5..b69ff9a 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -880,27 +880,27 @@ void msvcrt_init_exception(void *base) } #if _MSVCR_VER >= 80 -void throw_bad_alloc(const char *str) +void throw_exception(exception_type et, HRESULT hr, const char *str) { - bad_alloc e; - bad_alloc_ctor(&e, &str); - _CxxThrowException(&e, &bad_alloc_exception_type); -} -#endif - + switch(et) { + case EXCEPTION_BAD_ALLOC: { + bad_alloc e; + bad_alloc_ctor(&e, &str); + _CxxThrowException(&e, &bad_alloc_exception_type); + } #if _MSVCR_VER >= 100 -void throw_scheduler_resource_allocation_error(const char *str, HRESULT hr) -{ - scheduler_resource_allocation_error e; - 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); + case EXCEPTION_SCHEDULER_RESOURCE_ALLOCATION_ERROR: { + scheduler_resource_allocation_error e; + scheduler_resource_allocation_error_ctor_name(&e, str, hr); + _CxxThrowException(&e.e, &scheduler_resource_allocation_error_exception_type); + } + case EXCEPTION_IMPROPER_LOCK: { + improper_lock e; + improper_lock_ctor_str(&e, str); + _CxxThrowException(&e, &improper_lock_exception_type); + } +#endif + } } #endif diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 3ae2599..ed41253 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -151,7 +151,7 @@ void* CDECL MSVCRT_operator_new(MSVCRT_size_t size) TRACE("(%ld) out of memory\n", size); #if _MSVCR_VER >= 80 - throw_bad_alloc("bad allocation"); + throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); #endif return NULL; } diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index c2efae1..f4cf558 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -763,7 +763,7 @@ int __cdecl event_wait_for_multiple(event **events, MSVCRT_size_t count, MSVCRT_ wait = heap_alloc(FIELD_OFFSET(thread_wait, entries[count])); if(!wait) - throw_bad_alloc("bad allocation"); + throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); ret = evt_wait(wait, events, count, wait_all, timeout); heap_free(wait); @@ -846,7 +846,7 @@ MSVCRT_bool __thiscall _Condition_variable_wait_for(_Condition_variable *this, TRACE("(%p %p %d)\n", this, cs, timeout); if(!(q = HeapAlloc(GetProcessHeap(), 0, sizeof(cv_queue)))) { - throw_bad_alloc("bad allocation"); + throw_exception(EXCEPTION_BAD_ALLOC, 0, "bad allocation"); } critical_section_lock(&this->lock); @@ -1026,7 +1026,7 @@ void __thiscall reader_writer_lock_lock(reader_writer_lock *this) TRACE("(%p)\n", this); if (this->thread_id == GetCurrentThreadId()) - throw_improper_lock("Already locked"); + throw_exception(EXCEPTION_IMPROPER_LOCK, 0, "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()) - throw_improper_lock("Already locked as writer"); + throw_exception(EXCEPTION_IMPROPER_LOCK, 0, "Already locked as writer"); do { q.next = this->reader_head; diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 775ee0c..2b9d229 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -283,11 +283,14 @@ extern WORD MSVCRT__ctype [257]; void msvcrt_set_errno(int) DECLSPEC_HIDDEN; #if _MSVCR_VER >= 80 -void throw_bad_alloc(const char*) DECLSPEC_HIDDEN; -#endif +typedef enum { + EXCEPTION_BAD_ALLOC, #if _MSVCR_VER >= 100 -void throw_scheduler_resource_allocation_error(const char*, HRESULT) DECLSPEC_HIDDEN; -void throw_improper_lock(const char*) DECLSPEC_HIDDEN; + EXCEPTION_SCHEDULER_RESOURCE_ALLOCATION_ERROR, + EXCEPTION_IMPROPER_LOCK, +#endif +} exception_type; +void throw_exception(exception_type, HRESULT, const char*) DECLSPEC_HIDDEN; #endif void __cdecl _purecall(void); diff --git a/dlls/msvcrt/scheduler.c b/dlls/msvcrt/scheduler.c index 5d31d58..9551810 100644 --- a/dlls/msvcrt/scheduler.c +++ b/dlls/msvcrt/scheduler.c @@ -99,8 +99,8 @@ static Context* get_current_context(void) if (context_tls_index == TLS_OUT_OF_INDEXES) { int tls_index = TlsAlloc(); if (tls_index == TLS_OUT_OF_INDEXES) { - throw_scheduler_resource_allocation_error(NULL, - HRESULT_FROM_WIN32(GetLastError())); + throw_exception(EXCEPTION_SCHEDULER_RESOURCE_ALLOCATION_ERROR, + HRESULT_FROM_WIN32(GetLastError()), NULL); return NULL; }
1
0
0
0
Piotr Caban : msvcrt: Add SchedulerPolicy class stub.
by Alexandre Julliard
27 Mar '17
27 Mar '17
Module: wine Branch: master Commit: 895928860dd8ec08d67ad11c644f74d46c75e909 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=895928860dd8ec08d67ad11c6…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 27 10:26:39 2017 +0200 msvcrt: Add SchedulerPolicy class stub. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 32 ++++++------- dlls/msvcr100/msvcr100.spec | 32 ++++++------- dlls/msvcr110/msvcr110.spec | 46 +++++++++--------- dlls/msvcr120/msvcr120.spec | 46 +++++++++--------- dlls/msvcr120_app/msvcr120_app.spec | 46 +++++++++--------- dlls/msvcrt/scheduler.c | 94 +++++++++++++++++++++++++++++++++++++ 6 files changed, 195 insertions(+), 101 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=895928860dd8ec08d67ad…
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
72
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Results per page:
10
25
50
100
200