Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
0516d4d7
Commit
0516d4d7
authored
Jul 06, 2020
by
Zebediah Figura
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement NtSignalAndWaitForSingleObject().
parent
3a3784f2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
0 deletions
+33
-0
esync.c
dlls/ntdll/unix/esync.c
+28
-0
esync.h
dlls/ntdll/unix/esync.h
+2
-0
sync.c
dlls/ntdll/unix/sync.c
+3
-0
No files found.
dlls/ntdll/unix/esync.c
View file @
0516d4d7
...
@@ -843,6 +843,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
...
@@ -843,6 +843,34 @@ NTSTATUS esync_wait_objects( DWORD count, const HANDLE *handles, BOOLEAN wait_an
return
ret
;
return
ret
;
}
}
NTSTATUS
esync_signal_and_wait
(
HANDLE
signal
,
HANDLE
wait
,
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
{
struct
esync
*
obj
;
NTSTATUS
ret
;
if
((
ret
=
get_object
(
signal
,
&
obj
)))
return
ret
;
switch
(
obj
->
type
)
{
case
ESYNC_SEMAPHORE
:
ret
=
esync_release_semaphore
(
signal
,
1
,
NULL
);
break
;
case
ESYNC_AUTO_EVENT
:
case
ESYNC_MANUAL_EVENT
:
ret
=
esync_set_event
(
signal
);
break
;
case
ESYNC_MUTEX
:
ret
=
esync_release_mutex
(
signal
,
NULL
);
break
;
default:
return
STATUS_OBJECT_TYPE_MISMATCH
;
}
if
(
ret
)
return
ret
;
return
esync_wait_objects
(
1
,
&
wait
,
TRUE
,
alertable
,
timeout
);
}
void
esync_init
(
void
)
void
esync_init
(
void
)
{
{
struct
stat
st
;
struct
stat
st
;
...
...
dlls/ntdll/unix/esync.h
View file @
0516d4d7
...
@@ -37,6 +37,8 @@ extern NTSTATUS esync_release_mutex( HANDLE *handle, LONG *prev ) DECLSPEC_HIDDE
...
@@ -37,6 +37,8 @@ extern NTSTATUS esync_release_mutex( HANDLE *handle, LONG *prev ) DECLSPEC_HIDDE
extern
NTSTATUS
esync_wait_objects
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOLEAN
wait_any
,
extern
NTSTATUS
esync_wait_objects
(
DWORD
count
,
const
HANDLE
*
handles
,
BOOLEAN
wait_any
,
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
DECLSPEC_HIDDEN
;
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
esync_signal_and_wait
(
HANDLE
signal
,
HANDLE
wait
,
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
DECLSPEC_HIDDEN
;
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
/* We have to synchronize on the fd cache mutex so that our calls to receive_fd
...
...
dlls/ntdll/unix/sync.c
View file @
0516d4d7
...
@@ -1480,6 +1480,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
...
@@ -1480,6 +1480,9 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE signal, HANDLE wait,
select_op_t
select_op
;
select_op_t
select_op
;
UINT
flags
=
SELECT_INTERRUPTIBLE
;
UINT
flags
=
SELECT_INTERRUPTIBLE
;
if
(
do_esync
())
return
esync_signal_and_wait
(
signal
,
wait
,
alertable
,
timeout
);
if
(
!
signal
)
return
STATUS_INVALID_HANDLE
;
if
(
!
signal
)
return
STATUS_INVALID_HANDLE
;
if
(
alertable
)
flags
|=
SELECT_ALERTABLE
;
if
(
alertable
)
flags
|=
SELECT_ALERTABLE
;
...
...
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