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
d3df2b12
Commit
d3df2b12
authored
Feb 16, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Remove support for process-local handle tables.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e9410791
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
242 deletions
+20
-242
sync.c
dlls/ntdll/unix/sync.c
+0
-3
server_protocol.h
include/wine/server_protocol.h
+3
-58
atom.c
server/atom.c
+9
-89
protocol.def
server/protocol.def
+0
-27
request.h
server/request.h
+4
-25
trace.c
server/trace.c
+4
-40
No files found.
dlls/ntdll/unix/sync.c
View file @
d3df2b12
...
...
@@ -2157,7 +2157,6 @@ NTSTATUS WINAPI NtAddAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
SERVER_START_REQ
(
add_atom
)
{
wine_server_add_data
(
req
,
name
,
length
);
req
->
table
=
0
;
status
=
wine_server_call
(
req
);
*
atom
=
reply
->
atom
;
}
...
...
@@ -2178,7 +2177,6 @@ NTSTATUS WINAPI NtDeleteAtom( RTL_ATOM atom )
SERVER_START_REQ
(
delete_atom
)
{
req
->
atom
=
atom
;
req
->
table
=
0
;
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
...
...
@@ -2198,7 +2196,6 @@ NTSTATUS WINAPI NtFindAtom( const WCHAR *name, ULONG length, RTL_ATOM *atom )
SERVER_START_REQ
(
find_atom
)
{
wine_server_add_data
(
req
,
name
,
length
);
req
->
table
=
0
;
status
=
wine_server_call
(
req
);
*
atom
=
reply
->
atom
;
}
...
...
include/wine/server_protocol.h
View file @
d3df2b12
...
...
@@ -2530,8 +2530,8 @@ struct get_selector_entry_reply
struct
add_atom_request
{
struct
request_header
__header
;
obj_handle_t
table
;
/* VARARG(name,unicode_str); */
char
__pad_12
[
4
];
};
struct
add_atom_reply
{
...
...
@@ -2545,9 +2545,7 @@ struct add_atom_reply
struct
delete_atom_request
{
struct
request_header
__header
;
obj_handle_t
table
;
atom_t
atom
;
char
__pad_20
[
4
];
};
struct
delete_atom_reply
{
...
...
@@ -2559,8 +2557,8 @@ struct delete_atom_reply
struct
find_atom_request
{
struct
request_header
__header
;
obj_handle_t
table
;
/* VARARG(name,unicode_str); */
char
__pad_12
[
4
];
};
struct
find_atom_reply
{
...
...
@@ -2574,9 +2572,7 @@ struct find_atom_reply
struct
get_atom_information_request
{
struct
request_header
__header
;
obj_handle_t
table
;
atom_t
atom
;
char
__pad_20
[
4
];
};
struct
get_atom_information_reply
{
...
...
@@ -2590,48 +2586,6 @@ struct get_atom_information_reply
struct
set_atom_information_request
{
struct
request_header
__header
;
obj_handle_t
table
;
atom_t
atom
;
int
pinned
;
};
struct
set_atom_information_reply
{
struct
reply_header
__header
;
};
struct
empty_atom_table_request
{
struct
request_header
__header
;
obj_handle_t
table
;
int
if_pinned
;
char
__pad_20
[
4
];
};
struct
empty_atom_table_reply
{
struct
reply_header
__header
;
};
struct
init_atom_table_request
{
struct
request_header
__header
;
int
entries
;
};
struct
init_atom_table_reply
{
struct
reply_header
__header
;
obj_handle_t
table
;
char
__pad_12
[
4
];
};
struct
get_msg_queue_request
{
struct
request_header
__header
;
...
...
@@ -5537,9 +5491,6 @@ enum request
REQ_delete_atom
,
REQ_find_atom
,
REQ_get_atom_information
,
REQ_set_atom_information
,
REQ_empty_atom_table
,
REQ_init_atom_table
,
REQ_get_msg_queue
,
REQ_set_queue_fd
,
REQ_set_queue_mask
,
...
...
@@ -5821,9 +5772,6 @@ union generic_request
struct
delete_atom_request
delete_atom_request
;
struct
find_atom_request
find_atom_request
;
struct
get_atom_information_request
get_atom_information_request
;
struct
set_atom_information_request
set_atom_information_request
;
struct
empty_atom_table_request
empty_atom_table_request
;
struct
init_atom_table_request
init_atom_table_request
;
struct
get_msg_queue_request
get_msg_queue_request
;
struct
set_queue_fd_request
set_queue_fd_request
;
struct
set_queue_mask_request
set_queue_mask_request
;
...
...
@@ -6103,9 +6051,6 @@ union generic_reply
struct
delete_atom_reply
delete_atom_reply
;
struct
find_atom_reply
find_atom_reply
;
struct
get_atom_information_reply
get_atom_information_reply
;
struct
set_atom_information_reply
set_atom_information_reply
;
struct
empty_atom_table_reply
empty_atom_table_reply
;
struct
init_atom_table_reply
init_atom_table_reply
;
struct
get_msg_queue_reply
get_msg_queue_reply
;
struct
set_queue_fd_reply
set_queue_fd_reply
;
struct
set_queue_mask_reply
set_queue_mask_reply
;
...
...
@@ -6278,7 +6223,7 @@ union generic_reply
/* ### protocol_version begin ### */
#define SERVER_PROTOCOL_VERSION 67
7
#define SERVER_PROTOCOL_VERSION 67
8
/* ### protocol_version end ### */
...
...
server/atom.c
View file @
d3df2b12
...
...
@@ -312,22 +312,6 @@ static struct atom_table *get_global_table( struct winstation *winstation, int c
return
table
;
}
static
struct
atom_table
*
get_table
(
obj_handle_t
h
,
int
create
)
{
struct
atom_table
*
table
=
NULL
;
if
(
h
)
{
table
=
(
struct
atom_table
*
)
get_handle_obj
(
current
->
process
,
h
,
0
,
&
atom_table_ops
);
}
else
{
table
=
get_global_table
(
NULL
,
1
);
if
(
table
)
grab_object
(
table
);
}
return
table
;
}
/* add an atom in the global table; used for window properties */
atom_t
add_global_atom
(
struct
winstation
*
winstation
,
const
struct
unicode_str
*
str
)
{
...
...
@@ -379,43 +363,33 @@ void release_global_atom( struct winstation *winstation, atom_t atom )
DECL_HANDLER
(
add_atom
)
{
struct
unicode_str
name
=
get_req_unicode_str
();
struct
atom_table
*
table
=
get_
table
(
req
->
table
,
1
);
struct
atom_table
*
table
=
get_
global_table
(
NULL
,
1
);
if
(
table
)
{
reply
->
atom
=
add_atom
(
table
,
&
name
);
release_object
(
table
);
}
if
(
table
)
reply
->
atom
=
add_atom
(
table
,
&
name
);
}
/* delete a global atom */
DECL_HANDLER
(
delete_atom
)
{
struct
atom_table
*
table
=
get_table
(
req
->
table
,
0
);
if
(
table
)
{
delete_atom
(
table
,
req
->
atom
,
0
);
release_object
(
table
);
}
struct
atom_table
*
table
=
get_global_table
(
NULL
,
0
);
if
(
table
)
delete_atom
(
table
,
req
->
atom
,
0
);
}
/* find a global atom */
DECL_HANDLER
(
find_atom
)
{
struct
unicode_str
name
=
get_req_unicode_str
();
struct
atom_table
*
table
=
get_
table
(
req
->
table
,
0
);
struct
atom_table
*
table
=
get_
global_table
(
NULL
,
0
);
if
(
table
)
{
reply
->
atom
=
find_atom
(
table
,
&
name
);
release_object
(
table
);
}
if
(
table
)
reply
->
atom
=
find_atom
(
table
,
&
name
);
}
/* get global atom name */
DECL_HANDLER
(
get_atom_information
)
{
struct
atom_table
*
table
=
get_table
(
req
->
table
,
0
);
struct
atom_table
*
table
=
get_global_table
(
NULL
,
0
);
if
(
table
)
{
struct
atom_entry
*
entry
;
...
...
@@ -428,59 +402,5 @@ DECL_HANDLER(get_atom_information)
reply
->
total
=
entry
->
len
;
}
else
reply
->
count
=
-
1
;
release_object
(
table
);
}
}
/* set global atom name */
DECL_HANDLER
(
set_atom_information
)
{
struct
atom_table
*
table
=
get_table
(
req
->
table
,
0
);
if
(
table
)
{
struct
atom_entry
*
entry
;
if
((
entry
=
get_atom_entry
(
table
,
req
->
atom
)))
{
if
(
req
->
pinned
)
entry
->
pinned
=
1
;
}
release_object
(
table
);
}
}
/* init a (local) atom table */
DECL_HANDLER
(
init_atom_table
)
{
struct
atom_table
*
table
=
create_table
(
req
->
entries
);
if
(
table
)
{
reply
->
table
=
alloc_handle
(
current
->
process
,
table
,
0
,
0
);
release_object
(
table
);
}
}
/* set global atom name */
DECL_HANDLER
(
empty_atom_table
)
{
struct
atom_table
*
table
=
get_table
(
req
->
table
,
1
);
if
(
table
)
{
int
i
;
struct
atom_entry
*
entry
;
for
(
i
=
0
;
i
<=
table
->
last
;
i
++
)
{
entry
=
table
->
handles
[
i
];
if
(
entry
&&
(
!
entry
->
pinned
||
req
->
if_pinned
))
{
if
(
entry
->
next
)
entry
->
next
->
prev
=
entry
->
prev
;
if
(
entry
->
prev
)
entry
->
prev
->
next
=
entry
->
next
;
else
table
->
entries
[
entry
->
hash
]
=
entry
->
next
;
table
->
handles
[
i
]
=
NULL
;
free
(
entry
);
}
}
release_object
(
table
);
}
}
server/protocol.def
View file @
d3df2b12
...
...
@@ -1915,7 +1915,6 @@ struct process_info
/* Add an atom */
@REQ(add_atom)
obj_handle_t table; /* which table to add atom to */
VARARG(name,unicode_str); /* atom name */
@REPLY
atom_t atom; /* resulting atom */
...
...
@@ -1924,14 +1923,12 @@ struct process_info
/* Delete an atom */
@REQ(delete_atom)
obj_handle_t table; /* which table to delete atom from */
atom_t atom; /* atom handle */
@END
/* Find an atom */
@REQ(find_atom)
obj_handle_t table; /* which table to find atom from */
VARARG(name,unicode_str); /* atom name */
@REPLY
atom_t atom; /* atom handle */
...
...
@@ -1940,7 +1937,6 @@ struct process_info
/* Get information about an atom */
@REQ(get_atom_information)
obj_handle_t table; /* which table to find atom from */
atom_t atom; /* atom handle */
@REPLY
int count; /* atom lock count */
...
...
@@ -1950,29 +1946,6 @@ struct process_info
@END
/* Set information about an atom */
@REQ(set_atom_information)
obj_handle_t table; /* which table to find atom from */
atom_t atom; /* atom handle */
int pinned; /* whether to bump atom information */
@END
/* Empty an atom table */
@REQ(empty_atom_table)
obj_handle_t table; /* which table to find atom from */
int if_pinned; /* whether to delete pinned atoms */
@END
/* Init an atom table */
@REQ(init_atom_table)
int entries; /* number of entries (only for local) */
@REPLY
obj_handle_t table; /* handle to the atom table */
@END
/* Get the message queue of the current thread */
@REQ(get_msg_queue)
@REPLY
...
...
server/request.h
View file @
d3df2b12
...
...
@@ -225,9 +225,6 @@ DECL_HANDLER(add_atom);
DECL_HANDLER
(
delete_atom
);
DECL_HANDLER
(
find_atom
);
DECL_HANDLER
(
get_atom_information
);
DECL_HANDLER
(
set_atom_information
);
DECL_HANDLER
(
empty_atom_table
);
DECL_HANDLER
(
init_atom_table
);
DECL_HANDLER
(
get_msg_queue
);
DECL_HANDLER
(
set_queue_fd
);
DECL_HANDLER
(
set_queue_mask
);
...
...
@@ -508,9 +505,6 @@ static const req_handler req_handlers[REQ_NB_REQUESTS] =
(
req_handler
)
req_delete_atom
,
(
req_handler
)
req_find_atom
,
(
req_handler
)
req_get_atom_information
,
(
req_handler
)
req_set_atom_information
,
(
req_handler
)
req_empty_atom_table
,
(
req_handler
)
req_init_atom_table
,
(
req_handler
)
req_get_msg_queue
,
(
req_handler
)
req_set_queue_fd
,
(
req_handler
)
req_set_queue_mask
,
...
...
@@ -1292,35 +1286,20 @@ C_ASSERT( FIELD_OFFSET(struct get_selector_entry_reply, base) == 8 );
C_ASSERT
(
FIELD_OFFSET
(
struct
get_selector_entry_reply
,
limit
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_selector_entry_reply
,
flags
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_selector_entry_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
add_atom_request
,
table
)
==
12
);
C_ASSERT
(
sizeof
(
struct
add_atom_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
add_atom_reply
,
atom
)
==
8
);
C_ASSERT
(
sizeof
(
struct
add_atom_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
delete_atom_request
,
table
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
delete_atom_request
,
atom
)
==
16
);
C_ASSERT
(
sizeof
(
struct
delete_atom_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
find_atom_request
,
table
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
delete_atom_request
,
atom
)
==
12
);
C_ASSERT
(
sizeof
(
struct
delete_atom_request
)
==
16
);
C_ASSERT
(
sizeof
(
struct
find_atom_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
find_atom_reply
,
atom
)
==
8
);
C_ASSERT
(
sizeof
(
struct
find_atom_reply
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_request
,
table
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_request
,
atom
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_atom_information_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_request
,
atom
)
==
12
);
C_ASSERT
(
sizeof
(
struct
get_atom_information_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_reply
,
count
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_reply
,
pinned
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_atom_information_reply
,
total
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_atom_information_reply
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_atom_information_request
,
table
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_atom_information_request
,
atom
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_atom_information_request
,
pinned
)
==
20
);
C_ASSERT
(
sizeof
(
struct
set_atom_information_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
empty_atom_table_request
,
table
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
empty_atom_table_request
,
if_pinned
)
==
16
);
C_ASSERT
(
sizeof
(
struct
empty_atom_table_request
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_atom_table_request
,
entries
)
==
12
);
C_ASSERT
(
sizeof
(
struct
init_atom_table_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_atom_table_reply
,
table
)
==
8
);
C_ASSERT
(
sizeof
(
struct
init_atom_table_reply
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_msg_queue_request
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_msg_queue_reply
,
handle
)
==
8
);
C_ASSERT
(
sizeof
(
struct
get_msg_queue_reply
)
==
16
);
...
...
server/trace.c
View file @
d3df2b12
...
...
@@ -2533,8 +2533,7 @@ static void dump_get_selector_entry_reply( const struct get_selector_entry_reply
static
void
dump_add_atom_request
(
const
struct
add_atom_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
dump_varargs_unicode_str
(
", name="
,
cur_size
);
dump_varargs_unicode_str
(
" name="
,
cur_size
);
}
static
void
dump_add_atom_reply
(
const
struct
add_atom_reply
*
req
)
...
...
@@ -2544,14 +2543,12 @@ static void dump_add_atom_reply( const struct add_atom_reply *req )
static
void
dump_delete_atom_request
(
const
struct
delete_atom_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
fprintf
(
stderr
,
", atom=%04x"
,
req
->
atom
);
fprintf
(
stderr
,
" atom=%04x"
,
req
->
atom
);
}
static
void
dump_find_atom_request
(
const
struct
find_atom_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
dump_varargs_unicode_str
(
", name="
,
cur_size
);
dump_varargs_unicode_str
(
" name="
,
cur_size
);
}
static
void
dump_find_atom_reply
(
const
struct
find_atom_reply
*
req
)
...
...
@@ -2561,8 +2558,7 @@ static void dump_find_atom_reply( const struct find_atom_reply *req )
static
void
dump_get_atom_information_request
(
const
struct
get_atom_information_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
fprintf
(
stderr
,
", atom=%04x"
,
req
->
atom
);
fprintf
(
stderr
,
" atom=%04x"
,
req
->
atom
);
}
static
void
dump_get_atom_information_reply
(
const
struct
get_atom_information_reply
*
req
)
...
...
@@ -2573,29 +2569,6 @@ static void dump_get_atom_information_reply( const struct get_atom_information_r
dump_varargs_unicode_str
(
", name="
,
cur_size
);
}
static
void
dump_set_atom_information_request
(
const
struct
set_atom_information_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
fprintf
(
stderr
,
", atom=%04x"
,
req
->
atom
);
fprintf
(
stderr
,
", pinned=%d"
,
req
->
pinned
);
}
static
void
dump_empty_atom_table_request
(
const
struct
empty_atom_table_request
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
fprintf
(
stderr
,
", if_pinned=%d"
,
req
->
if_pinned
);
}
static
void
dump_init_atom_table_request
(
const
struct
init_atom_table_request
*
req
)
{
fprintf
(
stderr
,
" entries=%d"
,
req
->
entries
);
}
static
void
dump_init_atom_table_reply
(
const
struct
init_atom_table_reply
*
req
)
{
fprintf
(
stderr
,
" table=%04x"
,
req
->
table
);
}
static
void
dump_get_msg_queue_request
(
const
struct
get_msg_queue_request
*
req
)
{
}
...
...
@@ -4584,9 +4557,6 @@ static const dump_func req_dumpers[REQ_NB_REQUESTS] = {
(
dump_func
)
dump_delete_atom_request
,
(
dump_func
)
dump_find_atom_request
,
(
dump_func
)
dump_get_atom_information_request
,
(
dump_func
)
dump_set_atom_information_request
,
(
dump_func
)
dump_empty_atom_table_request
,
(
dump_func
)
dump_init_atom_table_request
,
(
dump_func
)
dump_get_msg_queue_request
,
(
dump_func
)
dump_set_queue_fd_request
,
(
dump_func
)
dump_set_queue_mask_request
,
...
...
@@ -4864,9 +4834,6 @@ static const dump_func reply_dumpers[REQ_NB_REQUESTS] = {
NULL
,
(
dump_func
)
dump_find_atom_reply
,
(
dump_func
)
dump_get_atom_information_reply
,
NULL
,
NULL
,
(
dump_func
)
dump_init_atom_table_reply
,
(
dump_func
)
dump_get_msg_queue_reply
,
NULL
,
(
dump_func
)
dump_set_queue_mask_reply
,
...
...
@@ -5144,9 +5111,6 @@ static const char * const req_names[REQ_NB_REQUESTS] = {
"delete_atom"
,
"find_atom"
,
"get_atom_information"
,
"set_atom_information"
,
"empty_atom_table"
,
"init_atom_table"
,
"get_msg_queue"
,
"set_queue_fd"
,
"set_queue_mask"
,
...
...
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