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
92a66c08
Commit
92a66c08
authored
Jul 08, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass a length pointer instead of an IO_STATUS_BLOCK to the async callbacks.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
0c71a987
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
33 deletions
+25
-33
file.c
dlls/ntdll/unix/file.c
+9
-18
server.c
dlls/ntdll/unix/server.c
+7
-2
socket.c
dlls/ntdll/unix/socket.c
+8
-12
unix_private.h
dlls/ntdll/unix/unix_private.h
+1
-1
No files found.
dlls/ntdll/unix/file.c
View file @
92a66c08
...
@@ -4681,10 +4681,9 @@ static NTSTATUS wait_async( HANDLE handle, BOOL alertable )
...
@@ -4681,10 +4681,9 @@ static NTSTATUS wait_async( HANDLE handle, BOOL alertable )
}
}
/* callback for irp async I/O completion */
/* callback for irp async I/O completion */
static
NTSTATUS
irp_completion
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
)
static
NTSTATUS
irp_completion
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
)
{
{
struct
async_irp
*
async
=
user
;
struct
async_irp
*
async
=
user
;
ULONG
information
=
0
;
if
(
status
==
STATUS_ALERTED
)
if
(
status
==
STATUS_ALERTED
)
{
{
...
@@ -4693,20 +4692,15 @@ static NTSTATUS irp_completion( void *user, IO_STATUS_BLOCK *io, NTSTATUS status
...
@@ -4693,20 +4692,15 @@ static NTSTATUS irp_completion( void *user, IO_STATUS_BLOCK *io, NTSTATUS status
req
->
user_arg
=
wine_server_client_ptr
(
async
);
req
->
user_arg
=
wine_server_client_ptr
(
async
);
wine_server_set_reply
(
req
,
async
->
buffer
,
async
->
size
);
wine_server_set_reply
(
req
,
async
->
buffer
,
async
->
size
);
status
=
virtual_locked_server_call
(
req
);
status
=
virtual_locked_server_call
(
req
);
information
=
reply
->
size
;
*
info
=
reply
->
size
;
}
}
SERVER_END_REQ
;
SERVER_END_REQ
;
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
release_fileio
(
&
async
->
io
);
{
io
->
u
.
Status
=
status
;
io
->
Information
=
information
;
release_fileio
(
&
async
->
io
);
}
return
status
;
return
status
;
}
}
static
NTSTATUS
async_read_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
iosb
,
NTSTATUS
status
)
static
NTSTATUS
async_read_proc
(
void
*
user
,
ULONG_PTR
*
info
,
NTSTATUS
status
)
{
{
struct
async_fileio_read
*
fileio
=
user
;
struct
async_fileio_read
*
fileio
=
user
;
int
fd
,
needs_close
,
result
;
int
fd
,
needs_close
,
result
;
...
@@ -4750,14 +4744,13 @@ static NTSTATUS async_read_proc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS sta
...
@@ -4750,14 +4744,13 @@ static NTSTATUS async_read_proc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS sta
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
iosb
->
u
.
Status
=
status
;
*
info
=
fileio
->
already
;
iosb
->
Information
=
fileio
->
already
;
release_fileio
(
&
fileio
->
io
);
release_fileio
(
&
fileio
->
io
);
}
}
return
status
;
return
status
;
}
}
static
NTSTATUS
async_write_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
iosb
,
NTSTATUS
status
)
static
NTSTATUS
async_write_proc
(
void
*
user
,
ULONG_PTR
*
info
,
NTSTATUS
status
)
{
{
struct
async_fileio_write
*
fileio
=
user
;
struct
async_fileio_write
*
fileio
=
user
;
int
result
,
fd
,
needs_close
;
int
result
,
fd
,
needs_close
;
...
@@ -4797,8 +4790,7 @@ static NTSTATUS async_write_proc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
...
@@ -4797,8 +4790,7 @@ static NTSTATUS async_write_proc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
iosb
->
u
.
Status
=
status
;
*
info
=
fileio
->
already
;
iosb
->
Information
=
fileio
->
already
;
release_fileio
(
&
fileio
->
io
);
release_fileio
(
&
fileio
->
io
);
}
}
return
status
;
return
status
;
...
@@ -6064,7 +6056,7 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE handle, IO_STATUS_BLOCK *io_status, LARGE_I
...
@@ -6064,7 +6056,7 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE handle, IO_STATUS_BLOCK *io_status, LARGE_I
}
}
static
NTSTATUS
read_changes_apc
(
void
*
user
,
IO_STATUS_BLOCK
*
iosb
,
NTSTATUS
status
)
static
NTSTATUS
read_changes_apc
(
void
*
user
,
ULONG_PTR
*
info
,
NTSTATUS
status
)
{
{
struct
async_fileio_read_changes
*
fileio
=
user
;
struct
async_fileio_read_changes
*
fileio
=
user
;
int
size
=
0
;
int
size
=
0
;
...
@@ -6133,8 +6125,7 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
...
@@ -6133,8 +6125,7 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb, NTSTATUS st
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
iosb
->
u
.
Status
=
status
;
*
info
=
size
;
iosb
->
Information
=
size
;
release_fileio
(
&
fileio
->
io
);
release_fileio
(
&
fileio
->
io
);
}
}
return
status
;
return
status
;
...
...
dlls/ntdll/unix/server.c
View file @
92a66c08
...
@@ -379,11 +379,16 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
...
@@ -379,11 +379,16 @@ static void invoke_system_apc( const apc_call_t *call, apc_result_t *result, BOO
{
{
IO_STATUS_BLOCK
*
iosb
=
wine_server_get_ptr
(
call
->
async_io
.
sb
);
IO_STATUS_BLOCK
*
iosb
=
wine_server_get_ptr
(
call
->
async_io
.
sb
);
struct
async_fileio
*
user
=
wine_server_get_ptr
(
call
->
async_io
.
user
);
struct
async_fileio
*
user
=
wine_server_get_ptr
(
call
->
async_io
.
user
);
ULONG_PTR
info
=
0
;
result
->
type
=
call
->
type
;
result
->
type
=
call
->
type
;
result
->
async_io
.
status
=
user
->
callback
(
user
,
iosb
,
call
->
async_io
.
status
);
result
->
async_io
.
status
=
user
->
callback
(
user
,
&
info
,
call
->
async_io
.
status
);
if
(
result
->
async_io
.
status
!=
STATUS_PENDING
)
if
(
result
->
async_io
.
status
!=
STATUS_PENDING
)
result
->
async_io
.
total
=
iosb
->
Information
;
{
result
->
async_io
.
total
=
info
;
iosb
->
Status
=
result
->
async_io
.
status
;
iosb
->
Information
=
info
;
}
break
;
break
;
}
}
case
APC_VIRTUAL_ALLOC
:
case
APC_VIRTUAL_ALLOC
:
...
...
dlls/ntdll/unix/socket.c
View file @
92a66c08
...
@@ -543,7 +543,7 @@ static NTSTATUS try_recv( int fd, struct async_recv_ioctl *async, ULONG_PTR *siz
...
@@ -543,7 +543,7 @@ static NTSTATUS try_recv( int fd, struct async_recv_ioctl *async, ULONG_PTR *siz
return
status
;
return
status
;
}
}
static
NTSTATUS
async_recv_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
)
static
NTSTATUS
async_recv_proc
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
)
{
{
struct
async_recv_ioctl
*
async
=
user
;
struct
async_recv_ioctl
*
async
=
user
;
ULONG_PTR
information
=
0
;
ULONG_PTR
information
=
0
;
...
@@ -566,8 +566,7 @@ static NTSTATUS async_recv_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
...
@@ -566,8 +566,7 @@ static NTSTATUS async_recv_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
io
->
Status
=
status
;
*
info
=
information
;
io
->
Information
=
information
;
release_fileio
(
&
async
->
io
);
release_fileio
(
&
async
->
io
);
}
}
return
status
;
return
status
;
...
@@ -684,7 +683,7 @@ static ULONG_PTR fill_poll_output( struct async_poll_ioctl *async, NTSTATUS stat
...
@@ -684,7 +683,7 @@ static ULONG_PTR fill_poll_output( struct async_poll_ioctl *async, NTSTATUS stat
return
offsetof
(
struct
afd_poll_params
,
sockets
[
count
]
);
return
offsetof
(
struct
afd_poll_params
,
sockets
[
count
]
);
}
}
static
NTSTATUS
async_poll_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
)
static
NTSTATUS
async_poll_proc
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
)
{
{
struct
async_poll_ioctl
*
async
=
user
;
struct
async_poll_ioctl
*
async
=
user
;
ULONG_PTR
information
=
0
;
ULONG_PTR
information
=
0
;
...
@@ -704,8 +703,7 @@ static NTSTATUS async_poll_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
...
@@ -704,8 +703,7 @@ static NTSTATUS async_poll_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
io
->
Status
=
status
;
*
info
=
information
;
io
->
Information
=
information
;
free
(
async
->
input
);
free
(
async
->
input
);
release_fileio
(
&
async
->
io
);
release_fileio
(
&
async
->
io
);
}
}
...
@@ -868,7 +866,7 @@ static NTSTATUS try_send( int fd, struct async_send_ioctl *async )
...
@@ -868,7 +866,7 @@ static NTSTATUS try_send( int fd, struct async_send_ioctl *async )
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
static
NTSTATUS
async_send_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
)
static
NTSTATUS
async_send_proc
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
)
{
{
struct
async_send_ioctl
*
async
=
user
;
struct
async_send_ioctl
*
async
=
user
;
int
fd
,
needs_close
;
int
fd
,
needs_close
;
...
@@ -890,8 +888,7 @@ static NTSTATUS async_send_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
...
@@ -890,8 +888,7 @@ static NTSTATUS async_send_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS statu
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
io
->
Status
=
status
;
*
info
=
async
->
sent_len
;
io
->
Information
=
async
->
sent_len
;
release_fileio
(
&
async
->
io
);
release_fileio
(
&
async
->
io
);
}
}
return
status
;
return
status
;
...
@@ -1033,7 +1030,7 @@ static NTSTATUS try_transmit( int sock_fd, int file_fd, struct async_transmit_io
...
@@ -1033,7 +1030,7 @@ static NTSTATUS try_transmit( int sock_fd, int file_fd, struct async_transmit_io
return
STATUS_SUCCESS
;
return
STATUS_SUCCESS
;
}
}
static
NTSTATUS
async_transmit_proc
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
)
static
NTSTATUS
async_transmit_proc
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
)
{
{
int
sock_fd
,
file_fd
=
-
1
,
sock_needs_close
=
FALSE
,
file_needs_close
=
FALSE
;
int
sock_fd
,
file_fd
=
-
1
,
sock_needs_close
=
FALSE
,
file_needs_close
=
FALSE
;
struct
async_transmit_ioctl
*
async
=
user
;
struct
async_transmit_ioctl
*
async
=
user
;
...
@@ -1062,8 +1059,7 @@ static NTSTATUS async_transmit_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS s
...
@@ -1062,8 +1059,7 @@ static NTSTATUS async_transmit_proc( void *user, IO_STATUS_BLOCK *io, NTSTATUS s
}
}
if
(
status
!=
STATUS_PENDING
)
if
(
status
!=
STATUS_PENDING
)
{
{
io
->
Status
=
status
;
*
info
=
async
->
head_cursor
+
async
->
file_cursor
+
async
->
tail_cursor
;
io
->
Information
=
async
->
head_cursor
+
async
->
file_cursor
+
async
->
tail_cursor
;
release_fileio
(
&
async
->
io
);
release_fileio
(
&
async
->
io
);
}
}
return
status
;
return
status
;
...
...
dlls/ntdll/unix/unix_private.h
View file @
92a66c08
...
@@ -69,7 +69,7 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
...
@@ -69,7 +69,7 @@ static inline struct ntdll_thread_data *ntdll_get_thread_data(void)
return
(
struct
ntdll_thread_data
*
)
&
NtCurrentTeb
()
->
GdiTebBatch
;
return
(
struct
ntdll_thread_data
*
)
&
NtCurrentTeb
()
->
GdiTebBatch
;
}
}
typedef
NTSTATUS
async_callback_t
(
void
*
user
,
IO_STATUS_BLOCK
*
i
o
,
NTSTATUS
status
);
typedef
NTSTATUS
async_callback_t
(
void
*
user
,
ULONG_PTR
*
inf
o
,
NTSTATUS
status
);
struct
async_fileio
struct
async_fileio
{
{
...
...
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