Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d5f23441
Commit
d5f23441
authored
May 30, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use nameless unions/structs for IO_STATUS_BLOCK.
parent
c3352feb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
59 deletions
+42
-59
sync.c
dlls/ntdll/sync.c
+0
-1
threadpool.c
dlls/ntdll/tests/threadpool.c
+1
-3
threadpool.c
dlls/ntdll/threadpool.c
+3
-4
cdrom.c
dlls/ntdll/unix/cdrom.c
+1
-2
file.c
dlls/ntdll/unix/file.c
+32
-33
serial.c
dlls/ntdll/unix/serial.c
+1
-2
sync.c
dlls/ntdll/unix/sync.c
+3
-4
tape.c
dlls/ntdll/unix/tape.c
+1
-2
unix_private.h
dlls/ntdll/unix/unix_private.h
+0
-8
No files found.
dlls/ntdll/sync.c
View file @
d5f23441
...
...
@@ -30,7 +30,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "wine/debug.h"
...
...
dlls/ntdll/tests/threadpool.c
View file @
d5f23441
...
...
@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSSTRUCT
#define NONAMELESSUNION
#include "ntdll_test.h"
static
NTSTATUS
(
WINAPI
*
pTpAllocCleanupGroup
)(
TP_CLEANUP_GROUP
**
);
...
...
@@ -2018,7 +2016,7 @@ static void CALLBACK io_cb(TP_CALLBACK_INSTANCE *instance, void *userdata,
struct
io_cb_ctx
*
ctx
=
userdata
;
++
ctx
->
count
;
ctx
->
ovl
=
cvalue
;
ctx
->
ret
=
iosb
->
u
.
Status
;
ctx
->
ret
=
iosb
->
Status
;
ctx
->
length
=
iosb
->
Information
;
ctx
->
io
=
io
;
}
...
...
dlls/ntdll/threadpool.c
View file @
d5f23441
...
...
@@ -23,7 +23,6 @@
#include <stdarg.h>
#include <limits.h>
#define NONAMELESSUNION
#include "ntstatus.h"
#define WIN32_NO_STATUS
#include "winternl.h"
...
...
@@ -483,10 +482,10 @@ static DWORD CALLBACK iocp_poller(LPVOID Arg)
DWORD
transferred
=
0
;
DWORD
err
=
0
;
if
(
iosb
.
u
.
Status
==
STATUS_SUCCESS
)
if
(
iosb
.
Status
==
STATUS_SUCCESS
)
transferred
=
iosb
.
Information
;
else
err
=
RtlNtStatusToDosError
(
iosb
.
u
.
Status
);
err
=
RtlNtStatusToDosError
(
iosb
.
Status
);
callback
(
err
,
transferred
,
overlapped
);
}
...
...
@@ -1537,7 +1536,7 @@ static void CALLBACK ioqueue_thread_proc( void *param )
destroy
=
skip
=
FALSE
;
io
=
(
struct
threadpool_object
*
)
key
;
TRACE
(
"io %p, iosb.Status %#lx.
\n
"
,
io
,
iosb
.
u
.
Status
);
TRACE
(
"io %p, iosb.Status %#lx.
\n
"
,
io
,
iosb
.
Status
);
if
(
io
&&
(
io
->
shutdown
||
io
->
u
.
io
.
shutting_down
))
{
...
...
dlls/ntdll/unix/cdrom.c
View file @
d5f23441
...
...
@@ -117,7 +117,6 @@ typedef struct
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "winioctl.h"
...
...
@@ -3123,7 +3122,7 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc
}
if
(
needs_close
)
close
(
fd
);
error:
io
->
u
.
Status
=
status
;
io
->
Status
=
status
;
io
->
Information
=
sz
;
if
(
event
)
NtSetEvent
(
event
,
NULL
);
return
status
;
...
...
dlls/ntdll/unix/file.c
View file @
d5f23441
This diff is collapsed.
Click to expand it.
dlls/ntdll/unix/serial.c
View file @
d5f23441
...
...
@@ -49,7 +49,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "winioctl.h"
...
...
@@ -1310,7 +1309,7 @@ static NTSTATUS io_control( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc, vo
}
if
(
needs_close
)
close
(
fd
);
error:
io
->
u
.
Status
=
status
;
io
->
Status
=
status
;
io
->
Information
=
sz
;
if
(
event
&&
status
!=
STATUS_PENDING
)
NtSetEvent
(
event
,
NULL
);
return
status
;
...
...
dlls/ntdll/unix/sync.c
View file @
d5f23441
...
...
@@ -57,7 +57,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "ddk/wdm.h"
...
...
@@ -1686,7 +1685,7 @@ NTSTATUS WINAPI NtSetIntervalProfile( ULONG interval, KPROFILE_SOURCE source )
ULONG
WINAPI
NtGetTickCount
(
void
)
{
/* note: we ignore TickCountMultiplier */
return
user_shared_data
->
u
.
TickCount
.
LowPart
;
return
user_shared_data
->
TickCount
.
LowPart
;
}
...
...
@@ -1899,7 +1898,7 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE handle, ULONG_PTR *key, ULONG_PTR *
*
key
=
reply
->
ckey
;
*
value
=
reply
->
cvalue
;
io
->
Information
=
reply
->
information
;
io
->
u
.
Status
=
reply
->
status
;
io
->
Status
=
reply
->
status
;
}
}
SERVER_END_REQ
;
...
...
@@ -1933,7 +1932,7 @@ NTSTATUS WINAPI NtRemoveIoCompletionEx( HANDLE handle, FILE_IO_COMPLETION_INFORM
info
[
i
].
CompletionKey
=
reply
->
ckey
;
info
[
i
].
CompletionValue
=
reply
->
cvalue
;
info
[
i
].
IoStatusBlock
.
Information
=
reply
->
information
;
info
[
i
].
IoStatusBlock
.
u
.
Status
=
reply
->
status
;
info
[
i
].
IoStatusBlock
.
Status
=
reply
->
status
;
}
}
SERVER_END_REQ
;
...
...
dlls/ntdll/unix/tape.c
View file @
d5f23441
...
...
@@ -55,7 +55,6 @@
#include "ntstatus.h"
#define WIN32_NO_STATUS
#define NONAMELESSUNION
#include "windef.h"
#include "winternl.h"
#include "winioctl.h"
...
...
@@ -582,7 +581,7 @@ NTSTATUS tape_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc,
if
(
needs_close
)
close
(
fd
);
error:
io
->
u
.
Status
=
status
;
io
->
Status
=
status
;
io
->
Information
=
sz
;
if
(
event
)
NtSetEvent
(
event
,
NULL
);
return
status
;
...
...
dlls/ntdll/unix/unix_private.h
View file @
d5f23441
...
...
@@ -433,21 +433,13 @@ static inline void set_async_iosb( client_ptr_t iosb, NTSTATUS status, ULONG_PTR
{
IO_STATUS_BLOCK
*
io
=
wine_server_get_ptr
(
iosb
);
io
->
Information
=
info
;
#ifdef NONAMELESSUNION
WriteRelease
(
&
io
->
u
.
Status
,
status
);
#else
WriteRelease
(
&
io
->
Status
,
status
);
#endif
}
}
static
inline
client_ptr_t
iosb_client_ptr
(
IO_STATUS_BLOCK
*
io
)
{
#ifdef NONAMELESSUNION
if
(
io
&&
in_wow64_call
())
return
wine_server_client_ptr
(
io
->
u
.
Pointer
);
#else
if
(
io
&&
in_wow64_call
())
return
wine_server_client_ptr
(
io
->
Pointer
);
#endif
return
wine_server_client_ptr
(
io
);
}
...
...
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