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
b5eff130
Commit
b5eff130
authored
Mar 14, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/systemclock: Also wake the semaphore at the given start time.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ff0c09e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
systemclock.c
dlls/quartz/systemclock.c
+2
-2
systemclock.c
dlls/quartz/tests/systemclock.c
+1
-1
No files found.
dlls/quartz/systemclock.c
View file @
b5eff130
...
...
@@ -106,11 +106,11 @@ static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) {
{
if
(
sink
->
rtBaseTime
<=
curTime
)
{
DWORD
periods
=
(
curTime
-
sink
->
rtBaseTime
)
/
sink
->
rtIntervalTime
;
DWORD
periods
=
(
(
curTime
-
sink
->
rtBaseTime
)
/
sink
->
rtIntervalTime
)
+
1
;
ReleaseSemaphore
(
sink
->
hEvent
,
periods
,
NULL
);
sink
->
rtBaseTime
+=
periods
*
sink
->
rtIntervalTime
;
}
timeOut
=
min
(
timeOut
,
(
(
sink
->
rtBaseTime
+
sink
->
rtIntervalTime
)
-
curTime
)
/
10000
);
timeOut
=
min
(
timeOut
,
(
sink
->
rtBaseTime
-
curTime
)
/
10000
);
}
LeaveCriticalSection
(
&
This
->
safe
);
...
...
dlls/quartz/tests/systemclock.c
View file @
b5eff130
...
...
@@ -160,7 +160,7 @@ static void test_advise(void)
hr
=
IReferenceClock_AdvisePeriodic
(
clock
,
current
,
500
*
10000
,
(
HSEMAPHORE
)
semaphore
,
&
cookie
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
!
WaitForSingleObject
(
semaphore
,
10
),
"Semaphore should be signaled.
\n
"
);
ok
(
!
WaitForSingleObject
(
semaphore
,
10
),
"Semaphore should be signaled.
\n
"
);
for
(
i
=
0
;
i
<
5
;
++
i
)
{
ok
(
WaitForSingleObject
(
semaphore
,
480
)
==
WAIT_TIMEOUT
,
"Semaphore should not be signaled.
\n
"
);
...
...
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