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
837b39b2
Commit
837b39b2
authored
May 05, 2015
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Add read and write fd member functions.
Also rename no_flush() to no_fd_flush() for consistency.
parent
fc4a94c0
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
75 additions
and
24 deletions
+75
-24
change.c
server/change.c
+3
-1
console.c
server/console.c
+3
-1
device.c
server/device.c
+3
-1
fd.c
server/fd.c
+22
-6
file.c
server/file.c
+3
-1
file.h
server/file.h
+10
-3
mailslot.c
server/mailslot.c
+9
-3
mapping.c
server/mapping.c
+3
-1
named_pipe.c
server/named_pipe.c
+9
-3
serial.c
server/serial.c
+3
-1
sock.c
server/sock.c
+7
-3
No files found.
server/change.c
View file @
837b39b2
...
...
@@ -177,8 +177,10 @@ static const struct fd_ops dir_fd_ops =
{
dir_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
dir_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/console.c
View file @
837b39b2
...
...
@@ -172,8 +172,10 @@ static const struct fd_ops console_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
console_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/device.c
View file @
837b39b2
...
...
@@ -155,8 +155,10 @@ static const struct fd_ops device_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
device_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
device_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/fd.c
View file @
837b39b2
...
...
@@ -2111,12 +2111,6 @@ void default_fd_cancel_async( struct fd *fd, struct process *process, struct thr
set_error
(
STATUS_NOT_FOUND
);
}
/* default flush() routine */
void
no_flush
(
struct
fd
*
fd
,
struct
event
**
event
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
}
static
inline
int
is_valid_mounted_device
(
struct
stat
*
st
)
{
#if defined(linux) || defined(__sun__)
...
...
@@ -2164,6 +2158,28 @@ static void unmount_device( struct fd *device_fd )
release_object
(
device
);
}
/* default read() routine */
obj_handle_t
no_fd_read
(
struct
fd
*
fd
,
const
async_data_t
*
async
,
int
blocking
,
file_pos_t
pos
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
return
0
;
}
/* default write() routine */
obj_handle_t
no_fd_write
(
struct
fd
*
fd
,
const
async_data_t
*
async
,
int
blocking
,
file_pos_t
pos
,
data_size_t
*
written
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
return
0
;
}
/* default flush() routine */
void
no_fd_flush
(
struct
fd
*
fd
,
struct
event
**
event
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
}
/* default ioctl() routine */
obj_handle_t
no_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async
,
int
blocking
)
{
set_error
(
STATUS_OBJECT_TYPE_MISMATCH
);
...
...
server/file.c
View file @
837b39b2
...
...
@@ -97,8 +97,10 @@ static const struct fd_ops file_fd_ops =
{
file_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
file_flush
,
/* flush */
file_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
file_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/file.h
View file @
837b39b2
...
...
@@ -37,10 +37,14 @@ struct fd_ops
int
(
*
get_poll_events
)(
struct
fd
*
);
/* a poll() event occurred */
void
(
*
poll_event
)(
struct
fd
*
,
int
event
);
/* flush the object buffers */
void
(
*
flush
)(
struct
fd
*
,
struct
event
**
);
/* get file information */
enum
server_fd_type
(
*
get_fd_type
)(
struct
fd
*
fd
);
/* perform a read on the file */
obj_handle_t
(
*
read
)(
struct
fd
*
,
const
async_data_t
*
,
int
,
file_pos_t
);
/* perform a write on the file */
obj_handle_t
(
*
write
)(
struct
fd
*
,
const
async_data_t
*
,
int
,
file_pos_t
,
data_size_t
*
);
/* flush the object buffers */
void
(
*
flush
)(
struct
fd
*
,
struct
event
**
);
/* perform an ioctl on the file */
obj_handle_t
(
*
ioctl
)(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async
,
int
blocking
);
/* queue an async operation */
...
...
@@ -85,13 +89,16 @@ extern void default_poll_event( struct fd *fd, int event );
extern
struct
async
*
fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
);
extern
void
fd_async_wake_up
(
struct
fd
*
fd
,
int
type
,
unsigned
int
status
);
extern
void
fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
obj_handle_t
no_fd_read
(
struct
fd
*
fd
,
const
async_data_t
*
async
,
int
blocking
,
file_pos_t
pos
);
extern
obj_handle_t
no_fd_write
(
struct
fd
*
fd
,
const
async_data_t
*
async
,
int
blocking
,
file_pos_t
pos
,
data_size_t
*
written
);
extern
void
no_fd_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
extern
obj_handle_t
no_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async
,
int
blocking
);
extern
obj_handle_t
default_fd_ioctl
(
struct
fd
*
fd
,
ioctl_code_t
code
,
const
async_data_t
*
async
,
int
blocking
);
extern
void
no_fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
default_fd_queue_async
(
struct
fd
*
fd
,
const
async_data_t
*
data
,
int
type
,
int
count
);
extern
void
default_fd_reselect_async
(
struct
fd
*
fd
,
struct
async_queue
*
queue
);
extern
void
default_fd_cancel_async
(
struct
fd
*
fd
,
struct
process
*
process
,
struct
thread
*
thread
,
client_ptr_t
iosb
);
extern
void
no_flush
(
struct
fd
*
fd
,
struct
event
**
event
);
extern
void
main_loop
(
void
);
extern
void
remove_process_locks
(
struct
process
*
process
);
...
...
server/mailslot.c
View file @
837b39b2
...
...
@@ -97,8 +97,10 @@ static const struct fd_ops mailslot_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
mailslot_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
mailslot_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
@@ -147,8 +149,10 @@ static const struct fd_ops mail_writer_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
mail_writer_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
@@ -197,8 +201,10 @@ static const struct fd_ops mailslot_device_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
mailslot_device_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/mapping.c
View file @
837b39b2
...
...
@@ -100,8 +100,10 @@ static const struct fd_ops mapping_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
mapping_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
no_fd_ioctl
,
/* ioctl */
no_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/named_pipe.c
View file @
837b39b2
...
...
@@ -170,8 +170,10 @@ static const struct fd_ops pipe_server_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
pipe_server_flush
,
/* flush */
pipe_server_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
pipe_server_flush
,
/* flush */
pipe_server_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
@@ -210,8 +212,10 @@ static const struct fd_ops pipe_client_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
pipe_client_flush
,
/* flush */
pipe_client_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
pipe_client_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
@@ -254,8 +258,10 @@ static const struct fd_ops named_pipe_device_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
named_pipe_device_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
named_pipe_device_ioctl
,
/* ioctl */
default_fd_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/serial.c
View file @
837b39b2
...
...
@@ -109,8 +109,10 @@ static const struct fd_ops serial_fd_ops =
{
default_fd_get_poll_events
,
/* get_poll_events */
default_poll_event
,
/* poll_event */
no_flush
,
/* flush */
serial_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
default_fd_ioctl
,
/* ioctl */
serial_queue_async
,
/* queue_async */
default_fd_reselect_async
,
/* reselect_async */
...
...
server/sock.c
View file @
837b39b2
...
...
@@ -163,8 +163,10 @@ static const struct fd_ops sock_fd_ops =
{
sock_get_poll_events
,
/* get_poll_events */
sock_poll_event
,
/* poll_event */
no_flush
,
/* flush */
sock_get_fd_type
,
/* get_fd_type */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
sock_ioctl
,
/* ioctl */
sock_queue_async
,
/* queue_async */
sock_reselect_async
,
/* reselect_async */
...
...
@@ -1026,9 +1028,11 @@ static const struct fd_ops ifchange_fd_ops =
{
ifchange_get_poll_events
,
/* get_poll_events */
ifchange_poll_event
,
/* poll_event */
NULL
,
/* flush */
NULL
,
/* get_fd_type */
NULL
,
/* ioctl */
no_fd_read
,
/* read */
no_fd_write
,
/* write */
no_fd_flush
,
/* flush */
no_fd_ioctl
,
/* ioctl */
NULL
,
/* queue_async */
ifchange_reselect_async
,
/* reselect_async */
NULL
/* cancel_async */
...
...
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