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
6ab494ce
Commit
6ab494ce
authored
Jul 27, 2015
by
Sebastian Lackner
Committed by
Alexandre Julliard
Jul 29, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Implement ThreadQuerySetWin32StartAddress info class in NtSetInformationThread.
parent
6156cf31
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
12 deletions
+35
-12
thread.c
dlls/ntdll/thread.c
+14
-2
server_protocol.h
include/wine/server_protocol.h
+7
-5
protocol.def
server/protocol.def
+5
-3
request.h
server/request.h
+3
-2
thread.c
server/thread.c
+4
-0
thread.h
server/thread.h
+1
-0
trace.c
server/trace.c
+1
-0
No files found.
dlls/ntdll/thread.c
View file @
6ab494ce
...
...
@@ -1203,14 +1203,26 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
case
ThreadHideFromDebugger
:
/* pretend the call succeeded to satisfy some code protectors */
return
STATUS_SUCCESS
;
case
ThreadQuerySetWin32StartAddress
:
{
const
PRTL_THREAD_START_ROUTINE
*
entry
=
data
;
if
(
length
!=
sizeof
(
PRTL_THREAD_START_ROUTINE
))
return
STATUS_INVALID_PARAMETER
;
SERVER_START_REQ
(
set_thread_info
)
{
req
->
handle
=
wine_server_obj_handle
(
handle
);
req
->
mask
=
SET_THREAD_INFO_ENTRYPOINT
;
req
->
entry_point
=
wine_server_client_ptr
(
*
entry
);
status
=
wine_server_call
(
req
);
}
SERVER_END_REQ
;
}
return
status
;
case
ThreadBasicInformation
:
case
ThreadTimes
:
case
ThreadPriority
:
case
ThreadDescriptorTableEntry
:
case
ThreadEnableAlignmentFaultFixup
:
case
ThreadEventPair_Reusable
:
case
ThreadQuerySetWin32StartAddress
:
case
ThreadPerformanceCount
:
case
ThreadAmILastThread
:
case
ThreadIdealProcessor
:
...
...
include/wine/server_protocol.h
View file @
6ab494ce
...
...
@@ -922,16 +922,18 @@ struct set_thread_info_request
int
mask
;
int
priority
;
affinity_t
affinity
;
client_ptr_t
entry_point
;
obj_handle_t
token
;
char
__pad_
36
[
4
];
char
__pad_
44
[
4
];
};
struct
set_thread_info_reply
{
struct
reply_header
__header
;
};
#define SET_THREAD_INFO_PRIORITY 0x01
#define SET_THREAD_INFO_AFFINITY 0x02
#define SET_THREAD_INFO_TOKEN 0x04
#define SET_THREAD_INFO_PRIORITY 0x01
#define SET_THREAD_INFO_AFFINITY 0x02
#define SET_THREAD_INFO_TOKEN 0x04
#define SET_THREAD_INFO_ENTRYPOINT 0x08
...
...
@@ -6111,6 +6113,6 @@ union generic_reply
struct
terminate_job_reply
terminate_job_reply
;
};
#define SERVER_PROTOCOL_VERSION 48
2
#define SERVER_PROTOCOL_VERSION 48
3
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
6ab494ce
...
...
@@ -863,11 +863,13 @@ struct rawinput_device
int mask; /* setting mask (see below) */
int priority; /* priority class */
affinity_t affinity; /* affinity mask */
client_ptr_t entry_point; /* thread entry point */
obj_handle_t token; /* impersonation token */
@END
#define SET_THREAD_INFO_PRIORITY 0x01
#define SET_THREAD_INFO_AFFINITY 0x02
#define SET_THREAD_INFO_TOKEN 0x04
#define SET_THREAD_INFO_PRIORITY 0x01
#define SET_THREAD_INFO_AFFINITY 0x02
#define SET_THREAD_INFO_TOKEN 0x04
#define SET_THREAD_INFO_ENTRYPOINT 0x08
/* Retrieve information about a module */
...
...
server/request.h
View file @
6ab494ce
...
...
@@ -782,8 +782,9 @@ C_ASSERT( FIELD_OFFSET(struct set_thread_info_request, handle) == 12 );
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
mask
)
==
16
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
priority
)
==
20
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
affinity
)
==
24
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
token
)
==
32
);
C_ASSERT
(
sizeof
(
struct
set_thread_info_request
)
==
40
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
entry_point
)
==
32
);
C_ASSERT
(
FIELD_OFFSET
(
struct
set_thread_info_request
,
token
)
==
40
);
C_ASSERT
(
sizeof
(
struct
set_thread_info_request
)
==
48
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_request
,
handle
)
==
12
);
C_ASSERT
(
FIELD_OFFSET
(
struct
get_dll_info_request
,
base_address
)
==
16
);
C_ASSERT
(
sizeof
(
struct
get_dll_info_request
)
==
24
);
...
...
server/thread.c
View file @
6ab494ce
...
...
@@ -175,6 +175,7 @@ static inline void init_thread_structure( struct thread *thread )
thread
->
context
=
NULL
;
thread
->
suspend_context
=
NULL
;
thread
->
teb
=
0
;
thread
->
entry_point
=
0
;
thread
->
debug_ctx
=
NULL
;
thread
->
debug_event
=
NULL
;
thread
->
debug_break
=
0
;
...
...
@@ -497,6 +498,8 @@ static void set_thread_info( struct thread *thread,
}
if
(
req
->
mask
&
SET_THREAD_INFO_TOKEN
)
security_set_thread_token
(
thread
,
req
->
token
);
if
(
req
->
mask
&
SET_THREAD_INFO_ENTRYPOINT
)
thread
->
entry_point
=
req
->
entry_point
;
}
/* stop a thread (at the Unix level) */
...
...
@@ -1284,6 +1287,7 @@ DECL_HANDLER(init_thread)
current
->
unix_pid
=
req
->
unix_pid
;
current
->
unix_tid
=
req
->
unix_tid
;
current
->
teb
=
req
->
teb
;
current
->
entry_point
=
req
->
entry
;
if
(
!
process
->
peb
)
/* first thread, initialize the process too */
{
...
...
server/thread.h
View file @
6ab494ce
...
...
@@ -79,6 +79,7 @@ struct thread
context_t
*
context
;
/* current context if in an exception handler */
context_t
*
suspend_context
;
/* current context if suspended */
client_ptr_t
teb
;
/* TEB address (in client address space) */
client_ptr_t
entry_point
;
/* entry point (in client address space) */
affinity_t
affinity
;
/* affinity mask */
int
priority
;
/* priority level */
int
suspend
;
/* suspend count */
...
...
server/trace.c
View file @
6ab494ce
...
...
@@ -1323,6 +1323,7 @@ static void dump_set_thread_info_request( const struct set_thread_info_request *
fprintf
(
stderr
,
", mask=%d"
,
req
->
mask
);
fprintf
(
stderr
,
", priority=%d"
,
req
->
priority
);
dump_uint64
(
", affinity="
,
&
req
->
affinity
);
dump_uint64
(
", entry_point="
,
&
req
->
entry_point
);
fprintf
(
stderr
,
", token=%04x"
,
req
->
token
);
}
...
...
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