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
5aa70b3d
Commit
5aa70b3d
authored
May 18, 2007
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Setup the shared user data structure at 0x7ffe0000.
parent
bd3a08b3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
loader.c
dlls/ntdll/loader.c
+2
-0
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-1
thread.c
dlls/ntdll/thread.c
+15
-1
version.c
dlls/ntdll/version.c
+8
-0
No files found.
dlls/ntdll/loader.c
View file @
5aa70b3d
...
...
@@ -40,6 +40,7 @@
#include "wine/debug.h"
#include "wine/server.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
module
);
WINE_DECLARE_DEBUG_CHANNEL
(
relay
);
...
...
@@ -2307,6 +2308,7 @@ void __wine_init_windows_dir( const WCHAR *windir, const WCHAR *sysdir )
LPWSTR
buffer
,
p
;
RtlCreateUnicodeString
(
&
system_dir
,
sysdir
);
strcpyW
(
user_shared_data
->
NtSystemRoot
,
windir
);
/* prepend the system dir to the name of the already created modules */
mark
=
&
NtCurrentTeb
()
->
Peb
->
LdrData
->
InLoadOrderModuleList
;
...
...
dlls/ntdll/ntdll_misc.h
View file @
5aa70b3d
...
...
@@ -25,7 +25,6 @@
#include "windef.h"
#include "winnt.h"
#include "winternl.h"
#include "winioctl.h"
#include "wine/server.h"
#define MAX_NT_PATH_LENGTH 277
...
...
@@ -117,6 +116,7 @@ extern NTSTATUS DIR_get_unix_cwd( char **cwd );
extern
NTSTATUS
VIRTUAL_HandleFault
(
LPCVOID
addr
);
extern
void
VIRTUAL_SetForceExec
(
BOOL
enable
);
extern
void
VIRTUAL_UseLargeAddressSpace
(
void
);
extern
struct
_KUSER_SHARED_DATA
*
user_shared_data
;
/* code pages */
extern
int
ntdll_umbstowcs
(
DWORD
flags
,
const
char
*
src
,
int
srclen
,
WCHAR
*
dst
,
int
dstlen
);
...
...
dlls/ntdll/thread.c
View file @
5aa70b3d
...
...
@@ -40,11 +40,14 @@
#include "wine/pthread.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
#include "wine/exception.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
thread
);
WINE_DECLARE_DEBUG_CHANNEL
(
relay
);
struct
_KUSER_SHARED_DATA
*
user_shared_data
=
NULL
;
/* info passed to a starting thread */
struct
startup_info
{
...
...
@@ -225,6 +228,7 @@ HANDLE thread_init(void)
void
*
addr
;
SIZE_T
size
,
info_size
;
HANDLE
exe_file
=
0
;
LARGE_INTEGER
now
;
struct
ntdll_thread_data
*
thread_data
;
struct
ntdll_thread_regs
*
thread_regs
;
struct
wine_pthread_thread_info
thread_info
;
...
...
@@ -236,7 +240,8 @@ HANDLE thread_init(void)
addr
=
(
void
*
)
0x7ffe0000
;
size
=
0x10000
;
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
0
,
&
size
,
MEM_RESERVE
,
PAGE_READONLY
);
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
0
,
&
size
,
MEM_RESERVE
|
MEM_COMMIT
,
PAGE_READWRITE
);
user_shared_data
=
addr
;
/* allocate and initialize the PEB */
...
...
@@ -325,6 +330,15 @@ HANDLE thread_init(void)
/* initialize LDT locking */
wine_ldt_init_locking
(
ldt_lock
,
ldt_unlock
);
/* initialize time values in user_shared_data */
NtQuerySystemTime
(
&
now
);
user_shared_data
->
SystemTime
.
LowPart
=
now
.
LowPart
;
user_shared_data
->
SystemTime
.
High1Time
=
user_shared_data
->
SystemTime
.
High2Time
=
now
.
HighPart
;
user_shared_data
->
u
.
TickCountQuad
=
(
now
.
QuadPart
-
server_start_time
)
/
10000
;
user_shared_data
->
u
.
TickCount
.
High2Time
=
user_shared_data
->
u
.
TickCount
.
High1Time
;
user_shared_data
->
TickCountLowDeprecated
=
user_shared_data
->
u
.
TickCount
.
LowPart
;
user_shared_data
->
TickCountMultiplier
=
1
<<
24
;
return
exe_file
;
}
...
...
dlls/ntdll/version.c
View file @
5aa70b3d
...
...
@@ -34,6 +34,7 @@
#include "wine/unicode.h"
#include "wine/debug.h"
#include "ntdll_misc.h"
#include "ddk/wdm.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
ver
);
...
...
@@ -505,6 +506,13 @@ done:
NtCurrentTeb
()
->
Peb
->
OSBuildNumber
=
current_version
->
dwBuildNumber
;
NtCurrentTeb
()
->
Peb
->
OSPlatformId
=
current_version
->
dwPlatformId
;
user_shared_data
->
NtProductType
=
current_version
->
wProductType
;
user_shared_data
->
ProductTypeIsValid
=
TRUE
;
user_shared_data
->
MajorNtVersion
=
current_version
->
dwMajorVersion
;
user_shared_data
->
MinorNtVersion
=
current_version
->
dwMinorVersion
;
user_shared_data
->
MinorNtVersion
=
current_version
->
dwMinorVersion
;
user_shared_data
->
SuiteMask
=
current_version
->
wSuiteMask
;
TRACE
(
"got %d.%d plaform %d build %x name %s service pack %d.%d product %d
\n
"
,
current_version
->
dwMajorVersion
,
current_version
->
dwMinorVersion
,
current_version
->
dwPlatformId
,
current_version
->
dwBuildNumber
,
...
...
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