Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bb82cbb9
Commit
bb82cbb9
authored
Jul 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert the shared mapping list to a standard list.
parent
22fd30c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
mapping.c
server/mapping.c
+5
-13
No files found.
server/mapping.c
View file @
bb82cbb9
...
...
@@ -45,8 +45,7 @@ struct mapping
void
*
base
;
/* default base addr (for PE image mapping) */
struct
file
*
shared_file
;
/* temp file for shared PE mapping */
int
shared_size
;
/* shared mapping total size */
struct
mapping
*
shared_next
;
/* next in shared PE mapping list */
struct
mapping
*
shared_prev
;
/* prev in shared PE mapping list */
struct
list
shared_entry
;
/* entry in global shared PE mappings list */
};
static
void
mapping_dump
(
struct
object
*
obj
,
int
verbose
);
...
...
@@ -67,7 +66,7 @@ static const struct object_ops mapping_ops =
mapping_destroy
/* destroy */
};
static
struct
mapping
*
shared_first
;
static
struct
list
shared_list
=
LIST_INIT
(
shared_list
)
;
#ifdef __i386__
...
...
@@ -111,7 +110,7 @@ static struct file *get_shared_file( struct mapping *mapping )
{
struct
mapping
*
ptr
;
for
(
ptr
=
shared_first
;
ptr
;
ptr
=
ptr
->
shared_next
)
LIST_FOR_EACH_ENTRY
(
ptr
,
&
shared_list
,
struct
mapping
,
shared_entry
)
if
(
is_same_file
(
ptr
->
file
,
mapping
->
file
))
return
(
struct
file
*
)
grab_object
(
ptr
->
shared_file
);
return
NULL
;
...
...
@@ -223,12 +222,7 @@ static int get_image_params( struct mapping *mapping )
if
(
!
build_shared_mapping
(
mapping
,
unix_fd
,
sec
,
nt
.
FileHeader
.
NumberOfSections
))
goto
error
;
if
(
mapping
->
shared_file
)
/* link it in the list */
{
if
((
mapping
->
shared_next
=
shared_first
))
shared_first
->
shared_prev
=
mapping
;
mapping
->
shared_prev
=
NULL
;
shared_first
=
mapping
;
}
if
(
mapping
->
shared_file
)
list_add_head
(
&
shared_list
,
&
mapping
->
shared_entry
);
mapping
->
size
=
ROUND_SIZE
(
nt
.
OptionalHeader
.
SizeOfImage
);
mapping
->
base
=
(
void
*
)
nt
.
OptionalHeader
.
ImageBase
;
...
...
@@ -351,9 +345,7 @@ static void mapping_destroy( struct object *obj )
if
(
mapping
->
shared_file
)
{
release_object
(
mapping
->
shared_file
);
if
(
mapping
->
shared_next
)
mapping
->
shared_next
->
shared_prev
=
mapping
->
shared_prev
;
if
(
mapping
->
shared_prev
)
mapping
->
shared_prev
->
shared_next
=
mapping
->
shared_next
;
else
shared_first
=
mapping
->
shared_next
;
list_remove
(
&
mapping
->
shared_entry
);
}
}
...
...
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