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
9b57a950
Commit
9b57a950
authored
Jun 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid accessing the htask16 TEB field from ntdll.
parent
73f67181
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
task.c
dlls/kernel/task.c
+5
-4
thread.c
dlls/ntdll/thread.c
+0
-1
No files found.
dlls/kernel/task.c
View file @
9b57a950
...
...
@@ -79,7 +79,7 @@ THHOOK *pThhook = &DefaultThhook;
static
UINT16
nTaskCount
=
0
;
static
HTASK16
initial_task
;
static
HTASK16
initial_task
,
main_task
;
/***********************************************************************
* TASK_InstallTHHook
...
...
@@ -419,11 +419,10 @@ void TASK_CreateMainTask(void)
pTask
->
hPrevInstance
=
0
;
pTask
->
teb
=
NtCurrentTeb
();
NtCurrentTeb
()
->
htask16
=
pTask
->
hSelf
;
/* Add the task to the linked list */
/* (no need to get the win16 lock, we are the only thread at this point) */
TASK_LinkTask
(
pTask
->
hSelf
);
main_task
=
pTask
->
hSelf
;
}
...
...
@@ -1177,7 +1176,9 @@ void WINAPI GetTaskQueueES16(void)
*/
HTASK16
WINAPI
GetCurrentTask
(
void
)
{
return
NtCurrentTeb
()
->
htask16
;
HTASK16
ret
=
NtCurrentTeb
()
->
htask16
;
if
(
!
ret
)
ret
=
main_task
;
return
ret
;
}
/***********************************************************************
...
...
dlls/ntdll/thread.c
View file @
9b57a950
...
...
@@ -266,7 +266,6 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
teb
->
reply_fd
=
-
1
;
teb
->
wait_fd
[
0
]
=
-
1
;
teb
->
wait_fd
[
1
]
=
-
1
;
teb
->
htask16
=
NtCurrentTeb
()
->
htask16
;
info
->
pthread_info
.
teb_base
=
teb
;
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
info
->
pthread_info
.
teb_base
,
0
,
&
size
,
...
...
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