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
748ff0f9
Commit
748ff0f9
authored
Dec 30, 1998
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed server wait logic a bit.
parent
b2340eaa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
11 deletions
+23
-11
thread.h
include/thread.h
+1
-0
synchro.c
scheduler/synchro.c
+22
-11
No files found.
include/thread.h
View file @
748ff0f9
...
...
@@ -64,6 +64,7 @@ typedef struct
DWORD
signaled
;
/* Index of signaled object (or WAIT_FAILED)*/
BOOL32
wait_all
;
/* Wait for all objects flag */
BOOL32
wait_msg
;
/* Wait for message flag */
BOOL32
use_server
;
/* Use server call for waiting */
K32OBJ
*
objs
[
MAXIMUM_WAIT_OBJECTS
];
/* Object pointers */
int
server
[
MAXIMUM_WAIT_OBJECTS
];
/* Server handles */
}
WAIT_STRUCT
;
...
...
scheduler/synchro.c
View file @
748ff0f9
...
...
@@ -24,7 +24,7 @@ static BOOL32 SYNC_BuildWaitStruct( DWORD count, const HANDLE32 *handles,
BOOL32
wait_all
,
BOOL32
wait_msg
,
WAIT_STRUCT
*
wait
)
{
DWORD
i
;
DWORD
i
,
j
;
K32OBJ
**
ptr
;
SYSTEM_LOCK
();
...
...
@@ -32,6 +32,7 @@ static BOOL32 SYNC_BuildWaitStruct( DWORD count, const HANDLE32 *handles,
wait
->
signaled
=
WAIT_FAILED
;
wait
->
wait_all
=
wait_all
;
wait
->
wait_msg
=
wait_msg
;
wait
->
use_server
=
TRUE
;
for
(
i
=
0
,
ptr
=
wait
->
objs
;
i
<
count
;
i
++
,
ptr
++
)
{
if
(
!
(
*
ptr
=
HANDLE_GetObjPtr
(
PROCESS_Current
(),
handles
[
i
],
...
...
@@ -41,16 +42,29 @@ static BOOL32 SYNC_BuildWaitStruct( DWORD count, const HANDLE32 *handles,
ERR
(
win32
,
"Bad handle %08x
\n
"
,
handles
[
i
]);
break
;
}
if
(
!
K32OBJ_OPS
(
*
ptr
)
->
signaled
)
if
(
wait
->
server
[
i
]
==
-
1
)
{
/* This object type cannot be waited upon */
ERR
(
win32
,
"Cannot wait on handle %08x
\n
"
,
handles
[
i
]);
K32OBJ_DecCount
(
*
ptr
);
break
;
WARN
(
win32
,
"No server handle for %08x (type %d)
\n
"
,
handles
[
i
],
(
*
ptr
)
->
type
);
wait
->
use_server
=
FALSE
;
}
}
if
(
!
wait
->
use_server
)
{
for
(
j
=
0
,
ptr
=
wait
->
objs
;
j
<
i
;
j
++
,
ptr
++
)
{
if
(
!
K32OBJ_OPS
(
*
ptr
)
->
signaled
)
{
/* This object type cannot be waited upon */
ERR
(
win32
,
"Cannot wait on handle %08x
\n
"
,
handles
[
j
]);
break
;
}
}
}
if
(
i
!=
count
)
else
j
=
count
;
if
((
i
!=
count
)
||
(
j
!=
count
))
{
/* There was an error */
wait
->
wait_msg
=
FALSE
;
...
...
@@ -317,11 +331,8 @@ DWORD SYNC_DoWait( DWORD count, const HANDLE32 *handles,
wait
->
signaled
=
WAIT_FAILED
;
else
{
int
i
;
/* Check if we can use a server wait */
for
(
i
=
0
;
i
<
count
;
i
++
)
if
(
wait
->
server
[
i
]
==
-
1
)
break
;
if
(
i
==
count
)
if
(
wait
->
use_server
)
{
int
flags
=
0
;
SYSTEM_UNLOCK
();
...
...
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