Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7bf56117
Commit
7bf56117
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 event::wait().
parent
d3d9297b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
30 deletions
+3
-30
concurrency.c
dlls/msvcrt/concurrency.c
+3
-30
No files found.
dlls/msvcrt/concurrency.c
View file @
7bf56117
...
...
@@ -2850,17 +2850,8 @@ static inline int evt_transition(void **state, void *from, void *to)
return
InterlockedCompareExchangePointer
(
state
,
to
,
from
)
==
from
;
}
static
void
WINAPI
evt_timeout
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
ctx
,
TP_TIMER
*
timer
)
{
thread_wait
*
wait
=
ctx
;
if
(
evt_transition
(
&
wait
->
signaled
,
EVT_WAITING
,
EVT_RUNNING
))
call_Context_Unblock
(
wait
->
ctx
);
}
static
size_t
evt_wait
(
thread_wait
*
wait
,
event
**
events
,
int
count
,
bool
wait_all
,
unsigned
int
timeout
)
{
TP_TIMER
*
tp_timer
=
NULL
;
int
i
;
wait
->
signaled
=
EVT_RUNNING
;
...
...
@@ -2884,30 +2875,12 @@ static size_t evt_wait(thread_wait *wait, event **events, int count, bool wait_a
if
(
!
timeout
)
return
evt_end_wait
(
wait
,
events
,
count
);
if
(
timeout
!=
COOPERATIVE_TIMEOUT_INFINITE
)
{
FILETIME
ft
;
tp_timer
=
CreateThreadpoolTimer
(
evt_timeout
,
wait
,
NULL
);
if
(
!
tp_timer
)
{
FIXME
(
"throw exception?
\n
"
);
return
COOPERATIVE_WAIT_TIMEOUT
;
}
set_timeout
(
&
ft
,
timeout
);
SetThreadpoolTimer
(
tp_timer
,
&
ft
,
0
,
0
);
}
if
(
!
evt_transition
(
&
wait
->
signaled
,
EVT_RUNNING
,
EVT_WAITING
))
return
evt_end_wait
(
wait
,
events
,
count
);
call_Context_Block
(
wait
->
ctx
);
if
(
tp_timer
)
{
SetThreadpoolTimer
(
tp_timer
,
NULL
,
0
,
0
);
WaitForThreadpoolTimerCallbacks
(
tp_timer
,
TRUE
);
CloseThreadpoolTimer
(
tp_timer
);
}
if
(
block_context_for
(
wait
->
ctx
,
timeout
)
&&
!
evt_transition
(
&
wait
->
signaled
,
EVT_WAITING
,
EVT_RUNNING
))
call_Context_Block
(
wait
->
ctx
);
return
evt_end_wait
(
wait
,
events
,
count
);
}
...
...
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