Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
d3d9297b
Commit
d3d9297b
authored
Jun 08, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr100: Use block_context_for helper in Concurrency::wait().
parent
0f693964
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
24 deletions
+2
-24
concurrency.c
dlls/msvcrt/concurrency.c
+2
-24
No files found.
dlls/msvcrt/concurrency.c
View file @
d3d9297b
...
...
@@ -2569,7 +2569,6 @@ static void set_timeout(FILETIME *ft, unsigned int timeout)
ft
->
dwLowDateTime
=
to
.
QuadPart
;
}
#if _MSVCR_VER >= 110
struct
timeout_unlock
{
Context
*
ctx
;
...
...
@@ -2611,6 +2610,7 @@ static BOOL block_context_for(Context *ctx, unsigned int timeout)
return
tu
.
timed_out
;
}
#if _MSVCR_VER >= 110
/* ?try_lock_for@critical_section@Concurrency@@QAE_NI@Z */
/* ?try_lock_for@critical_section@Concurrency@@QEAA_NI@Z */
DEFINE_THISCALL_WRAPPER
(
critical_section_try_lock_for
,
8
)
...
...
@@ -3478,33 +3478,11 @@ bool __thiscall _ReentrantBlockingLock__TryAcquire(_ReentrantBlockingLock *this)
return
TryEnterCriticalSection
(
&
this
->
cs
);
}
static
void
WINAPI
wait_timeout
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
arg
,
TP_TIMER
*
timer
)
{
Context
*
ctx
=
arg
;
call_Context_Unblock
(
ctx
);
}
/* ?wait@Concurrency@@YAXI@Z */
void
__cdecl
Concurrency_wait
(
unsigned
int
time
)
{
Context
*
ctx
=
get_current_context
();
TP_TIMER
*
tp_timer
;
FILETIME
ft
;
TRACE
(
"(%d)
\n
"
,
time
);
tp_timer
=
CreateThreadpoolTimer
(
wait_timeout
,
ctx
,
NULL
);
if
(
!
tp_timer
)
{
FIXME
(
"throw exception?
\n
"
);
Sleep
(
time
);
return
;
}
set_timeout
(
&
ft
,
time
);
SetThreadpoolTimer
(
tp_timer
,
&
ft
,
0
,
0
);
call_Context_Block
(
ctx
);
CloseThreadpoolTimer
(
tp_timer
);
block_context_for
(
get_current_context
(),
time
);
}
#if _MSVCR_VER>=110
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment