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
Henri Verbeet : usp10: Pass const metrics to GPOS_convert_design_units_to_device().
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: cd9db34e51d727f0166c23b970fa5e7e579903b0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cd9db34e51d727f0166c23b97…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Mar 19 22:59:44 2017 +0100 usp10: Pass const metrics to GPOS_convert_design_units_to_device(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/opentype.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/usp10/opentype.c b/dlls/usp10/opentype.c index e531f3a..a1c4485 100644 --- a/dlls/usp10/opentype.c +++ b/dlls/usp10/opentype.c @@ -1579,15 +1579,16 @@ static VOID GPOS_get_anchor_values(LPCVOID table, LPPOINT pt, WORD ppem) } } -static void GPOS_convert_design_units_to_device(LPOUTLINETEXTMETRICW lpotm, LPLOGFONTW lplogfont, int desX, int desY, double *devX, double *devY) +static void GPOS_convert_design_units_to_device(const OUTLINETEXTMETRICW *otm, const LOGFONTW *logfont, + int desX, int desY, double *devX, double *devY) { - int emHeight = lpotm->otmTextMetrics.tmAscent + lpotm->otmTextMetrics.tmDescent - lpotm->otmTextMetrics.tmInternalLeading; + int emHeight = otm->otmTextMetrics.tmAscent + otm->otmTextMetrics.tmDescent - otm->otmTextMetrics.tmInternalLeading; - TRACE("emHeight %i lfWidth %i\n",emHeight, lplogfont->lfWidth); - *devX = (desX * emHeight) / (double)lpotm->otmEMSquare; - *devY = (desY * emHeight) / (double)lpotm->otmEMSquare; - if (lplogfont->lfWidth) - FIXME("Font with lfWidth set not handled properly\n"); + TRACE("emHeight %i lfWidth %i\n",emHeight, logfont->lfWidth); + *devX = (desX * emHeight) / (double)otm->otmEMSquare; + *devY = (desY * emHeight) / (double)otm->otmEMSquare; + if (logfont->lfWidth) + FIXME("Font with lfWidth set not handled properly.\n"); } static INT GPOS_get_value_record(WORD ValueFormat, const WORD data[], GPOS_ValueRecord *record)
1
0
0
0
Henri Verbeet : usp10/tests: Explicitly skip tests when required fonts are not available.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: 6e2161670d36e03753bf1211d9875b9456e3b8ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6e2161670d36e03753bf1211d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Mar 19 22:59:43 2017 +0100 usp10/tests: Explicitly skip tests when required fonts are not available. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Aric Stewart <aric(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/usp10/tests/usp10.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index e8a72cb..1b2ba6f 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -1264,6 +1264,8 @@ static int _find_font_for_range(HDC hdc, const CHAR *recommended, BYTE range, co rc = 1; } } + if (!rc) + winetest_skip("Font %s is not available.\n", recommended); } if (!*hfont)
1
0
0
0
Piotr Caban : msvcrt: Optimize Concurrency::event implementation.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: 41dd0eb457c26ff956c247bcc8493dd4ad0fb34b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=41dd0eb457c26ff956c247bcc…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Mar 20 10:42:38 2017 +0100 msvcrt: Optimize Concurrency::event implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/lock.c | 60 +++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index 8ae9511..edfefdb 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -584,24 +584,19 @@ static inline PLARGE_INTEGER evt_timeout(PLARGE_INTEGER pTime, unsigned int time static void evt_add_queue(thread_wait_entry **head, thread_wait_entry *entry) { - if(*head) { - entry->next = *head; - entry->prev = (*head)->prev; - (*head)->prev->next = entry; - (*head)->prev = entry; - } else { - entry->next = entry; - entry->prev = entry; - *head = entry; - } + entry->next = *head; + entry->prev = NULL; + if(*head) (*head)->prev = entry; + *head = entry; } -static void evt_remove(thread_wait_entry **head, thread_wait_entry *entry) +static void evt_remove_queue(thread_wait_entry **head, thread_wait_entry *entry) { - entry->next->prev = entry->prev; - entry->prev->next = entry->next; - if(*head == entry) - *head = entry->next == entry ? NULL : entry->next; + if(entry == *head) + *head = entry->next; + else if(entry->prev) + entry->prev->next = entry->next; + if(entry->next) entry->next->prev = entry->prev; } static MSVCRT_size_t evt_end_wait(thread_wait *wait, event **events, int count) @@ -611,7 +606,7 @@ static MSVCRT_size_t evt_end_wait(thread_wait *wait, event **events, int count) for(i = 0; i < count; i++) { critical_section_lock(&events[i]->cs); if(events[i] == wait->signaled) ret = i; - evt_remove(&events[i]->waiters, &wait->entries[i]); + evt_remove_queue(&events[i]->waiters, &wait->entries[i]); critical_section_unlock(&events[i]->cs); } @@ -698,13 +693,8 @@ void __thiscall event_reset(event *this) critical_section_lock(&this->cs); if(this->signaled) { this->signaled = FALSE; - if(this->waiters) { - entry = this->waiters; - do { - InterlockedIncrement(&entry->wait->pending_waits); - entry = entry->next; - } while (entry != this->waiters); - } + for(entry=this->waiters; entry; entry = entry->next) + InterlockedIncrement(&entry->wait->pending_waits); } critical_section_unlock(&this->cs); } @@ -714,25 +704,31 @@ void __thiscall event_reset(event *this) DEFINE_THISCALL_WRAPPER(event_set, 4) void __thiscall event_set(event *this) { - thread_wait_entry *entry; + thread_wait_entry *wakeup = NULL; + thread_wait_entry *entry, *next; TRACE("(%p)\n", this); critical_section_lock(&this->cs); if(!this->signaled) { this->signaled = TRUE; - if(this->waiters) { - entry = this->waiters; - do { - if(!InterlockedDecrement(&entry->wait->pending_waits)) { - if(InterlockedExchangePointer(&entry->wait->signaled, this) == EVT_WAITING) - NtReleaseKeyedEvent(keyed_event, entry->wait, 0, NULL); + for(entry=this->waiters; entry; entry=next) { + next = entry->next; + if(!InterlockedDecrement(&entry->wait->pending_waits)) { + if(InterlockedExchangePointer(&entry->wait->signaled, this) == EVT_WAITING) { + evt_remove_queue(&this->waiters, entry); + evt_add_queue(&wakeup, entry); } - entry = entry->next; - } while (entry != this->waiters); + } } } critical_section_unlock(&this->cs); + + for(entry=wakeup; entry; entry=next) { + next = entry->next; + entry->next = entry->prev = NULL; + NtReleaseKeyedEvent(keyed_event, entry->wait, 0, NULL); + } } /* ?wait@event@Concurrency@@QAEII@Z */
1
0
0
0
Huw Davies : winedbg: Return after raising an exception.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: eba6bf44b3577ff98591a57e525a1da8dd736291 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eba6bf44b3577ff98591a57e5…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Mar 17 21:40:31 2017 +0000 winedbg: Return after raising an exception. Fixes a compiler warning. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/winedbg/types.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/winedbg/types.c b/programs/winedbg/types.c index 5b24715..2df7572 100644 --- a/programs/winedbg/types.c +++ b/programs/winedbg/types.c @@ -80,11 +80,13 @@ LONGLONG types_extract_as_longlong(const struct dbg_lvalue* lvalue, { WINE_ERR("Couldn't get information\n"); RaiseException(DEBUG_STATUS_INTERNAL_ERROR, 0, 0, NULL); + return rtn; } if (size > sizeof(rtn)) { WINE_ERR("Size too large (%s)\n", wine_dbgstr_longlong(size)); RaiseException(DEBUG_STATUS_NOT_AN_INTEGER, 0, 0, NULL); + return rtn; } switch (bt) {
1
0
0
0
Huw Davies : kernel32/tests: Always retrieve the output mode.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: bdf50d883da4c7bf73712921c6ad3fbfcb998583 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bdf50d883da4c7bf73712921c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Mar 17 21:40:10 2017 +0000 kernel32/tests: Always retrieve the output mode. Fixes a compiler warning. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/process.c b/dlls/kernel32/tests/process.c index 68d6b64..04feb71 100644 --- a/dlls/kernel32/tests/process.c +++ b/dlls/kernel32/tests/process.c @@ -1520,8 +1520,8 @@ static void test_Console(void) startup.hStdError = startup.hStdOutput; ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbi), "Getting sb info\n"); - ok(GetConsoleMode(startup.hStdInput, &modeIn) && - GetConsoleMode(startup.hStdOutput, &modeOut), "Getting console modes\n"); + ok(GetConsoleMode(startup.hStdInput, &modeIn), "Getting console in mode\n"); + ok(GetConsoleMode(startup.hStdOutput, &modeOut), "Getting console out mode\n"); cpIn = GetConsoleCP(); cpOut = GetConsoleOutputCP(); @@ -1536,8 +1536,8 @@ static void test_Console(void) /* now get the modification the child has made, and resets parents expected values */ ok(GetConsoleScreenBufferInfo(startup.hStdOutput, &sbiC), "Getting sb info\n"); - ok(GetConsoleMode(startup.hStdInput, &modeInC) && - GetConsoleMode(startup.hStdOutput, &modeOutC), "Getting console modes\n"); + ok(GetConsoleMode(startup.hStdInput, &modeInC), "Getting console in mode\n"); + ok(GetConsoleMode(startup.hStdOutput, &modeOutC), "Getting console out mode\n"); SetConsoleMode(startup.hStdInput, modeIn); SetConsoleMode(startup.hStdOutput, modeOut);
1
0
0
0
Daniel Lehman : msvcrt100/tests: Add tests for concurrency::event.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: ee0337f800c353c4c3ff1640828fd2799f8bb217 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee0337f800c353c4c3ff16408…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Thu Mar 2 05:11:09 2017 -0800 msvcrt100/tests: Add tests for concurrency::event. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/tests/msvcr100.c | 132 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 132 insertions(+) diff --git a/dlls/msvcr100/tests/msvcr100.c b/dlls/msvcr100/tests/msvcr100.c index cdac1b9..ac167fc 100644 --- a/dlls/msvcr100/tests/msvcr100.c +++ b/dlls/msvcr100/tests/msvcr100.c @@ -138,6 +138,10 @@ typedef struct { CRITICAL_SECTION cs; } _ReentrantBlockingLock; +typedef struct { + char pad[64]; +} event; + static int* (__cdecl *p_errno)(void); static int (__cdecl *p_wmemcpy_s)(wchar_t *dest, size_t numberOfElements, const wchar_t *src, size_t count); static int (__cdecl *p_wmemmove_s)(wchar_t *dest, size_t numberOfElements, const wchar_t *src, size_t count); @@ -178,6 +182,13 @@ static void (__thiscall *p_NonReentrantBlockingLock__Acquire)(_ReentrantBlocking static void (__thiscall *p_NonReentrantBlockingLock__Release)(_ReentrantBlockingLock*); static MSVCRT_bool (__thiscall *p_NonReentrantBlockingLock__TryAcquire)(_ReentrantBlockingLock*); +static event* (__thiscall *p_event_ctor)(event*); +static void (__thiscall *p_event_dtor)(event*); +static void (__thiscall *p_event_reset)(event*); +static void (__thiscall *p_event_set)(event*); +static size_t (__thiscall *p_event_wait)(event*, unsigned int); +static int (__cdecl *p_event_wait_for_multiple)(event**, size_t, MSVCRT_bool, unsigned int); + /* make sure we use the correct errno */ #undef errno #define errno (*p_errno()) @@ -237,6 +248,13 @@ static BOOL init(void) SET(p_NonReentrantBlockingLock__Acquire, "?_Acquire@_NonReentrantBlockingLock@details@Concurrency@@QEAAXXZ"); SET(p_NonReentrantBlockingLock__Release, "?_Release@_NonReentrantBlockingLock@details@Concurrency@@QEAAXXZ"); SET(p_NonReentrantBlockingLock__TryAcquire, "?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ"); + + SET(p_event_ctor, "??0event@Concurrency@@QEAA@XZ"); + SET(p_event_dtor, "??1event@Concurrency@@QEAA@XZ"); + SET(p_event_reset, "?reset@event@Concurrency@@QEAAXXZ"); + SET(p_event_set, "?set@event@Concurrency@@QEAAXXZ"); + SET(p_event_wait, "?wait@event@Concurrency@@QEAA_KI@Z"); + SET(p_event_wait_for_multiple, "?wait_for_multiple@event@Concurrency@@SA_KPEAPEAV12@_K_NI@Z"); } else { SET(pSpinWait_ctor_yield, "??0?$_SpinWait@$00@details@Concurrency@@QAE@P6AXXZ@Z"); SET(pSpinWait_dtor, "??_F?$_SpinWait@$00@details@Concurrency@@QAEXXZ"); @@ -264,6 +282,13 @@ static BOOL init(void) SET(p_NonReentrantBlockingLock__Acquire, "?_Acquire@_NonReentrantBlockingLock@details@Concurrency@@QAEXXZ"); SET(p_NonReentrantBlockingLock__Release, "?_Release@_NonReentrantBlockingLock@details@Concurrency@@QAEXXZ"); SET(p_NonReentrantBlockingLock__TryAcquire, "?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ"); + + SET(p_event_ctor, "??0event@Concurrency@@QAE@XZ"); + SET(p_event_dtor, "??1event@Concurrency@@QAE@XZ"); + SET(p_event_reset, "?reset@event@Concurrency@@QAEXXZ"); + SET(p_event_set, "?set@event@Concurrency@@QAEXXZ"); + SET(p_event_wait, "?wait@event@Concurrency@@QAEII@Z"); + SET(p_event_wait_for_multiple, "?wait_for_multiple@event@Concurrency@@SAIPAPAV12@I_NI@Z"); } init_thiscall_thunk(); @@ -705,6 +730,112 @@ static void test__ReentrantBlockingLock(void) call_func1(p_NonReentrantBlockingLock_dtor, &rbl); } +static DWORD WINAPI test_event_thread(void *arg) +{ + event *evt = arg; + call_func1(p_event_set, evt); + return 0; +} + +static DWORD WINAPI multiple_events_thread(void *arg) +{ + event **events = arg; + + Sleep(50); + call_func1(p_event_set, events[0]); + call_func1(p_event_reset, events[0]); + call_func1(p_event_set, events[1]); + call_func1(p_event_reset, events[1]); + return 0; +} + +static void test_event(void) +{ + int i; + int ret; + event evt; + event *evts[70]; + HANDLE thread; + HANDLE threads[NUMELMS(evts)]; + + call_func1(p_event_ctor, &evt); + + ret = call_func2(p_event_wait, &evt, 100); + ok(ret == -1, "expected -1, got %d\n", ret); + + call_func1(p_event_set, &evt); + ret = call_func2(p_event_wait, &evt, 100); + ok(!ret, "expected 0, got %d\n", ret); + + ret = call_func2(p_event_wait, &evt, 100); + ok(!ret, "expected 0, got %d\n", ret); + + call_func1(p_event_reset, &evt); + ret = call_func2(p_event_wait, &evt, 100); + ok(ret == -1, "expected -1, got %d\n", ret); + + thread = CreateThread(NULL, 0, test_event_thread, (void*)&evt, 0, NULL); + ret = call_func2(p_event_wait, &evt, 5000); + ok(!ret, "expected 0, got %d\n", ret); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + if (0) /* crashes on Windows */ + p_event_wait_for_multiple(NULL, 10, TRUE, 0); + + for (i = 0; i < NUMELMS(evts); i++) { + evts[i] = malloc(sizeof(evt)); + call_func1(p_event_ctor, evts[i]); + } + + ret = p_event_wait_for_multiple(evts, 0, TRUE, 100); + ok(!ret, "expected 0, got %d\n", ret); + + ret = p_event_wait_for_multiple(evts, NUMELMS(evts), TRUE, 100); + ok(ret == -1, "expected -1, got %d\n", ret); + + /* reset and test wait for multiple with all */ + for (i = 0; i < NUMELMS(evts); i++) + threads[i] = CreateThread(NULL, 0, test_event_thread, (void*)evts[i], 0, NULL); + + ret = p_event_wait_for_multiple(evts, NUMELMS(evts), TRUE, 5000); + ok(ret != -1, "didn't expect -1\n"); + + for (i = 0; i < NUMELMS(evts); i++) { + WaitForSingleObject(threads[i], INFINITE); + CloseHandle(threads[i]); + } + + /* reset and test wait for multiple with any */ + call_func1(p_event_reset, evts[0]); + + thread = CreateThread(NULL, 0, test_event_thread, (void*)evts[0], 0, NULL); + ret = p_event_wait_for_multiple(evts, 1, FALSE, 5000); + ok(!ret, "expected 0, got %d\n", ret); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + call_func1(p_event_reset, evts[0]); + call_func1(p_event_reset, evts[1]); + thread = CreateThread(NULL, 0, multiple_events_thread, (void*)evts, 0, NULL); + ret = p_event_wait_for_multiple(evts, 2, TRUE, 500); + ok(ret == -1, "expected -1, got %d\n", ret); + WaitForSingleObject(thread, INFINITE); + CloseHandle(thread); + + call_func1(p_event_reset, evts[0]); + call_func1(p_event_set, evts[1]); + ret = p_event_wait_for_multiple(evts, 2, FALSE, 0); + ok(ret == 1, "expected 1, got %d\n", ret); + + for (i = 0; i < NUMELMS(evts); i++) { + call_func1(p_event_dtor, evts[i]); + free(evts[i]); + } + + call_func1(p_event_dtor, &evt); +} + START_TEST(msvcr100) { if (!init()) @@ -718,4 +849,5 @@ START_TEST(msvcr100) test__SpinWait(); test_reader_writer_lock(); test__ReentrantBlockingLock(); + test_event(); }
1
0
0
0
Daniel Lehman : msvcrt: Implement Concurrency::event.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: dfd28affe34f8a87e251fdd02e590c425b90ca6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dfd28affe34f8a87e251fdd02…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Mon Dec 12 16:44:44 2016 -0800 msvcrt: Implement Concurrency::event. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/lock.c | 190 +++++++++++++++++++++++++++++++++++++++++++++++---- dlls/msvcrt/msvcrt.h | 15 ++++ 2 files changed, 193 insertions(+), 12 deletions(-) diff --git a/dlls/msvcrt/lock.c b/dlls/msvcrt/lock.c index d9fe05d..8ae9511 100644 --- a/dlls/msvcrt/lock.c +++ b/dlls/msvcrt/lock.c @@ -550,19 +550,128 @@ unsigned int __cdecl _GetConcurrency(void) return val; } +#define EVT_RUNNING (void*)1 +#define EVT_WAITING NULL + +struct thread_wait; +typedef struct thread_wait_entry +{ + struct thread_wait *wait; + struct thread_wait_entry *next; + struct thread_wait_entry *prev; +} thread_wait_entry; + +typedef struct thread_wait +{ + void *signaled; + int pending_waits; + thread_wait_entry entries[1]; +} thread_wait; + typedef struct { - volatile void *wait; - void *reset; + thread_wait_entry *waiters; + INT_PTR signaled; critical_section cs; } event; +static inline PLARGE_INTEGER evt_timeout(PLARGE_INTEGER pTime, unsigned int timeout) +{ + if(timeout == COOPERATIVE_TIMEOUT_INFINITE) return NULL; + pTime->QuadPart = (ULONGLONG)timeout * -10000; + return pTime; +} + +static void evt_add_queue(thread_wait_entry **head, thread_wait_entry *entry) +{ + if(*head) { + entry->next = *head; + entry->prev = (*head)->prev; + (*head)->prev->next = entry; + (*head)->prev = entry; + } else { + entry->next = entry; + entry->prev = entry; + *head = entry; + } +} + +static void evt_remove(thread_wait_entry **head, thread_wait_entry *entry) +{ + entry->next->prev = entry->prev; + entry->prev->next = entry->next; + if(*head == entry) + *head = entry->next == entry ? NULL : entry->next; +} + +static MSVCRT_size_t evt_end_wait(thread_wait *wait, event **events, int count) +{ + MSVCRT_size_t i, ret = COOPERATIVE_WAIT_TIMEOUT; + + for(i = 0; i < count; i++) { + critical_section_lock(&events[i]->cs); + if(events[i] == wait->signaled) ret = i; + evt_remove(&events[i]->waiters, &wait->entries[i]); + critical_section_unlock(&events[i]->cs); + } + + return ret; +} + +static inline int evt_transition(void **state, void *from, void *to) +{ + return InterlockedCompareExchangePointer(state, to, from) == from; +} + +static MSVCRT_size_t evt_wait(thread_wait *wait, event **events, int count, MSVCRT_bool wait_all, unsigned int timeout) +{ + int i; + NTSTATUS status; + LARGE_INTEGER ntto; + + wait->signaled = EVT_RUNNING; + wait->pending_waits = wait_all ? count : 1; + for(i = 0; i < count; i++) { + wait->entries[i].wait = wait; + + critical_section_lock(&events[i]->cs); + evt_add_queue(&events[i]->waiters, &wait->entries[i]); + if(events[i]->signaled) { + if(!InterlockedDecrement(&wait->pending_waits)) { + wait->signaled = events[i]; + critical_section_unlock(&events[i]->cs); + + return evt_end_wait(wait, events, i+1); + } + } + critical_section_unlock(&events[i]->cs); + } + + if(!timeout) + return evt_end_wait(wait, events, count); + + if(!evt_transition(&wait->signaled, EVT_RUNNING, EVT_WAITING)) + return evt_end_wait(wait, events, count); + + status = NtWaitForKeyedEvent(keyed_event, wait, 0, evt_timeout(&ntto, timeout)); + + if(status && !evt_transition(&wait->signaled, EVT_WAITING, EVT_RUNNING)) + NtWaitForKeyedEvent(keyed_event, wait, 0, NULL); + + return evt_end_wait(wait, events, count); +} + /* ??0event@Concurrency@@QAE@XZ */ /* ??0event@Concurrency@@QEAA@XZ */ DEFINE_THISCALL_WRAPPER(event_ctor, 4) event* __thiscall event_ctor(event *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + + this->waiters = NULL; + this->signaled = FALSE; + critical_section_ctor(&this->cs); + return this; } @@ -571,7 +680,10 @@ event* __thiscall event_ctor(event *this) DEFINE_THISCALL_WRAPPER(event_dtor, 4) void __thiscall event_dtor(event *this) { - FIXME("(%p) stub\n", this); + TRACE("(%p)\n", this); + critical_section_dtor(&this->cs); + if(this->waiters) + ERR("there's a wait on destroyed event\n"); } /* ?reset@event@Concurrency@@QAEXXZ */ @@ -579,7 +691,22 @@ void __thiscall event_dtor(event *this) DEFINE_THISCALL_WRAPPER(event_reset, 4) void __thiscall event_reset(event *this) { - FIXME("(%p) stub\n", this); + thread_wait_entry *entry; + + TRACE("(%p)\n", this); + + critical_section_lock(&this->cs); + if(this->signaled) { + this->signaled = FALSE; + if(this->waiters) { + entry = this->waiters; + do { + InterlockedIncrement(&entry->wait->pending_waits); + entry = entry->next; + } while (entry != this->waiters); + } + } + critical_section_unlock(&this->cs); } /* ?set@event@Concurrency@@QAEXXZ */ @@ -587,26 +714,65 @@ void __thiscall event_reset(event *this) DEFINE_THISCALL_WRAPPER(event_set, 4) void __thiscall event_set(event *this) { - FIXME("(%p) stub\n", this); + thread_wait_entry *entry; + + TRACE("(%p)\n", this); + + critical_section_lock(&this->cs); + if(!this->signaled) { + this->signaled = TRUE; + if(this->waiters) { + entry = this->waiters; + do { + if(!InterlockedDecrement(&entry->wait->pending_waits)) { + if(InterlockedExchangePointer(&entry->wait->signaled, this) == EVT_WAITING) + NtReleaseKeyedEvent(keyed_event, entry->wait, 0, NULL); + } + entry = entry->next; + } while (entry != this->waiters); + } + } + critical_section_unlock(&this->cs); } /* ?wait@event@Concurrency@@QAEII@Z */ /* ?wait@event@Concurrency@@QEAA_KI@Z */ DEFINE_THISCALL_WRAPPER(event_wait, 8) -size_t __thiscall event_wait(event *this, unsigned int timeout) +MSVCRT_size_t __thiscall event_wait(event *this, unsigned int timeout) { - FIXME("(%p %u) stub\n", this, timeout); - return COOPERATIVE_WAIT_TIMEOUT; + thread_wait wait; + MSVCRT_size_t signaled; + + TRACE("(%p %u)\n", this, timeout); + + critical_section_lock(&this->cs); + signaled = this->signaled; + critical_section_unlock(&this->cs); + + if(!timeout) return signaled ? 0 : COOPERATIVE_WAIT_TIMEOUT; + return signaled ? 0 : evt_wait(&wait, &this, 1, FALSE, timeout); } /* ?wait_for_multiple@event@Concurrency@@SAIPAPAV12@I_NI@Z */ /* ?wait_for_multiple@event@Concurrency@@SA_KPEAPEAV12@_K_NI@Z */ int __cdecl event_wait_for_multiple(event **events, MSVCRT_size_t count, MSVCRT_bool wait_all, unsigned int timeout) { - FIXME("(%p %ld %d %u) stub\n", events, count, wait_all, timeout); - return COOPERATIVE_WAIT_TIMEOUT; -} + thread_wait *wait; + MSVCRT_size_t ret; + + TRACE("(%p %ld %d %u)\n", events, count, wait_all, timeout); + + if(count == 0) + return 0; + wait = heap_alloc(FIELD_OFFSET(thread_wait, entries[count])); + if(!wait) + throw_bad_alloc("bad allocation"); + ret = evt_wait(wait, events, count, wait_all, timeout); + heap_free(wait); + + return ret; +} #endif #if _MSVCR_VER >= 110 diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 3caa43c..cee8113 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1181,6 +1181,7 @@ extern char* __cdecl __unDName(char *,const char*,int,malloc_func_t,free_func_t, #define UCRTBASE_SCANF_MASK (0x0007) +#define COOPERATIVE_TIMEOUT_INFINITE ((unsigned int)-1) #define COOPERATIVE_WAIT_TIMEOUT ~0 typedef enum { @@ -1380,4 +1381,18 @@ typedef struct { _FPIEEE_VALUE Result; } _FPIEEE_RECORD, *_PFPIEEE_RECORD; +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc(size_t len) +{ + return HeapAlloc(GetProcessHeap(), 0, len); +} + +static inline void* __WINE_ALLOC_SIZE(1) heap_alloc_zero(size_t len) +{ + return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); +} + +static inline BOOL heap_free(void *mem) +{ + return HeapFree(GetProcessHeap(), 0, mem); +} #endif /* __WINE_MSVCRT_H */
1
0
0
0
Daniel Lehman : msvcrt: Add _Trace_ppl_function stub.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: 4db4d61bbb1a89b5f87ecb8efe32b3c31b863e2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4db4d61bbb1a89b5f87ecb8ef…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Thu Sep 29 16:57:04 2016 -0700 msvcrt: Add _Trace_ppl_function stub. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 4 ++-- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcrt/cpp.c | 21 +++++++++++++++++++++ 6 files changed, 31 insertions(+), 10 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index 855e366..e6ebe4e 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -456,8 +456,8 @@ @ stub -arch=i386 ?_Stop@_Timer@details@Concurrency@@IAEXXZ @ stub -arch=win64 ?_Stop@_Timer@details@Concurrency@@IEAAXXZ @ stub -arch=win64 ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ -@ stub ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z -@ stub ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) msvcr120.?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) msvcr120.?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) msvcr120.?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) msvcr120.?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ @ thiscall -arch=i386 ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) msvcr120.?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index d60c2c2..303e1b7 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -386,8 +386,8 @@ @ stub -arch=win64 ?_Stop@_Timer@details@Concurrency@@IEAAXXZ @ stub -arch=win32 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ -@ stub -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z -@ stub -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function @ thiscall -arch=win32 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=win32 ?_TryAcquire@_ReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index f9b6613..8aa390e 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -658,8 +658,8 @@ @ stub -arch=i386 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ @ stub ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ -@ stub -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z -@ stub -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function @ cdecl -arch=arm ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 48129f6..7a3a831 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -640,8 +640,8 @@ @ stub -arch=i386 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ @ stub ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ -@ stub -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z -@ stub -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) Concurrency__Trace_ppl_function @ cdecl -arch=arm ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) _ReentrantBlockingLock__TryAcquire @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) _ReentrantBlockingLock__TryAcquire diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 7242cb9..62926d4 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -636,8 +636,8 @@ @ stub -arch=i386 ?_Tidy@exception@std@@AAEXXZ @ stub -arch=win64 ?_Tidy@exception@std@@AEAAXXZ @ stub ?_Trace_agents@Concurrency@@YAXW4Agents_EventType@1@_JZZ -@ stub -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z -@ stub -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win32 ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) msvcr120.?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z +@ cdecl -arch=win64 ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z(ptr long long) msvcr120.?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z @ cdecl -arch=arm ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ(ptr) msvcr120.?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAA_NXZ @ thiscall -arch=i386 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ(ptr) msvcr120.?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QAE_NXZ @ cdecl -arch=win64 ?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ(ptr) msvcr120.?_TryAcquire@_NonReentrantBlockingLock@details@Concurrency@@QEAA_NXZ diff --git a/dlls/msvcrt/cpp.c b/dlls/msvcrt/cpp.c index daf7aee..a86048a 100644 --- a/dlls/msvcrt/cpp.c +++ b/dlls/msvcrt/cpp.c @@ -1700,3 +1700,24 @@ MSVCRT_size_t CDECL MSVCRT_type_info_hash(const type_info140 *ti) return hash; } #endif + +#if _MSVCR_VER >= 100 +enum ConcRT_EventType +{ + CONCRT_EVENT_GENERIC, + CONCRT_EVENT_START, + CONCRT_EVENT_END, + CONCRT_EVENT_BLOCK, + CONCRT_EVENT_UNBLOCK, + CONCRT_EVENT_YIELD, + CONCRT_EVENT_ATTACH, + CONCRT_EVENT_DETACH +}; + +/* ?_Trace_ppl_function@Concurrency@@YAXABU_GUID@@EW4ConcRT_EventType@1@@Z */ +/* ?_Trace_ppl_function@Concurrency@@YAXAEBU_GUID@@EW4ConcRT_EventType@1@@Z */ +void __cdecl Concurrency__Trace_ppl_function(const GUID *guid, unsigned char level, enum ConcRT_EventType type) +{ + FIXME("(%s %u %i) stub\n", debugstr_guid(guid), level, type); +} +#endif
1
0
0
0
Gijs Vermeulen : msvcrt: Add stub for Concurrency::Free.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: 9b6455359acc2b28a7a61afc67ab0990e5f55ee7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9b6455359acc2b28a7a61afc6…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Sat Mar 18 00:12:16 2017 +0100 msvcrt: Add stub for Concurrency::Free. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 4 ++-- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcrt/heap.c | 8 ++++++++ 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index d510a3b..855e366 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -239,8 +239,8 @@ @ stub -arch=win64 ?Detach@CurrentScheduler@Concurrency@@SAXXZ @ stub -arch=win64 ?DisableTracing@Concurrency@@YAJXZ @ stub -arch=win64 ?EnableTracing@Concurrency@@YAJXZ -@ stub -arch=win32 ?Free@Concurrency@@YAXPAX@Z -@ stub -arch=win64 ?Free@Concurrency@@YAXPEAX@Z +@ cdecl -arch=win32 ?Free@Concurrency@@YAXPAX@Z(ptr) msvcr120.?Free@Concurrency@@YAXPAX@Z +@ cdecl -arch=win64 ?Free@Concurrency@@YAXPEAX@Z(ptr) msvcr120.?Free@Concurrency@@YAXPEAX@Z @ stub -arch=win32 ?Get@CurrentScheduler@Concurrency@@SAPAVScheduler@2@XZ @ stub -arch=win64 ?Get@CurrentScheduler@Concurrency@@SAPEAVScheduler@2@XZ @ stub -arch=win64 ?GetExecutionContextId@Concurrency@@YAIXZ diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 3875304..d60c2c2 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -258,8 +258,8 @@ @ stub ?Detach@CurrentScheduler@Concurrency@@SAXXZ @ stub ?DisableTracing@Concurrency@@YAJXZ @ stub ?EnableTracing@Concurrency@@YAJXZ -@ stub -arch=win32 ?Free@Concurrency@@YAXPAX@Z -@ stub -arch=win64 ?Free@Concurrency@@YAXPEAX@Z +@ cdecl -arch=win32 ?Free@Concurrency@@YAXPAX@Z(ptr) Concurrency_Free +@ cdecl -arch=win64 ?Free@Concurrency@@YAXPEAX@Z(ptr) Concurrency_Free @ stub -arch=win32 ?Get@CurrentScheduler@Concurrency@@SAPAVScheduler@2@XZ @ stub -arch=win64 ?Get@CurrentScheduler@Concurrency@@SAPEAVScheduler@2@XZ @ stub ?GetExecutionContextId@Concurrency@@YAIXZ diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 4026b1b..f9b6613 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -418,8 +418,8 @@ @ stub ?Detach@CurrentScheduler@Concurrency@@SAXXZ @ stub ?DisableTracing@Concurrency@@YAJXZ @ stub ?EnableTracing@Concurrency@@YAJXZ -@ stub -arch=win32 ?Free@Concurrency@@YAXPAX@Z -@ stub -arch=win64 ?Free@Concurrency@@YAXPEAX@Z +@ cdecl -arch=win32 ?Free@Concurrency@@YAXPAX@Z(ptr) Concurrency_Free +@ cdecl -arch=win64 ?Free@Concurrency@@YAXPEAX@Z(ptr) Concurrency_Free @ stub -arch=win32 ?Get@CurrentScheduler@Concurrency@@SAPAVScheduler@2@XZ @ stub -arch=win64 ?Get@CurrentScheduler@Concurrency@@SAPEAVScheduler@2@XZ @ stub ?GetExecutionContextId@Concurrency@@YAIXZ diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 27c800b..48129f6 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -416,8 +416,8 @@ @ stub ?Detach@CurrentScheduler@Concurrency@@SAXXZ @ stub ?DisableTracing@Concurrency@@YAJXZ @ stub ?EnableTracing@Concurrency@@YAJXZ -@ stub -arch=win32 ?Free@Concurrency@@YAXPAX@Z -@ stub -arch=win64 ?Free@Concurrency@@YAXPEAX@Z +@ cdecl -arch=win32 ?Free@Concurrency@@YAXPAX@Z(ptr) Concurrency_Free +@ cdecl -arch=win64 ?Free@Concurrency@@YAXPEAX@Z(ptr) Concurrency_Free @ stub -arch=win32 ?Get@CurrentScheduler@Concurrency@@SAPAVScheduler@2@XZ @ stub -arch=win64 ?Get@CurrentScheduler@Concurrency@@SAPEAVScheduler@2@XZ @ stub ?GetCurrentThreadId@platform@details@Concurrency@@YAJXZ diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index dcb391c..7242cb9 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -412,8 +412,8 @@ @ stub ?Detach@CurrentScheduler@Concurrency@@SAXXZ @ stub ?DisableTracing@Concurrency@@YAJXZ @ stub ?EnableTracing@Concurrency@@YAJXZ -@ stub -arch=win32 ?Free@Concurrency@@YAXPAX@Z -@ stub -arch=win64 ?Free@Concurrency@@YAXPEAX@Z +@ cdecl -arch=win32 ?Free@Concurrency@@YAXPAX@Z(ptr) msvcr120.?Free@Concurrency@@YAXPAX@Z +@ cdecl -arch=win64 ?Free@Concurrency@@YAXPEAX@Z(ptr) msvcr120.?Free@Concurrency@@YAXPEAX@Z @ stub -arch=win32 ?Get@CurrentScheduler@Concurrency@@SAPAVScheduler@2@XZ @ stub -arch=win64 ?Get@CurrentScheduler@Concurrency@@SAPEAVScheduler@2@XZ @ stub ?GetCurrentThreadId@platform@details@Concurrency@@YAJXZ diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index f99f9c3..ba07bb0 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -873,3 +873,11 @@ void * CDECL Concurrency_Alloc(MSVCRT_size_t size) FIXME("(%ld) returning %p\n", size, p); return p; } + +/* ?Free@Concurrency@@YAXPAX@Z */ +/* ?Free@Concurrency@@YAXPEAX@Z */ +void CDECL Concurrency_Free(void* mem) +{ + FIXME("(%p) stub\n", mem); + MSVCRT_free(mem); +}
1
0
0
0
Gijs Vermeulen : msvcrt: Add stub for Concurrency::Alloc.
by Alexandre Julliard
20 Mar '17
20 Mar '17
Module: wine Branch: master Commit: 32a4bec9099676ce1ade3fbd2871195f9596686c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=32a4bec9099676ce1ade3fbd2…
Author: Gijs Vermeulen <gijsvrm(a)gmail.com> Date: Sat Mar 18 12:27:44 2017 +0100 msvcrt: Add stub for Concurrency::Alloc. Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 4 ++-- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr110/msvcr110.spec | 4 ++-- dlls/msvcr120/msvcr120.spec | 4 ++-- dlls/msvcr120_app/msvcr120_app.spec | 4 ++-- dlls/msvcrt/heap.c | 9 +++++++++ 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/dlls/concrt140/concrt140.spec b/dlls/concrt140/concrt140.spec index dd8d13a..d510a3b 100644 --- a/dlls/concrt140/concrt140.spec +++ b/dlls/concrt140/concrt140.spec @@ -217,8 +217,8 @@ @ stub -arch=i386 ??_F_Scheduler@details@Concurrency@@QAEXXZ @ stub -arch=win64 ??_F_Scheduler@details@Concurrency@@QEAAXXZ # extern ?AgentEventGuid@Concurrency@@3U_GUID@@B -@ stub -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z -@ stub -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z +@ cdecl -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z(long) msvcr120.?Alloc@Concurrency@@YAPAXI@Z +@ cdecl -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z(long) msvcr120.?Alloc@Concurrency@@YAPEAX_K@Z @ stub -arch=win64 ?Block@Context@Concurrency@@SAXXZ # extern ?ChoreEventGuid@Concurrency@@3U_GUID@@B # extern ?ConcRTEventGuid@Concurrency@@3U_GUID@@B diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 729d16f..3875304 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -242,8 +242,8 @@ @ cdecl -arch=win64 ??_U@YAPEAX_KHPEBDH@Z(long long str long) MSVCRT_operator_new_dbg @ cdecl -arch=win32 ??_V@YAXPAX@Z(ptr) MSVCRT_operator_delete @ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) MSVCRT_operator_delete -@ stub -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z -@ stub -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z +@ cdecl -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z(long) Concurrency_Alloc +@ cdecl -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z(long) Concurrency_Alloc @ stub ?Block@Context@Concurrency@@SAXXZ @ stub -arch=win32 ?Create@CurrentScheduler@Concurrency@@SAXABVSchedulerPolicy@2@@Z @ stub -arch=win64 ?Create@CurrentScheduler@Concurrency@@SAXAEBVSchedulerPolicy@2@@Z diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index fa3206d..4026b1b 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -400,8 +400,8 @@ @ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) MSVCRT_operator_delete @ stub -arch=win32 ??_V@YAXPAXHPBDH@Z @ stub -arch=win64 ??_V@YAXPEAXHPEBDH@Z -@ stub -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z -@ stub -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z +@ cdecl -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z(long) Concurrency_Alloc +@ cdecl -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z(long) Concurrency_Alloc @ stub ?Block@Context@Concurrency@@SAXXZ @ stub -arch=win32 ?Create@CurrentScheduler@Concurrency@@SAXABVSchedulerPolicy@2@@Z @ stub -arch=win64 ?Create@CurrentScheduler@Concurrency@@SAXAEBVSchedulerPolicy@2@@Z diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 84edf51..27c800b 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -396,8 +396,8 @@ @ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) MSVCRT_operator_delete @ stub -arch=win32 ??_V@YAXPAXHPBDH@Z @ stub -arch=win64 ??_V@YAXPEAXHPEBDH@Z -@ stub -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z -@ stub -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z +@ cdecl -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z(long) Concurrency_Alloc +@ cdecl -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z(long) Concurrency_Alloc @ stub ?Block@Context@Concurrency@@SAXXZ @ stub -arch=win32 ?CaptureCallstack@platform@details@Concurrency@@YAIPAPAXII@Z @ stub -arch=win64 ?CaptureCallstack@platform@details@Concurrency@@YA_KPEAPEAX_K1@Z diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 46a76da..dcb391c 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -393,8 +393,8 @@ @ cdecl -arch=win64 ??_V@YAXPEAX@Z(ptr) msvcr120.??_V@YAXPEAX@Z @ stub -arch=win32 ??_V@YAXPAXHPBDH@Z @ stub -arch=win64 ??_V@YAXPEAXHPEBDH@Z -@ stub -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z -@ stub -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z +@ cdecl -arch=win32 ?Alloc@Concurrency@@YAPAXI@Z(long) msvcr120.?Alloc@Concurrency@@YAPAXI@Z +@ cdecl -arch=win64 ?Alloc@Concurrency@@YAPEAX_K@Z(long) msvcr120.?Alloc@Concurrency@@YAPEAX_K@Z @ stub ?Block@Context@Concurrency@@SAXXZ @ stub ?CaptureCallstack@platform@details@Concurrency@@YAIPAPAXII@Z @ stub -arch=win32 ?Create@CurrentScheduler@Concurrency@@SAXABVSchedulerPolicy@2@@Z diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c index 3ae2599..f99f9c3 100644 --- a/dlls/msvcrt/heap.c +++ b/dlls/msvcrt/heap.c @@ -864,3 +864,12 @@ void msvcrt_destroy_heap(void) if(sb_heap) HeapDestroy(sb_heap); } + +/* ?Alloc@Concurrency@@YAPAXI@Z */ +/* ?Alloc@Concurrency@@YAPEAX_K@Z */ +void * CDECL Concurrency_Alloc(MSVCRT_size_t size) +{ + void *p = MSVCRT_malloc(size); + FIXME("(%ld) returning %p\n", size, p); + return p; +}
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
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