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
4ced7ef4
Commit
4ced7ef4
authored
Aug 14, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the "new" LDT set call on Linux.
parent
124eaf80
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
ldt.c
library/ldt.c
+3
-1
selector.c
memory/selector.c
+3
-4
No files found.
library/ldt.c
View file @
4ced7ef4
...
...
@@ -48,6 +48,7 @@ struct modify_ldt_s
unsigned
int
read_exec_only
:
1
;
unsigned
int
limit_in_pages
:
1
;
unsigned
int
seg_not_present
:
1
;
unsigned
int
useable
:
1
;
};
static
inline
int
modify_ldt
(
int
func
,
struct
modify_ldt_s
*
ptr
,
...
...
@@ -140,8 +141,9 @@ int wine_ldt_set_entry( unsigned short sel, const LDT_ENTRY *entry )
ldt_info
.
read_exec_only
=
!
(
entry
->
HighWord
.
Bits
.
Type
&
2
);
ldt_info
.
limit_in_pages
=
entry
->
HighWord
.
Bits
.
Granularity
;
ldt_info
.
seg_not_present
=
!
entry
->
HighWord
.
Bits
.
Pres
;
ldt_info
.
useable
=
entry
->
HighWord
.
Bits
.
Sys
;
if
((
ret
=
modify_ldt
(
1
,
&
ldt_info
,
sizeof
(
ldt_info
)))
<
0
)
if
((
ret
=
modify_ldt
(
0x1
1
,
&
ldt_info
,
sizeof
(
ldt_info
)))
<
0
)
perror
(
"modify_ldt"
);
}
#endif
/* linux */
...
...
memory/selector.c
View file @
4ced7ef4
...
...
@@ -119,12 +119,12 @@ WORD WINAPI FreeSelector16( WORD sel )
#ifdef __i386__
/* Check if we are freeing current %fs or %gs selector */
if
(
!
((
wine_get_fs
()
^
sel
)
&
~
7
))
if
(
!
((
wine_get_fs
()
^
sel
)
&
~
3
))
{
WARN
(
"Freeing %%fs selector (%04x), not good.
\n
"
,
wine_get_fs
()
);
wine_set_fs
(
0
);
}
if
(
!
((
wine_get_gs
()
^
sel
)
&
~
7
))
wine_set_gs
(
0
);
if
(
!
((
wine_get_gs
()
^
sel
)
&
~
3
))
wine_set_gs
(
0
);
#endif
/* __i386__ */
wine_ldt_set_entry
(
sel
,
&
null_entry
);
...
...
@@ -161,8 +161,7 @@ static void SELECTOR_SetEntries( WORD sel, const void *base, DWORD size, unsigne
WORD
i
,
count
;
wine_ldt_set_base
(
&
entry
,
base
);
/* Make sure base and limit are not 0 together if the size is not 0 */
wine_ldt_set_limit
(
&
entry
,
(
!
base
&&
size
==
1
)
?
1
:
size
-
1
);
wine_ldt_set_limit
(
&
entry
,
size
-
1
);
wine_ldt_set_flags
(
&
entry
,
flags
);
count
=
(
size
+
0xffff
)
/
0x10000
;
for
(
i
=
0
;
i
<
count
;
i
++
)
...
...
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