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
e368515e
Commit
e368515e
authored
Mar 11, 2024
by
Jinoh Kang
Committed by
Alexandre Julliard
Mar 15, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Generalize server request make_temporary to set_object_permanence.
Required for implementing NtMakePermanentObject().
parent
d282208a
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
18 deletions
+29
-18
sync.c
dlls/ntdll/unix/sync.c
+2
-1
server_protocol.h
include/wine/server_protocol.h
+8
-6
handle.c
server/handle.c
+7
-2
protocol.def
server/protocol.def
+3
-2
request.h
server/request.h
+5
-4
trace.c
server/trace.c
+4
-3
No files found.
dlls/ntdll/unix/sync.c
View file @
e368515e
...
...
@@ -1281,9 +1281,10 @@ NTSTATUS WINAPI NtMakeTemporaryObject( HANDLE handle )
TRACE
(
"%p
\n
"
,
handle
);
SERVER_START_REQ
(
make_temporary
)
SERVER_START_REQ
(
set_object_permanence
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
permanent
=
0
;
ret
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
...
...
include/wine/server_protocol.h
View file @
e368515e
...
...
@@ -1314,12 +1314,14 @@ struct compare_objects_reply
struct
make_temporary
_request
struct
set_object_permanence
_request
{
struct
request_header
__header
;
obj_handle_t
handle
;
int
permanent
;
char
__pad_20
[
4
];
};
struct
make_temporary
_reply
struct
set_object_permanence
_reply
{
struct
reply_header
__header
;
};
...
...
@@ -5659,7 +5661,7 @@ enum request
REQ_set_handle_info
,
REQ_dup_handle
,
REQ_compare_objects
,
REQ_
make_temporary
,
REQ_
set_object_permanence
,
REQ_open_process
,
REQ_open_thread
,
REQ_select
,
...
...
@@ -5951,7 +5953,7 @@ union generic_request
struct
set_handle_info_request
set_handle_info_request
;
struct
dup_handle_request
dup_handle_request
;
struct
compare_objects_request
compare_objects_request
;
struct
make_temporary_request
make_temporary
_request
;
struct
set_object_permanence_request
set_object_permanence
_request
;
struct
open_process_request
open_process_request
;
struct
open_thread_request
open_thread_request
;
struct
select_request
select_request
;
...
...
@@ -6241,7 +6243,7 @@ union generic_reply
struct
set_handle_info_reply
set_handle_info_reply
;
struct
dup_handle_reply
dup_handle_reply
;
struct
compare_objects_reply
compare_objects_reply
;
struct
make_temporary_reply
make_temporary
_reply
;
struct
set_object_permanence_reply
set_object_permanence
_reply
;
struct
open_process_reply
open_process_reply
;
struct
open_thread_reply
open_thread_reply
;
struct
select_reply
select_reply
;
...
...
@@ -6505,7 +6507,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 79
6
#define SERVER_PROTOCOL_VERSION 79
7
/* ### protocol_version end ### */
...
...
server/handle.c
View file @
e368515e
...
...
@@ -885,13 +885,18 @@ DECL_HANDLER(get_system_handles)
}
}
DECL_HANDLER
(
make_temporary
)
DECL_HANDLER
(
set_object_permanence
)
{
struct
object
*
obj
;
if
(
!
(
obj
=
get_handle_obj
(
current
->
process
,
req
->
handle
,
0
,
NULL
)))
return
;
if
(
obj
->
is_permanent
)
if
(
req
->
permanent
&&
!
obj
->
is_permanent
)
{
grab_object
(
obj
);
make_object_permanent
(
obj
);
}
else
if
(
!
req
->
permanent
&&
obj
->
is_permanent
)
{
make_object_temporary
(
obj
);
release_object
(
obj
);
...
...
server/protocol.def
View file @
e368515e
...
...
@@ -1175,9 +1175,10 @@ typedef struct
@END
/* Make an object temporary */
@REQ(
make_temporary
)
/* Make an object
permanent or
temporary */
@REQ(
set_object_permanence
)
obj_handle_t handle; /* handle to the object */
int permanent; /* 1 to make permanent, 0 to make temporary */
@END
...
...
server/request.h
View file @
e368515e
...
...
@@ -144,7 +144,7 @@ DECL_HANDLER(close_handle);
DECL_HANDLER
(
set_handle_info
);
DECL_HANDLER
(
dup_handle
);
DECL_HANDLER
(
compare_objects
);
DECL_HANDLER
(
make_temporary
);
DECL_HANDLER
(
set_object_permanence
);
DECL_HANDLER
(
open_process
);
DECL_HANDLER
(
open_thread
);
DECL_HANDLER
(
select
);
...
...
@@ -435,7 +435,7 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_set_handle_info
,
(
req_handler
)
req_dup_handle
,
(
req_handler
)
req_compare_objects
,
(
req_handler
)
req_
make_temporary
,
(
req_handler
)
req_
set_object_permanence
,
(
req_handler
)
req_open_process
,
(
req_handler
)
req_open_thread
,
(
req_handler
)
req_select
,
...
...
@@ -916,8 +916,9 @@ C_ASSERT( sizeof(struct dup_handle_reply) == 16 );
C_ASSERT
(
FIELD_OFFSET
(
struct
compare_objects_request
,
first
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
compare_objects_request
,
second
)
==
16
);
C_ASSERT
(
sizeof
(
struct
compare_objects_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
make_temporary_request
,
handle
)
==
12
);
C_ASSERT
(
sizeof
(
struct
make_temporary_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_object_permanence_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_object_permanence_request
,
permanent
)
==
16
);
C_ASSERT
(
sizeof
(
struct
set_object_permanence_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
open_process_request
,
pid
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
open_process_request
,
access
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
open_process_request
,
attributes
)
==
20
);
...
...
server/trace.c
View file @
e368515e
...
...
@@ -1697,9 +1697,10 @@ static void dump_compare_objects_request( const struct compare_objects_request *
fprintf
(
stderr
,
", second=%04x"
,
req
->
second
);
}
static
void
dump_
make_temporary_request
(
const
struct
make_temporary
_request
*
req
)
static
void
dump_
set_object_permanence_request
(
const
struct
set_object_permanence
_request
*
req
)
{
fprintf
(
stderr
,
" handle=%04x"
,
req
->
handle
);
fprintf
(
stderr
,
", permanent=%d"
,
req
->
permanent
);
}
static
void
dump_open_process_request
(
const
struct
open_process_request
*
req
)
...
...
@@ -4621,7 +4622,7 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_set_handle_info_request
,
(
dump_func
)
dump_dup_handle_request
,
(
dump_func
)
dump_compare_objects_request
,
(
dump_func
)
dump_
make_temporary
_request
,
(
dump_func
)
dump_
set_object_permanence
_request
,
(
dump_func
)
dump_open_process_request
,
(
dump_func
)
dump_open_thread_request
,
(
dump_func
)
dump_select_request
,
...
...
@@ -5197,7 +5198,7 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"set_handle_info"
,
"dup_handle"
,
"compare_objects"
,
"
make_temporary
"
,
"
set_object_permanence
"
,
"open_process"
,
"open_thread"
,
"select"
,
...
...
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