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
January 2018
----- 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
638 discussions
Start a n
N
ew thread
Jacek Caban : schtasks: Ignore /tr and /ru options.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 23800d67e0732daa5bcb089bc03893b5d1c9051a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=23800d67e0732daa5bcb089b…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jan 23 17:11:20 2018 +0100 schtasks: Ignore /tr and /ru options. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/schtasks/schtasks.c | 81 +++++++++++++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 24 deletions(-) diff --git a/programs/schtasks/schtasks.c b/programs/schtasks/schtasks.c index c6b8586..2ac7544 100644 --- a/programs/schtasks/schtasks.c +++ b/programs/schtasks/schtasks.c @@ -31,7 +31,9 @@ static const WCHAR create_optW[] = {'/','c','r','e','a','t','e',0}; static const WCHAR delete_optW[] = {'/','d','e','l','e','t','e',0}; static const WCHAR enable_optW[] = {'/','e','n','a','b','l','e',0}; static const WCHAR f_optW[] = {'/','f',0}; +static const WCHAR ru_optW[] = {'/','r','u',0}; static const WCHAR tn_optW[] = {'/','t','n',0}; +static const WCHAR tr_optW[] = {'/','t','r',0}; static const WCHAR xml_optW[] = {'/','x','m','l',0}; static ITaskFolder *get_tasks_root_folder(void) @@ -133,49 +135,71 @@ static BSTR read_file_to_bstr(const WCHAR *file_name) static int change_command(int argc, WCHAR *argv[]) { - const WCHAR *task_name; + BOOL have_option = FALSE, enable = FALSE; + const WCHAR *task_name = NULL; IRegisteredTask *task; HRESULT hres; - if (!argc) { - FIXME("Missing /tn option\n"); - return 1; - } + while (argc) { + if(!strcmpiW(argv[0], tn_optW)) { + if (argc < 2) { + FIXME("Missing /tn value\n"); + return 1; + } + + if (task_name) { + FIXME("Duplicated /tn argument\n"); + return 1; + } + + task_name = argv[1]; + argc -= 2; + argv += 2; + }else if (!strcmpiW(argv[0], enable_optW)) { + enable = TRUE; + have_option = TRUE; + argc--; + argv++; + }else if (!strcmpiW(argv[0], tr_optW)) { + if (argc < 2) { + FIXME("Missing /tr value\n"); + return 1; + } - if (strcmpiW(argv[0], tn_optW)) { - FIXME("Unsupported %s option\n", debugstr_w(argv[0])); - return 0; + FIXME("Unsupported /tr option %s\n", debugstr_w(argv[1])); + have_option = TRUE; + argc -= 2; + argv += 2; + }else { + FIXME("Unsupported arguments %s\n", debugstr_w(argv[0])); + return 1; + } } - if (argc < 2) { - FIXME("Missing /tn value\n"); + if (!task_name) { + FIXME("Missing /tn option\n"); return 1; } - task_name = argv[1]; - argc -= 2; - argv += 2; - if (!argc) { + if (!have_option) { FIXME("Missing change options\n"); return 1; } - if (strcmpiW(argv[0], enable_optW) || argc > 1) { - FIXME("Unsupported arguments %s\n", debugstr_w(argv[0])); - return 0; - } - task = get_registered_task(task_name); if (!task) return 1; - hres = IRegisteredTask_put_Enabled(task, VARIANT_TRUE); - IRegisteredTask_Release(task); - if (FAILED(hres)) { - FIXME("put_Enabled failed: %08x\n", hres); - return 1; + if (enable) { + hres = IRegisteredTask_put_Enabled(task, VARIANT_TRUE); + if (FAILED(hres)) { + IRegisteredTask_Release(task); + FIXME("put_Enabled failed: %08x\n", hres); + return 1; + } } + IRegisteredTask_Release(task); return 0; } @@ -222,6 +246,15 @@ static int create_command(int argc, WCHAR *argv[]) flags = TASK_CREATE_OR_UPDATE; argc--; argv++; + }else if (!strcmpiW(argv[0], ru_optW)) { + if (argc < 2) { + FIXME("Missing /ru value\n"); + return 1; + } + + FIXME("Unsupported /ru option %s\n", debugstr_w(argv[1])); + argc -= 2; + argv += 2; }else { FIXME("Unsupported argument %s\n", debugstr_w(argv[0])); return 1;
1
0
0
0
Piotr Caban : msvcp100: Support exceptions while copying object in _Concurrent_queue_base_v4:: _Internal_push.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 4e863fa7c721ac5aadb36acb8e033938a8223570 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4e863fa7c721ac5aadb36acb…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:04:39 2018 +0100 msvcp100: Support exceptions while copying object in _Concurrent_queue_base_v4::_Internal_push. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 49 +++++++++++++++++++++++++++++++++--------------- include/wine/exception.h | 2 +- 2 files changed, 35 insertions(+), 16 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index b3e546a..d9fe188 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -27,6 +27,7 @@ #include "winbase.h" #include "winternl.h" #include "wine/debug.h" +#include "wine/exception.h" WINE_DEFAULT_DEBUG_CHANNEL(msvcp); struct __Container_proxy; @@ -1397,6 +1398,12 @@ static MSVCP_size_t InterlockedIncrementSizeT(MSVCP_size_t volatile *dest) #define InterlockedIncrementSizeT(dest) InterlockedIncrement((LONG*)dest) #endif +static void CALLBACK queue_push_finally(BOOL normal, void *ctx) +{ + threadsafe_queue *queue = ctx; + InterlockedIncrementSizeT(&queue->tail_pos); +} + static void threadsafe_queue_push(threadsafe_queue *queue, MSVCP_size_t id, void *e, _Concurrent_queue_base_v4 *parent, BOOL copy) { @@ -1430,21 +1437,24 @@ static void threadsafe_queue_push(threadsafe_queue *queue, MSVCP_size_t id, p = queue->tail; } - /* TODO: Add exception handling */ - if(copy) - call__Concurrent_queue_base_v4__Copy_item(parent, p, id-page_id, e); - else - call__Concurrent_queue_base_v4__Move_item(parent, p, id-page_id, e); - p->_Mask |= 1 << (id - page_id); - InterlockedIncrementSizeT(&queue->tail_pos); + __TRY + { + if(copy) + call__Concurrent_queue_base_v4__Copy_item(parent, p, id-page_id, e); + else + call__Concurrent_queue_base_v4__Move_item(parent, p, id-page_id, e); + p->_Mask |= 1 << (id - page_id); + } + __FINALLY_CTX(queue_push_finally, queue); } -static void threadsafe_queue_pop(threadsafe_queue *queue, MSVCP_size_t id, +static BOOL threadsafe_queue_pop(threadsafe_queue *queue, MSVCP_size_t id, void *e, _Concurrent_queue_base_v4 *parent) { MSVCP_size_t page_id = id & ~(parent->alloc_count-1); int spin; _Page *p; + BOOL ret = FALSE; spin = 0; while(queue->tail_pos <= id) @@ -1455,8 +1465,12 @@ static void threadsafe_queue_pop(threadsafe_queue *queue, MSVCP_size_t id, spin_wait(&spin); p = queue->head; - /* TODO: Add exception handling */ - call__Concurrent_queue_base_v4__Assign_and_destroy_item(parent, e, p, id-page_id); + if(p->_Mask & (1 << (id-page_id))) + { + /* TODO: Add exception handling */ + call__Concurrent_queue_base_v4__Assign_and_destroy_item(parent, e, p, id-page_id); + ret = TRUE; + } if(id == page_id+parent->alloc_count-1) { @@ -1471,7 +1485,9 @@ static void threadsafe_queue_pop(threadsafe_queue *queue, MSVCP_size_t id, /* TODO: Add exception handling */ call__Concurrent_queue_base_v4__Deallocate_page(parent, p); } + InterlockedIncrementSizeT(&queue->head_pos); + return ret; } /* ?_Internal_push@_Concurrent_queue_base_v4@details@Concurrency@@IAEXPBX@Z */ @@ -1516,11 +1532,14 @@ MSVCP_bool __thiscall _Concurrent_queue_base_v4__Internal_pop_if_present( do { - id = this->data->head_pos; - if(id == this->data->tail_pos) return FALSE; - } while(InterlockedCompareExchangePointer((void**)&this->data->head_pos, - (void*)(id+1), (void*)id) != (void*)id); - threadsafe_queue_pop(this->data->queues + id % QUEUES_NO, id / QUEUES_NO, e, this); + do + { + id = this->data->head_pos; + if(id == this->data->tail_pos) return FALSE; + } while(InterlockedCompareExchangePointer((void**)&this->data->head_pos, + (void*)(id+1), (void*)id) != (void*)id); + } while(!threadsafe_queue_pop(this->data->queues + id % QUEUES_NO, + id / QUEUES_NO, e, this)); return TRUE; } diff --git a/include/wine/exception.h b/include/wine/exception.h index 8e3f481..3b1a3cf 100644 --- a/include/wine/exception.h +++ b/include/wine/exception.h @@ -92,7 +92,7 @@ extern "C" { #else /* USE_COMPILER_EXCEPTIONS */ -#if defined(__MINGW32__) || defined(__CYGWIN__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__WINE_SETJMP_H) #define sigjmp_buf jmp_buf #define sigsetjmp(buf,sigs) setjmp(buf) #define siglongjmp(buf,val) longjmp(buf,val)
1
0
0
0
Piotr Caban : msvcp120: Add _Concurrent_queue_base_v4 multi-threaded tests.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 2149f472eac3408334ce0a372ef170adbc2b9996 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2149f472eac3408334ce0a37…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:04:24 2018 +0100 msvcp120: Add _Concurrent_queue_base_v4 multi-threaded tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp120/tests/msvcp120.c | 211 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 198 insertions(+), 13 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2149f472eac3408334ce…
1
0
0
0
Piotr Caban : msvcp120: Add _Concurrent_queue_base_v4 tests.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 33ba5e296b74a0f22b776034d87faa212e638e4f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=33ba5e296b74a0f22b776034…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:04:17 2018 +0100 msvcp120: Add _Concurrent_queue_base_v4 tests. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp120/tests/msvcp120.c | 261 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 261 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=33ba5e296b74a0f22b77…
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4 push/ pop implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 411e3c51c01daa3c14e62220465b8829510e7981 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=411e3c51c01daa3c14e62220…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:03:56 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4 push/pop implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 157 insertions(+), 5 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index ca85079..b3e546a 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1236,9 +1236,24 @@ typedef struct extern const vtable_ptr MSVCP__Concurrent_queue_base_v4_vtable; #if _MSVCP_VER == 100 +#define call__Concurrent_queue_base_v4__Move_item call__Concurrent_queue_base_v4__Copy_item +#define call__Concurrent_queue_base_v4__Copy_item(this,dst,idx,src) CALL_VTBL_FUNC(this, \ + 0, void, (_Concurrent_queue_base_v4*,_Page*,MSVCP_size_t,const void*), (this,dst,idx,src)) +#define call__Concurrent_queue_base_v4__Assign_and_destroy_item(this,dst,src,idx) CALL_VTBL_FUNC(this, \ + 4, void, (_Concurrent_queue_base_v4*,void*,_Page*,MSVCP_size_t), (this,dst,src,idx)) +#define call__Concurrent_queue_base_v4__Allocate_page(this) CALL_VTBL_FUNC(this, \ + 12, _Page*, (_Concurrent_queue_base_v4*), (this)) #define call__Concurrent_queue_base_v4__Deallocate_page(this, page) CALL_VTBL_FUNC(this, \ 16, void, (_Concurrent_queue_base_v4*,_Page*), (this,page)) #else +#define call__Concurrent_queue_base_v4__Move_item(this,dst,idx,src) CALL_VTBL_FUNC(this, \ + 0, void, (_Concurrent_queue_base_v4*,_Page*,MSVCP_size_t,void*), (this,dst,idx,src)) +#define call__Concurrent_queue_base_v4__Copy_item(this,dst,idx,src) CALL_VTBL_FUNC(this, \ + 4, void, (_Concurrent_queue_base_v4*,_Page*,MSVCP_size_t,const void*), (this,dst,idx,src)) +#define call__Concurrent_queue_base_v4__Assign_and_destroy_item(this,dst,src,idx) CALL_VTBL_FUNC(this, \ + 8, void, (_Concurrent_queue_base_v4*,void*,_Page*,MSVCP_size_t), (this,dst,src,idx)) +#define call__Concurrent_queue_base_v4__Allocate_page(this) CALL_VTBL_FUNC(this, \ + 16, _Page*, (_Concurrent_queue_base_v4*), (this)) #define call__Concurrent_queue_base_v4__Deallocate_page(this, page) CALL_VTBL_FUNC(this, \ 20, void, (_Concurrent_queue_base_v4*,_Page*), (this,page)) #endif @@ -1344,13 +1359,134 @@ MSVCP_size_t __thiscall _Concurrent_queue_base_v4__Internal_size( return this->data->tail_pos - this->data->head_pos; } +static void spin_wait(int *counter) +{ + static int spin_limit = -1; + + if(spin_limit == -1) + { + SYSTEM_INFO si; + GetSystemInfo(&si); + spin_limit = si.dwNumberOfProcessors>1 ? 4000 : 0; + } + + if(*counter >= spin_limit) + { + *counter = 0; + Sleep(0); + } + else + { + (*counter)++; + } +} + +#ifdef _WIN64 +static MSVCP_size_t InterlockedIncrementSizeT(MSVCP_size_t volatile *dest) +{ + MSVCP_size_t v; + + do + { + v = *dest; + } while(InterlockedCompareExchange64((LONGLONG*)dest, v+1, v) != v); + + return v+1; +} +#else +#define InterlockedIncrementSizeT(dest) InterlockedIncrement((LONG*)dest) +#endif + +static void threadsafe_queue_push(threadsafe_queue *queue, MSVCP_size_t id, + void *e, _Concurrent_queue_base_v4 *parent, BOOL copy) +{ + MSVCP_size_t page_id = id & ~(parent->alloc_count-1); + int spin; + _Page *p; + + spin = 0; + while(queue->tail_pos != id) + spin_wait(&spin); + + if(page_id == id) + { + /* TODO: Add exception handling */ + p = call__Concurrent_queue_base_v4__Allocate_page(parent); + p->_Next = NULL; + p->_Mask = 0; + + spin = 0; + while(InterlockedCompareExchange(&queue->lock, 1, 0)) + spin_wait(&spin); + if(queue->tail) + queue->tail->_Next = p; + queue->tail = p; + if(!queue->head) + queue->head = p; + queue->lock = 0; + } + else + { + p = queue->tail; + } + + /* TODO: Add exception handling */ + if(copy) + call__Concurrent_queue_base_v4__Copy_item(parent, p, id-page_id, e); + else + call__Concurrent_queue_base_v4__Move_item(parent, p, id-page_id, e); + p->_Mask |= 1 << (id - page_id); + InterlockedIncrementSizeT(&queue->tail_pos); +} + +static void threadsafe_queue_pop(threadsafe_queue *queue, MSVCP_size_t id, + void *e, _Concurrent_queue_base_v4 *parent) +{ + MSVCP_size_t page_id = id & ~(parent->alloc_count-1); + int spin; + _Page *p; + + spin = 0; + while(queue->tail_pos <= id) + spin_wait(&spin); + + spin = 0; + while(queue->head_pos != id) + spin_wait(&spin); + + p = queue->head; + /* TODO: Add exception handling */ + call__Concurrent_queue_base_v4__Assign_and_destroy_item(parent, e, p, id-page_id); + + if(id == page_id+parent->alloc_count-1) + { + spin = 0; + while(InterlockedCompareExchange(&queue->lock, 1, 0)) + spin_wait(&spin); + queue->head = p->_Next; + if(!queue->head) + queue->tail = NULL; + queue->lock = 0; + + /* TODO: Add exception handling */ + call__Concurrent_queue_base_v4__Deallocate_page(parent, p); + } + InterlockedIncrementSizeT(&queue->head_pos); +} + /* ?_Internal_push@_Concurrent_queue_base_v4@details@Concurrency@@IAEXPBX@Z */ /* ?_Internal_push@_Concurrent_queue_base_v4@details@Concurrency@@IEAAXPEBX@Z */ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_push, 8) void __thiscall _Concurrent_queue_base_v4__Internal_push( - _Concurrent_queue_base_v4 *this, const void *e) + _Concurrent_queue_base_v4 *this, void *e) { - FIXME("(%p %p) stub\n", this, e); + MSVCP_size_t id; + + TRACE("(%p %p)\n", this, e); + + id = InterlockedIncrementSizeT(&this->data->tail_pos)-1; + threadsafe_queue_push(this->data->queues + id % QUEUES_NO, + id / QUEUES_NO, e, this, TRUE); } /* ?_Internal_move_push@_Concurrent_queue_base_v4@details@Concurrency@@IAEXPAX@Z */ @@ -1359,7 +1495,13 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_move_push, 8) void __thiscall _Concurrent_queue_base_v4__Internal_move_push( _Concurrent_queue_base_v4 *this, void *e) { - FIXME("(%p %p) stub\n", this, e); + MSVCP_size_t id; + + TRACE("(%p %p)\n", this, e); + + id = InterlockedIncrementSizeT(&this->data->tail_pos)-1; + threadsafe_queue_push(this->data->queues + id % QUEUES_NO, + id / QUEUES_NO, e, this, FALSE); } /* ?_Internal_pop_if_present@_Concurrent_queue_base_v4@details@Concurrency@@IAE_NPAX@Z */ @@ -1368,8 +1510,18 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_pop_if_present, 8) MSVCP_bool __thiscall _Concurrent_queue_base_v4__Internal_pop_if_present( _Concurrent_queue_base_v4 *this, void *e) { - FIXME("(%p %p) stub\n", this, e); - return 0; + MSVCP_size_t id; + + TRACE("(%p %p)\n", this, e); + + do + { + id = this->data->head_pos; + if(id == this->data->tail_pos) return FALSE; + } while(InterlockedCompareExchangePointer((void**)&this->data->head_pos, + (void*)(id+1), (void*)id) != (void*)id); + threadsafe_queue_pop(this->data->queues + id % QUEUES_NO, id / QUEUES_NO, e, this); + return TRUE; } /* ?_Internal_swap@_Concurrent_queue_base_v4@details@Concurrency@@IAEXAAV123@@Z */
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4:: _Internal_size implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 1a00d8dd71eadabfbe5bc9e8c0c753f0dfa62b8d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1a00d8dd71eadabfbe5bc9e8…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:03:40 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4::_Internal_size implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 32d9e29..ca85079 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1330,8 +1330,8 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_empty, 4) MSVCP_bool __thiscall _Concurrent_queue_base_v4__Internal_empty( const _Concurrent_queue_base_v4 *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return this->data->head_pos == this->data->tail_pos; } /* ?_Internal_size@_Concurrent_queue_base_v4@details@Concurrency@@IBEIXZ */ @@ -1340,8 +1340,8 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_size, 4) MSVCP_size_t __thiscall _Concurrent_queue_base_v4__Internal_size( const _Concurrent_queue_base_v4 *this) { - FIXME("(%p) stub\n", this); - return 0; + TRACE("(%p)\n", this); + return this->data->tail_pos - this->data->head_pos; } /* ?_Internal_push@_Concurrent_queue_base_v4@details@Concurrency@@IAEXPBX@Z */
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4:: _Internal_finish_clear implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 7c34dda603ff687588af464ea1c6594e49f6efc7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c34dda603ff687588af464e…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:03:22 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4::_Internal_finish_clear implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index c5c0a4f..32d9e29 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1235,6 +1235,13 @@ typedef struct } _Concurrent_queue_base_v4; extern const vtable_ptr MSVCP__Concurrent_queue_base_v4_vtable; +#if _MSVCP_VER == 100 +#define call__Concurrent_queue_base_v4__Deallocate_page(this, page) CALL_VTBL_FUNC(this, \ + 16, void, (_Concurrent_queue_base_v4*,_Page*), (this,page)) +#else +#define call__Concurrent_queue_base_v4__Deallocate_page(this, page) CALL_VTBL_FUNC(this, \ + 20, void, (_Concurrent_queue_base_v4*,_Page*), (this,page)) +#endif /* ?_Internal_throw_exception@_Concurrent_queue_base_v4@details@Concurrency@@IBEXXZ */ /* ?_Internal_throw_exception@_Concurrent_queue_base_v4@details@Concurrency@@IEBAXXZ */ @@ -1306,7 +1313,15 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_finish_clear, 4) void __thiscall _Concurrent_queue_base_v4__Internal_finish_clear( _Concurrent_queue_base_v4 *this) { - FIXME("(%p) stub\n", this); + int i; + + TRACE("(%p)\n", this); + + for(i=0; i<QUEUES_NO; i++) + { + if(this->data->queues[i].tail) + call__Concurrent_queue_base_v4__Deallocate_page(this, this->data->queues[i].tail); + } } /* ?_Internal_empty@_Concurrent_queue_base_v4@details@Concurrency@@IBE_NXZ */
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4 destructor implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 7686be0a5d67a8fa9b6af04f8a98987eb01cfab9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7686be0a5d67a8fa9b6af04f…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:03:12 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4 destructor implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index ac6de38..c5c0a4f 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1275,7 +1275,8 @@ _Concurrent_queue_base_v4* __thiscall _Concurrent_queue_base_v4_ctor( DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4_dtor, 4) void __thiscall _Concurrent_queue_base_v4_dtor(_Concurrent_queue_base_v4 *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + MSVCRT_operator_delete(this->data); } DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4_vector_dtor, 8)
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4 constructor implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 8d9c48171cf1ad83e92ac93d2b6abcbffd683786 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d9c48171cf1ad83e92ac93d…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:03:00 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4 constructor implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index c7fd041..ac6de38 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1234,6 +1234,8 @@ typedef struct MSVCP_size_t item_size; } _Concurrent_queue_base_v4; +extern const vtable_ptr MSVCP__Concurrent_queue_base_v4_vtable; + /* ?_Internal_throw_exception@_Concurrent_queue_base_v4@details@Concurrency@@IBEXXZ */ /* ?_Internal_throw_exception@_Concurrent_queue_base_v4@details@Concurrency@@IEBAXXZ */ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_throw_exception, 4) @@ -1250,8 +1252,22 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4_ctor, 8) _Concurrent_queue_base_v4* __thiscall _Concurrent_queue_base_v4_ctor( _Concurrent_queue_base_v4 *this, MSVCP_size_t size) { - FIXME("(%p %ld) stub\n", this, size); - return NULL; + TRACE("(%p %ld)\n", this, size); + + this->data = MSVCRT_operator_new(sizeof(*this->data)); + memset(this->data, 0, sizeof(*this->data)); + + this->vtable = &MSVCP__Concurrent_queue_base_v4_vtable; + this->item_size = size; + + /* alloc_count needs to be power of 2 */ + this->alloc_count = + size <= 8 ? 32 : + size <= 16 ? 16 : + size <= 32 ? 8 : + size <= 64 ? 4 : + size <= 128 ? 2 : 1; + return this; } /* ??1_Concurrent_queue_base_v4@details@Concurrency@@MAE@XZ */
1
0
0
0
Piotr Caban : msvcp100: Add _Concurrent_queue_base_v4:: _Internal_throw_exception implementation.
by Alexandre Julliard
23 Jan '18
23 Jan '18
Module: wine Branch: master Commit: 0771b2e7a807a48fd9b289180396e915c7641f38 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0771b2e7a807a48fd9b28918…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue Jan 23 17:02:49 2018 +0100 msvcp100: Add _Concurrent_queue_base_v4::_Internal_throw_exception implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcp90/misc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/msvcp90/misc.c b/dlls/msvcp90/misc.c index 776bc36..c7fd041 100644 --- a/dlls/msvcp90/misc.c +++ b/dlls/msvcp90/misc.c @@ -1240,7 +1240,8 @@ DEFINE_THISCALL_WRAPPER(_Concurrent_queue_base_v4__Internal_throw_exception, 4) void __thiscall _Concurrent_queue_base_v4__Internal_throw_exception( const _Concurrent_queue_base_v4 *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + throw_exception(EXCEPTION_BAD_ALLOC, NULL); } /* ??0_Concurrent_queue_base_v4@details@Concurrency@@IAE@I@Z */
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
64
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
Results per page:
10
25
50
100
200