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
7c6bc78b
Commit
7c6bc78b
authored
Jun 04, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Get rid of the num_async_io counter in the TEB.
parent
4c5b55a0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
31 deletions
+9
-31
file.c
dlls/ntdll/file.c
+0
-2
sync.c
dlls/ntdll/sync.c
+4
-9
socket.c
dlls/ws2_32/socket.c
+2
-16
thread.h
include/thread.h
+3
-4
No files found.
dlls/ntdll/file.c
View file @
7c6bc78b
...
...
@@ -645,7 +645,6 @@ NTSTATUS WINAPI NtReadFile(HANDLE hFile, HANDLE hEvent,
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fileio
);
else
NtCurrentTeb
()
->
num_async_io
++
;
goto
done
;
}
else
/* synchronous read, wait for the fd to become ready */
...
...
@@ -878,7 +877,6 @@ NTSTATUS WINAPI NtWriteFile(HANDLE hFile, HANDLE hEvent,
SERVER_END_REQ
;
if
(
status
!=
STATUS_PENDING
)
RtlFreeHeap
(
GetProcessHeap
(),
0
,
fileio
);
else
NtCurrentTeb
()
->
num_async_io
++
;
goto
done
;
}
else
/* synchronous write, wait for the fd to become ready */
...
...
dlls/ntdll/sync.c
View file @
7c6bc78b
...
...
@@ -671,8 +671,6 @@ static BOOL invoke_apc( const apc_call_t *call, apc_result_t *result )
result
->
async_io
.
status
=
call
->
async_io
.
func
(
call
->
async_io
.
user
,
call
->
async_io
.
sb
,
call
->
async_io
.
status
);
if
(
result
->
async_io
.
status
!=
STATUS_PENDING
)
NtCurrentTeb
()
->
num_async_io
--
;
break
;
case
APC_VIRTUAL_ALLOC
:
result
->
type
=
call
->
type
;
...
...
@@ -973,13 +971,10 @@ NTSTATUS WINAPI NtYieldExecution(void)
*/
NTSTATUS
WINAPI
NtDelayExecution
(
BOOLEAN
alertable
,
const
LARGE_INTEGER
*
timeout
)
{
/* if alertable or async I/O in progress, we need to query the server */
if
(
alertable
||
NtCurrentTeb
()
->
num_async_io
)
{
UINT
flags
=
SELECT_INTERRUPTIBLE
;
if
(
alertable
)
flags
|=
SELECT_ALERTABLE
;
return
NTDLL_wait_for_multiple_objects
(
0
,
NULL
,
flags
,
timeout
,
0
);
}
/* if alertable, we need to query the server */
if
(
alertable
)
return
NTDLL_wait_for_multiple_objects
(
0
,
NULL
,
SELECT_INTERRUPTIBLE
|
SELECT_ALERTABLE
,
timeout
,
0
);
if
(
!
timeout
||
timeout
->
QuadPart
==
TIMEOUT_INFINITE
)
/* sleep forever */
{
...
...
dlls/ws2_32/socket.c
View file @
7c6bc78b
...
...
@@ -135,7 +135,6 @@
#include "wsipx.h"
#include "winnt.h"
#include "iphlpapi.h"
#include "thread.h"
#include "wine/server.h"
#include "wine/debug.h"
#include "wine/unicode.h"
...
...
@@ -1328,11 +1327,6 @@ static int WS2_register_async_shutdown( SOCKET s, int type )
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
return
NtStatusToWSAError
(
status
);
}
else
NtCurrentTeb
()
->
num_async_io
++
;
/* Try immediate completion */
Sleep
(
0
);
return
0
;
}
...
...
@@ -2681,11 +2675,7 @@ INT WINAPI WSASendTo( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
}
SERVER_END_REQ
;
if
(
err
==
STATUS_PENDING
)
NtCurrentTeb
()
->
num_async_io
++
;
else
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
if
(
err
!=
STATUS_PENDING
)
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
WSASetLastError
(
NtStatusToWSAError
(
err
));
return
SOCKET_ERROR
;
}
...
...
@@ -4206,11 +4196,7 @@ INT WINAPI WSARecvFrom( SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount,
}
SERVER_END_REQ
;
if
(
err
==
STATUS_PENDING
)
NtCurrentTeb
()
->
num_async_io
++
;
else
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
if
(
err
!=
STATUS_PENDING
)
HeapFree
(
GetProcessHeap
(),
0
,
wsa
);
WSASetLastError
(
NtStatusToWSAError
(
err
));
return
SOCKET_ERROR
;
}
...
...
include/thread.h
View file @
7c6bc78b
...
...
@@ -53,11 +53,10 @@ typedef struct _TEB
PVOID
SystemReserved2
[
10
];
/* 1d4 */
/* The following are Wine-specific fields (NT: GdiTebBatch) */
DWORD
num_async_io
;
/* 1fc number of pending async I/O in the server */
ULONG_PTR
dpmi_vif
;
/* 200 protected mode virtual interrupt flag */
DWORD
vm86_pending
;
/* 204 data for vm86 mode */
DWORD
dpmi_vif
;
/* 1fc protected mode virtual interrupt flag */
ULONG_PTR
vm86_pending
;
/* 200 data for vm86 mode */
/* here is plenty space for wine specific fields (don't forget to change pad6!!) */
DWORD
pad6
[
3
09
];
/* 208
*/
DWORD
pad6
[
3
10
];
/* 204
*/
ULONG
gdiRgn
;
/* 6dc */
ULONG
gdiPen
;
/* 6e0 */
...
...
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