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
f7f9bf98
Commit
f7f9bf98
authored
Oct 31, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Introduce is_fd_overlapped() helper.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
36693cfb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
8 deletions
+10
-8
fd.c
server/fd.c
+8
-2
file.c
server/file.c
+1
-6
file.h
server/file.h
+1
-0
No files found.
server/fd.c
View file @
f7f9bf98
...
...
@@ -1930,6 +1930,12 @@ unsigned int get_fd_options( struct fd *fd )
return
fd
->
options
;
}
/* check if fd is in overlapped mode */
int
is_fd_overlapped
(
struct
fd
*
fd
)
{
return
!
(
fd
->
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
));
}
/* retrieve the unix fd for an object */
int
get_unix_fd
(
struct
fd
*
fd
)
{
...
...
@@ -2611,7 +2617,7 @@ DECL_HANDLER(set_completion_info)
if
(
fd
)
{
if
(
!
(
fd
->
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
)
)
&&
!
fd
->
completion
)
if
(
is_fd_overlapped
(
fd
)
&&
!
fd
->
completion
)
{
fd
->
completion
=
get_completion_obj
(
current
->
process
,
req
->
chandle
,
IO_COMPLETION_MODIFY_STATE
);
fd
->
comp_key
=
req
->
ckey
;
...
...
@@ -2639,7 +2645,7 @@ DECL_HANDLER(set_fd_completion_mode)
struct
fd
*
fd
=
get_handle_fd_obj
(
current
->
process
,
req
->
handle
,
0
);
if
(
fd
)
{
if
(
!
(
fd
->
options
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
)
))
if
(
is_fd_overlapped
(
fd
))
{
/* removing COMPLETION_SKIP_ON_SUCCESS is not allowed */
fd
->
comp_flags
|=
req
->
flags
&
(
FILE_SKIP_COMPLETION_PORT_ON_SUCCESS
...
...
server/file.c
View file @
f7f9bf98
...
...
@@ -114,11 +114,6 @@ static const struct fd_ops file_fd_ops =
default_fd_reselect_async
/* reselect_async */
};
static
inline
int
is_overlapped
(
const
struct
file
*
file
)
{
return
!
(
get_fd_options
(
file
->
fd
)
&
(
FILE_SYNCHRONOUS_IO_ALERT
|
FILE_SYNCHRONOUS_IO_NONALERT
));
}
/* create a file from a file descriptor */
/* if the function fails the fd is closed */
struct
file
*
create_file_for_fd
(
int
fd
,
unsigned
int
access
,
unsigned
int
sharing
)
...
...
@@ -761,7 +756,7 @@ DECL_HANDLER(lock_file)
if
((
file
=
get_file_obj
(
current
->
process
,
req
->
handle
,
0
)))
{
reply
->
handle
=
lock_fd
(
file
->
fd
,
req
->
offset
,
req
->
count
,
req
->
shared
,
req
->
wait
);
reply
->
overlapped
=
is_
overlapped
(
file
);
reply
->
overlapped
=
is_
fd_overlapped
(
file
->
fd
);
release_object
(
file
);
}
}
...
...
server/file.h
View file @
f7f9bf98
...
...
@@ -88,6 +88,7 @@ extern struct fd *get_fd_object_for_mapping( struct fd *fd, unsigned int access,
extern
void
*
get_fd_user
(
struct
fd
*
fd
);
extern
void
set_fd_user
(
struct
fd
*
fd
,
const
struct
fd_ops
*
ops
,
struct
object
*
user
);
extern
unsigned
int
get_fd_options
(
struct
fd
*
fd
);
extern
int
is_fd_overlapped
(
struct
fd
*
fd
);
extern
int
get_unix_fd
(
struct
fd
*
fd
);
extern
int
is_same_file_fd
(
struct
fd
*
fd1
,
struct
fd
*
fd2
);
extern
int
is_fd_removable
(
struct
fd
*
fd
);
...
...
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