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
b06a919c
Commit
b06a919c
authored
Apr 03, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Use the thread entry point field to pass the PEB in the initial thread.
parent
e861d8be
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
6 additions
and
12 deletions
+6
-12
server.c
dlls/ntdll/server.c
+0
-1
thread.c
dlls/ntdll/thread.c
+1
-1
server_protocol.h
include/wine/server_protocol.h
+1
-2
protocol.def
server/protocol.def
+1
-2
request.h
server/request.h
+0
-1
thread.c
server/thread.c
+2
-2
trace.c
server/trace.c
+1
-3
No files found.
dlls/ntdll/server.c
View file @
b06a919c
...
...
@@ -1026,7 +1026,6 @@ size_t server_init_thread( void *entry_point )
req
->
unix_pid
=
getpid
();
req
->
unix_tid
=
get_unix_tid
();
req
->
teb
=
wine_server_client_ptr
(
NtCurrentTeb
()
);
req
->
peb
=
wine_server_client_ptr
(
NtCurrentTeb
()
->
Peb
);
req
->
entry
=
wine_server_client_ptr
(
entry_point
);
req
->
reply_fd
=
reply_pipe
[
1
];
req
->
wait_fd
=
ntdll_get_thread_data
()
->
wait_fd
[
1
];
...
...
dlls/ntdll/thread.c
View file @
b06a919c
...
...
@@ -294,7 +294,7 @@ HANDLE thread_init(void)
/* setup the server connection */
server_init_process
();
info_size
=
server_init_thread
(
NULL
);
info_size
=
server_init_thread
(
peb
);
/* create the process heap */
if
(
!
(
peb
->
ProcessHeap
=
RtlCreateHeap
(
HEAP_GROWABLE
,
NULL
,
0
,
0
,
NULL
,
NULL
)))
...
...
include/wine/server_protocol.h
View file @
b06a919c
...
...
@@ -567,7 +567,6 @@ struct init_thread_request
client_ptr_t
entry
;
int
reply_fd
;
int
wait_fd
;
client_ptr_t
peb
;
};
struct
init_thread_reply
{
...
...
@@ -5215,6 +5214,6 @@ union generic_reply
struct
set_window_layered_info_reply
set_window_layered_info_reply
;
};
#define SERVER_PROTOCOL_VERSION 38
1
#define SERVER_PROTOCOL_VERSION 38
2
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
b06a919c
...
...
@@ -551,10 +551,9 @@ typedef union
int unix_tid; /* Unix tid of new thread */
int debug_level; /* new debug level */
client_ptr_t teb; /* TEB of new thread (in thread address space) */
client_ptr_t entry; /*
thread entry point
(in thread address space) */
client_ptr_t entry; /*
entry point or PEB if initial thread
(in thread address space) */
int reply_fd; /* fd for reply pipe */
int wait_fd; /* fd for blocking calls pipe */
client_ptr_t peb; /* address of PEB (in thread address space) */
@REPLY
process_id_t pid; /* process id of the new thread's process */
thread_id_t tid; /* thread id of the new thread */
...
...
server/request.h
View file @
b06a919c
...
...
@@ -663,7 +663,6 @@ C_ASSERT( FIELD_OFFSET(struct init_thread_request, teb) == 24 );
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_request
,
entry
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_request
,
reply_fd
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_request
,
wait_fd
)
==
44
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_request
,
peb
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_reply
,
pid
)
==
8
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_reply
,
tid
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
init_thread_reply
,
server_start
)
==
16
);
...
...
server/thread.c
View file @
b06a919c
...
...
@@ -1031,7 +1031,7 @@ DECL_HANDLER(init_thread)
if
(
!
(
current
->
wait_fd
=
create_anonymous_fd
(
&
thread_fd_ops
,
wait_fd
,
&
current
->
obj
,
0
)))
return
;
if
(
!
is_valid_address
(
req
->
teb
)
||
!
is_valid_address
(
req
->
peb
)
)
if
(
!
is_valid_address
(
req
->
teb
))
{
set_error
(
STATUS_INVALID_PARAMETER
);
return
;
...
...
@@ -1044,7 +1044,7 @@ DECL_HANDLER(init_thread)
if
(
!
process
->
peb
)
/* first thread, initialize the process too */
{
process
->
unix_pid
=
current
->
unix_pid
;
process
->
peb
=
req
->
peb
;
process
->
peb
=
req
->
entry
;
reply
->
info_size
=
init_process
(
current
);
}
else
...
...
server/trace.c
View file @
b06a919c
...
...
@@ -991,9 +991,7 @@ static void dump_init_thread_request( const struct init_thread_request *req )
dump_uint64
(
&
req
->
entry
);
fprintf
(
stderr
,
","
);
fprintf
(
stderr
,
" reply_fd=%d,"
,
req
->
reply_fd
);
fprintf
(
stderr
,
" wait_fd=%d,"
,
req
->
wait_fd
);
fprintf
(
stderr
,
" peb="
);
dump_uint64
(
&
req
->
peb
);
fprintf
(
stderr
,
" wait_fd=%d"
,
req
->
wait_fd
);
}
static
void
dump_init_thread_reply
(
const
struct
init_thread_reply
*
req
)
...
...
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