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
3764da68
Commit
3764da68
authored
Dec 05, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Move handle allocation out of open_object_dir.
parent
1f872df2
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
18 deletions
+55
-18
directory.c
server/directory.c
+11
-8
event.c
server/event.c
+7
-1
mapping.c
server/mapping.c
+7
-1
mutex.c
server/mutex.c
+7
-1
object.h
server/object.h
+2
-3
semaphore.c
server/semaphore.c
+7
-1
symlink.c
server/symlink.c
+7
-2
timer.c
server/timer.c
+7
-1
No files found.
server/directory.c
View file @
3764da68
...
...
@@ -260,11 +260,9 @@ void *create_named_object_dir( struct directory *root, const struct unicode_str
}
/* open a new handle to an existing object */
obj_handle_t
open_object_dir
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
object_ops
*
ops
,
unsigned
int
access
)
void
*
open_object_dir
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
object_ops
*
ops
)
{
obj_handle_t
handle
=
0
;
struct
unicode_str
name_left
;
struct
object
*
obj
;
...
...
@@ -275,11 +273,11 @@ obj_handle_t open_object_dir( struct directory *root, const struct unicode_str *
else
if
(
ops
&&
obj
->
ops
!=
ops
)
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
else
handle
=
alloc_handle
(
current
->
process
,
obj
,
access
,
attr
&
OBJ_INHERIT
)
;
return
obj
;
release_object
(
obj
);
}
return
handle
;
return
NULL
;
}
...
...
@@ -367,13 +365,18 @@ DECL_HANDLER(create_directory)
DECL_HANDLER
(
open_directory
)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
directory
*
dir
,
*
root
=
NULL
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
directory_ops
,
req
->
access
);
if
((
dir
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
directory_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
dir
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
dir
);
}
if
(
root
)
release_object
(
root
);
}
server/event.c
View file @
3764da68
...
...
@@ -172,12 +172,18 @@ DECL_HANDLER(open_event)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
event
*
event
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
event_ops
,
req
->
access
);
if
((
event
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
event_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
event
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
event
);
}
if
(
root
)
release_object
(
root
);
}
...
...
server/mapping.c
View file @
3764da68
...
...
@@ -402,12 +402,18 @@ DECL_HANDLER(open_mapping)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
mapping
*
mapping
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
mapping_ops
,
req
->
access
);
if
((
mapping
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
mapping_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
mapping
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
mapping
);
}
if
(
root
)
release_object
(
root
);
}
...
...
server/mutex.c
View file @
3764da68
...
...
@@ -198,12 +198,18 @@ DECL_HANDLER(open_mutex)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
mutex
*
mutex
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
mutex_ops
,
req
->
access
);
if
((
mutex
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
mutex_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
mutex
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
mutex
);
}
if
(
root
)
release_object
(
root
);
}
...
...
server/object.h
View file @
3764da68
...
...
@@ -187,9 +187,8 @@ extern struct object *find_object_dir( struct directory *root, const struct unic
unsigned
int
attr
,
struct
unicode_str
*
name_left
);
extern
void
*
create_named_object_dir
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
object_ops
*
ops
);
extern
obj_handle_t
open_object_dir
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
object_ops
*
ops
,
unsigned
int
access
);
extern
void
*
open_object_dir
(
struct
directory
*
root
,
const
struct
unicode_str
*
name
,
unsigned
int
attr
,
const
struct
object_ops
*
ops
);
extern
void
init_directories
(
void
);
extern
void
close_directories
(
void
);
...
...
server/semaphore.c
View file @
3764da68
...
...
@@ -172,12 +172,18 @@ DECL_HANDLER(open_semaphore)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
semaphore
*
sem
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
semaphore_ops
,
req
->
access
);
if
((
sem
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
semaphore_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
sem
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
sem
);
}
if
(
root
)
release_object
(
root
);
}
...
...
server/symlink.c
View file @
3764da68
...
...
@@ -168,13 +168,18 @@ DECL_HANDLER(open_symlink)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
symlink
*
symlink
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
|
OBJ_OPENLINK
,
&
symlink_ops
,
req
->
access
);
if
((
symlink
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
|
OBJ_OPENLINK
,
&
symlink_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
symlink
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
symlink
);
}
if
(
root
)
release_object
(
root
);
}
...
...
server/timer.c
View file @
3764da68
...
...
@@ -231,12 +231,18 @@ DECL_HANDLER(open_timer)
{
struct
unicode_str
name
;
struct
directory
*
root
=
NULL
;
struct
timer
*
timer
;
get_req_unicode_str
(
&
name
);
if
(
req
->
rootdir
&&
!
(
root
=
get_directory_obj
(
current
->
process
,
req
->
rootdir
,
0
)))
return
;
reply
->
handle
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
timer_ops
,
req
->
access
);
if
((
timer
=
open_object_dir
(
root
,
&
name
,
req
->
attributes
,
&
timer_ops
)))
{
reply
->
handle
=
alloc_handle
(
current
->
process
,
&
timer
->
obj
,
req
->
access
,
req
->
attributes
&
OBJ_INHERIT
);
release_object
(
timer
);
}
if
(
root
)
release_object
(
root
);
}
...
...
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