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
98fd541d
Commit
98fd541d
authored
Mar 21, 2006
by
Bryan Mayland
Committed by
Alexandre Julliard
Mar 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: WaitForMultipleObjectsEx should accept up to MAXIMUM_WAIT_OBJECTS.
parent
b4ee2ad0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
sync.c
dlls/kernel/sync.c
+1
-1
sync.c
dlls/kernel/tests/sync.c
+14
-1
No files found.
dlls/kernel/sync.c
View file @
98fd541d
...
...
@@ -173,7 +173,7 @@ DWORD WINAPI WaitForMultipleObjectsEx( DWORD count, const HANDLE *handles,
HANDLE
hloc
[
MAXIMUM_WAIT_OBJECTS
];
unsigned
int
i
;
if
(
count
>
=
MAXIMUM_WAIT_OBJECTS
)
if
(
count
>
MAXIMUM_WAIT_OBJECTS
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
WAIT_FAILED
;
...
...
dlls/kernel/tests/sync.c
View file @
98fd541d
...
...
@@ -31,7 +31,8 @@ static void test_signalandwait(void)
DWORD
(
WINAPI
*
pSignalObjectAndWait
)(
HANDLE
,
HANDLE
,
DWORD
,
BOOL
);
HMODULE
kernel32
;
DWORD
r
;
HANDLE
event
[
2
],
semaphore
[
2
],
file
;
int
i
;
HANDLE
event
[
2
],
maxevents
[
MAXIMUM_WAIT_OBJECTS
],
semaphore
[
2
],
file
;
kernel32
=
GetModuleHandle
(
"kernel32"
);
pSignalObjectAndWait
=
(
void
*
)
GetProcAddress
(
kernel32
,
"SignalObjectAndWait"
);
...
...
@@ -83,6 +84,18 @@ static void test_signalandwait(void)
CloseHandle
(
event
[
0
]);
CloseHandle
(
event
[
1
]);
/* create the maximum number of events and make sure
* we can wait on that many */
for
(
i
=
0
;
i
<
MAXIMUM_WAIT_OBJECTS
;
i
++
)
{
maxevents
[
i
]
=
CreateEvent
(
NULL
,
1
,
1
,
NULL
);
ok
(
maxevents
[
i
]
!=
0
,
"should create enough events
\n
"
);
}
r
=
WaitForMultipleObjects
(
MAXIMUM_WAIT_OBJECTS
,
maxevents
,
0
,
0
);
ok
(
r
!=
WAIT_FAILED
&&
r
!=
WAIT_TIMEOUT
,
"should succeed
\n
"
);
for
(
i
=
0
;
i
<
MAXIMUM_WAIT_OBJECTS
;
i
++
)
if
(
maxevents
[
i
])
CloseHandle
(
maxevents
[
i
]);
/* semaphores */
semaphore
[
0
]
=
CreateSemaphore
(
NULL
,
0
,
1
,
NULL
);
...
...
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