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
e4e26bbc
Commit
e4e26bbc
authored
Sep 01, 2022
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Fix some race conditions.
parent
7c7e7e91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
threadpool.c
dlls/ntdll/tests/threadpool.c
+3
-8
No files found.
dlls/ntdll/tests/threadpool.c
View file @
e4e26bbc
...
@@ -1163,11 +1163,6 @@ static void CALLBACK instance_semaphore_completion_cb(TP_CALLBACK_INSTANCE *inst
...
@@ -1163,11 +1163,6 @@ static void CALLBACK instance_semaphore_completion_cb(TP_CALLBACK_INSTANCE *inst
static
void
CALLBACK
instance_finalization_cb
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
userdata
)
static
void
CALLBACK
instance_finalization_cb
(
TP_CALLBACK_INSTANCE
*
instance
,
void
*
userdata
)
{
{
HANDLE
*
semaphores
=
userdata
;
HANDLE
*
semaphores
=
userdata
;
DWORD
result
;
Sleep
(
50
);
result
=
WaitForSingleObject
(
semaphores
[
0
],
100
);
ok
(
result
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ReleaseSemaphore
(
semaphores
[
1
],
1
,
NULL
);
ReleaseSemaphore
(
semaphores
[
1
],
1
,
NULL
);
}
}
...
@@ -1926,7 +1921,7 @@ static void test_tp_multi_wait(void)
...
@@ -1926,7 +1921,7 @@ static void test_tp_multi_wait(void)
multi_wait_info
.
result
=
0
;
multi_wait_info
.
result
=
0
;
ReleaseSemaphore
(
semaphores
[
i
],
1
,
NULL
);
ReleaseSemaphore
(
semaphores
[
i
],
1
,
NULL
);
result
=
WaitForSingleObject
(
semaphore
,
1
00
);
result
=
WaitForSingleObject
(
semaphore
,
20
00
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ok
(
multi_wait_info
.
result
==
i
,
"expected result %d, got %lu
\n
"
,
i
,
multi_wait_info
.
result
);
ok
(
multi_wait_info
.
result
==
i
,
"expected result %d, got %lu
\n
"
,
i
,
multi_wait_info
.
result
);
...
@@ -1939,7 +1934,7 @@ static void test_tp_multi_wait(void)
...
@@ -1939,7 +1934,7 @@ static void test_tp_multi_wait(void)
multi_wait_info
.
result
=
0
;
multi_wait_info
.
result
=
0
;
ReleaseSemaphore
(
semaphores
[
i
],
1
,
NULL
);
ReleaseSemaphore
(
semaphores
[
i
],
1
,
NULL
);
result
=
WaitForSingleObject
(
semaphore
,
1
00
);
result
=
WaitForSingleObject
(
semaphore
,
20
00
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ok
(
multi_wait_info
.
result
==
i
,
"expected result %d, got %lu
\n
"
,
i
,
multi_wait_info
.
result
);
ok
(
multi_wait_info
.
result
==
i
,
"expected result %d, got %lu
\n
"
,
i
,
multi_wait_info
.
result
);
...
@@ -1956,7 +1951,7 @@ static void test_tp_multi_wait(void)
...
@@ -1956,7 +1951,7 @@ static void test_tp_multi_wait(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
semaphores
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
semaphores
);
i
++
)
{
{
result
=
WaitForSingleObject
(
semaphore
,
15
0
);
result
=
WaitForSingleObject
(
semaphore
,
200
0
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
ok
(
result
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %lu
\n
"
,
result
);
}
}
...
...
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