Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
4ced7ef4
Commit
4ced7ef4
authored
22 years ago
by
Alexandre Julliard
Browse files
Options
Downloads
Patches
Plain Diff
Use the "new" LDT set call on Linux.
parent
124eaf80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
library/ldt.c
+3
-1
3 additions, 1 deletion
library/ldt.c
memory/selector.c
+3
-4
3 additions, 4 deletions
memory/selector.c
with
6 additions
and
5 deletions
library/ldt.c
+
3
−
1
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 */
...
...
This diff is collapsed.
Click to expand it.
memory/selector.c
+
3
−
4
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
++
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment