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
90e90e3b
Commit
90e90e3b
authored
Jan 08, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Make the page_size variable global.
parent
e2761ab0
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
22 additions
and
21 deletions
+22
-21
cdrom.c
dlls/ntdll/cdrom.c
+3
-3
directory.c
dlls/ntdll/directory.c
+0
-1
file.c
dlls/ntdll/file.c
+0
-2
heap.c
dlls/ntdll/heap.c
+2
-1
loader.c
dlls/ntdll/loader.c
+1
-1
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+6
-0
signal_arm.c
dlls/ntdll/signal_arm.c
+1
-1
signal_powerpc.c
dlls/ntdll/signal_powerpc.c
+1
-1
signal_sparc.c
dlls/ntdll/signal_sparc.c
+1
-1
virtual.c
dlls/ntdll/virtual.c
+7
-10
No files found.
dlls/ntdll/cdrom.c
View file @
90e90e3b
...
...
@@ -1980,9 +1980,9 @@ static NTSTATUS CDROM_ScsiGetCaps(int fd, PIO_SCSI_CAPABILITIES caps)
#ifdef SG_SCATTER_SZ
caps
->
Length
=
sizeof
(
*
caps
);
caps
->
MaximumTransferLength
=
SG_SCATTER_SZ
;
/* FIXME */
caps
->
MaximumPhysicalPages
=
SG_SCATTER_SZ
/
getpagesize
()
;
caps
->
MaximumPhysicalPages
=
SG_SCATTER_SZ
/
page_size
;
caps
->
SupportedAsynchronousEvents
=
TRUE
;
caps
->
AlignmentMask
=
getpagesize
()
;
caps
->
AlignmentMask
=
page_size
;
caps
->
TaggedQueuing
=
FALSE
;
/* we could check that it works and answer TRUE */
caps
->
AdapterScansDown
=
FALSE
;
/* FIXME ? */
caps
->
AdapterUsesPio
=
FALSE
;
/* FIXME ? */
...
...
@@ -1997,7 +1997,7 @@ static NTSTATUS CDROM_ScsiGetCaps(int fd, PIO_SCSI_CAPABILITIES caps)
if
(
io
!=
0
)
return
CDROM_GetStatusCode
(
io
);
caps
->
Length
=
sizeof
(
*
caps
);
caps
->
MaximumTransferLength
=
bytesr
<
bytesw
?
bytesr
:
bytesw
;
caps
->
MaximumPhysicalPages
=
caps
->
MaximumTransferLength
/
getpagesize
()
;
caps
->
MaximumPhysicalPages
=
caps
->
MaximumTransferLength
/
page_size
;
caps
->
SupportedAsynchronousEvents
=
TRUE
;
caps
->
AlignmentMask
=
align
-
1
;
caps
->
TaggedQueuing
=
FALSE
;
/* we could check that it works and answer TRUE */
...
...
dlls/ntdll/directory.c
View file @
90e90e3b
...
...
@@ -1384,7 +1384,6 @@ static KERNEL_DIRENT *start_vfat_ioctl( int fd )
if
(
!
de
)
{
const
size_t
page_size
=
getpagesize
();
SIZE_T
size
=
2
*
sizeof
(
*
de
)
+
page_size
;
void
*
addr
=
NULL
;
...
...
dlls/ntdll/file.c
View file @
90e90e3b
...
...
@@ -765,7 +765,6 @@ NTSTATUS WINAPI NtReadFileScatter( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
PIO_STATUS_BLOCK
io_status
,
FILE_SEGMENT_ELEMENT
*
segments
,
ULONG
length
,
PLARGE_INTEGER
offset
,
PULONG
key
)
{
size_t
page_size
=
getpagesize
();
int
result
,
unix_handle
,
needs_close
;
unsigned
int
options
;
NTSTATUS
status
;
...
...
@@ -1097,7 +1096,6 @@ NTSTATUS WINAPI NtWriteFileGather( HANDLE file, HANDLE event, PIO_APC_ROUTINE ap
PIO_STATUS_BLOCK
io_status
,
FILE_SEGMENT_ELEMENT
*
segments
,
ULONG
length
,
PLARGE_INTEGER
offset
,
PULONG
key
)
{
size_t
page_size
=
getpagesize
();
int
result
,
unix_handle
,
needs_close
;
unsigned
int
options
;
NTSTATUS
status
;
...
...
dlls/ntdll/heap.c
View file @
90e90e3b
...
...
@@ -40,6 +40,7 @@
#include "windef.h"
#include "winnt.h"
#include "winternl.h"
#include "ntdll_misc.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/server.h"
...
...
@@ -806,7 +807,7 @@ static BOOL validate_large_arena( HEAP *heap, const ARENA_LARGE *arena, BOOL qui
{
DWORD
flags
=
heap
->
flags
;
if
((
ULONG_PTR
)
arena
%
getpagesize
()
)
if
((
ULONG_PTR
)
arena
%
page_size
)
{
if
(
quiet
==
NOISY
)
{
...
...
dlls/ntdll/loader.c
View file @
90e90e3b
...
...
@@ -773,7 +773,7 @@ static BOOL is_dll_native_subsystem( HMODULE module, const IMAGE_NT_HEADERS *nt,
WCHAR
buffer
[
16
];
if
(
nt
->
OptionalHeader
.
Subsystem
!=
IMAGE_SUBSYSTEM_NATIVE
)
return
FALSE
;
if
(
nt
->
OptionalHeader
.
SectionAlignment
<
getpagesize
()
)
return
TRUE
;
if
(
nt
->
OptionalHeader
.
SectionAlignment
<
page_size
)
return
TRUE
;
if
((
imports
=
RtlImageDirectoryEntryToData
(
module
,
TRUE
,
IMAGE_DIRECTORY_ENTRY_IMPORT
,
&
size
)))
...
...
dlls/ntdll/ntdll_misc.h
View file @
90e90e3b
...
...
@@ -33,6 +33,12 @@
#define MAX_DOS_DRIVES 26
#if defined(__i386__) || defined(__x86_64__)
static
const
UINT_PTR
page_size
=
0x1000
;
#else
extern
UINT_PTR
page_size
DECLSPEC_HIDDEN
;
#endif
struct
drive_info
{
dev_t
dev
;
...
...
dlls/ntdll/signal_arm.c
View file @
90e90e3b
...
...
@@ -798,7 +798,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
if
(
!
sigstack_zero_bits
)
{
size_t
min_size
=
getpagesize
();
/* this is just for the TEB, we don't use a signal stack yet */
size_t
min_size
=
page_size
;
/* find the first power of two not smaller than min_size */
while
((
1u
<<
sigstack_zero_bits
)
<
min_size
)
sigstack_zero_bits
++
;
assert
(
sizeof
(
TEB
)
<=
min_size
);
...
...
dlls/ntdll/signal_powerpc.c
View file @
90e90e3b
...
...
@@ -963,7 +963,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
if
(
!
sigstack_zero_bits
)
{
size_t
min_size
=
getpagesize
()
;
/* this is just for the TEB, we don't use a signal stack yet */
size_t
min_size
=
page_size
;
/* this is just for the TEB, we don't use a signal stack yet */
/* find the first power of two not smaller than min_size */
while
((
1u
<<
sigstack_zero_bits
)
<
min_size
)
sigstack_zero_bits
++
;
assert
(
sizeof
(
TEB
)
<=
min_size
);
...
...
dlls/ntdll/signal_sparc.c
View file @
90e90e3b
...
...
@@ -725,7 +725,7 @@ NTSTATUS signal_alloc_thread( TEB **teb )
if
(
!
sigstack_zero_bits
)
{
size_t
min_size
=
getpagesize
();
/* this is just for the TEB, we don't use a signal stack yet */
size_t
min_size
=
page_size
;
/* find the first power of two not smaller than min_size */
while
((
1u
<<
sigstack_zero_bits
)
<
min_size
)
sigstack_zero_bits
++
;
assert
(
sizeof
(
TEB
)
<=
min_size
);
...
...
dlls/ntdll/virtual.c
View file @
90e90e3b
...
...
@@ -112,26 +112,23 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug =
static
RTL_CRITICAL_SECTION
csVirtual
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
#ifdef __i386__
/* These are always the same on an i386, and it will be faster this way */
# define page_mask 0xfff
# define page_shift 12
# define page_size 0x1000
static
const
UINT
page_shift
=
12
;
static
const
UINT_PTR
page_mask
=
0xfff
;
/* Note: these are Windows limits, you cannot change them. */
static
void
*
address_space_limit
=
(
void
*
)
0xc0000000
;
/* top of the total available address space */
static
void
*
user_space_limit
=
(
void
*
)
0x7fff0000
;
/* top of the user address space */
static
void
*
working_set_limit
=
(
void
*
)
0x7fff0000
;
/* top of the current working set */
static
void
*
address_space_start
=
(
void
*
)
0x110000
;
/* keep DOS area clear */
#elif defined(__x86_64__)
# define page_mask 0xfff
# define page_shift 12
# define page_size 0x1000
static
const
UINT
page_shift
=
12
;
static
const
UINT_PTR
page_mask
=
0xfff
;
static
void
*
address_space_limit
=
(
void
*
)
0x7fffffff0000
;
static
void
*
user_space_limit
=
(
void
*
)
0x7fffffff0000
;
static
void
*
working_set_limit
=
(
void
*
)
0x7fffffff0000
;
static
void
*
address_space_start
=
(
void
*
)
0x10000
;
#else
UINT_PTR
page_size
=
0
;
static
UINT
page_shift
;
static
UINT_PTR
page_size
;
static
UINT_PTR
page_mask
;
static
void
*
address_space_limit
;
static
void
*
user_space_limit
;
...
...
@@ -1416,8 +1413,8 @@ void virtual_init(void)
size_t
size
;
struct
file_view
*
heap_view
;
#if
ndef page_mask
page_size
=
getpagesize
(
);
#if
!defined(__i386__) && !defined(__x86_64__)
page_size
=
sysconf
(
_SC_PAGESIZE
);
page_mask
=
page_size
-
1
;
/* Make sure we have a power of 2 */
assert
(
!
(
page_size
&
page_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