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
63b66c99
Commit
63b66c99
authored
Jul 10, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Avoid using RtlQueueWorkItem() in the Unix library.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
afb16545
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
serial.c
dlls/ntdll/unix/serial.c
+8
-4
No files found.
dlls/ntdll/unix/serial.c
View file @
63b66c99
...
...
@@ -950,7 +950,7 @@ static DWORD check_events(int fd, DWORD mask,
* TIOCMIWAIT only checks modem status line and may not be aborted by a changing mask
*
*/
static
DWORD
CALLBACK
wait_for_event
(
LPVOID
arg
)
static
void
CALLBACK
wait_for_event
(
LPVOID
arg
)
{
async_commio
*
commio
=
arg
;
int
fd
,
needs_close
;
...
...
@@ -1008,13 +1008,14 @@ static DWORD CALLBACK wait_for_event(LPVOID arg)
stop_waiting
(
commio
->
hDevice
);
if
(
commio
->
hEvent
)
NtSetEvent
(
commio
->
hEvent
,
NULL
);
free
(
commio
);
return
0
;
NtTerminateThread
(
GetCurrentThread
(),
0
)
;
}
static
NTSTATUS
wait_on
(
HANDLE
hDevice
,
int
fd
,
HANDLE
hEvent
,
PIO_STATUS_BLOCK
piosb
,
DWORD
*
events
)
{
async_commio
*
commio
;
NTSTATUS
status
;
HANDLE
handle
;
if
((
status
=
NtResetEvent
(
hEvent
,
NULL
)))
return
status
;
...
...
@@ -1086,9 +1087,12 @@ static NTSTATUS wait_on(HANDLE hDevice, int fd, HANDLE hEvent, PIO_STATUS_BLOCK
goto
out_now
;
}
/* create the worker for the task */
status
=
RtlQueueWorkItem
(
wait_for_event
,
commio
,
0
/* FIXME */
);
/* create the worker thread for the task */
/* FIXME: should use async I/O instead */
status
=
NtCreateThreadEx
(
&
handle
,
THREAD_ALL_ACCESS
,
NULL
,
GetCurrentProcess
(),
wait_for_event
,
commio
,
0
,
0
,
0
,
0
,
NULL
);
if
(
status
!=
STATUS_SUCCESS
)
goto
out_now
;
NtClose
(
handle
);
return
STATUS_PENDING
;
#if !defined(TIOCINQ) || (!(defined(TIOCSERGETLSR) && defined(TIOCSER_TEMT)) || !defined(TIOCINQ)) || !defined(TIOCMGET) || !defined(TIOCM_CTS) ||!defined(TIOCM_DSR) || !defined(TIOCM_RNG) || !defined(TIOCM_CAR)
...
...
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