Commit 3f057594 authored by Alexandre Julliard's avatar Alexandre Julliard

server: Don't bother with default entry points for objects that don't even return an fd.

parent 72ff2bf3
......@@ -518,11 +518,11 @@ static const struct fd_ops inotify_fd_ops =
{
inotify_get_poll_events, /* get_poll_events */
inotify_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
default_fd_queue_async, /* queue_async */
default_fd_reselect_async, /* reselect_async */
default_fd_cancel_async, /* cancel_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
NULL, /* cancel_async */
};
static int inotify_get_poll_events( struct fd *fd )
......
......@@ -1779,24 +1779,6 @@ void no_flush( struct fd *fd, struct event **event )
set_error( STATUS_OBJECT_TYPE_MISMATCH );
}
/* default get_fd_type() routine */
enum server_fd_type no_get_fd_type( struct fd *fd )
{
return FD_TYPE_INVALID;
}
/* default queue_async() routine */
void no_queue_async( struct fd *fd, const async_data_t *data, int type, int count)
{
set_error( STATUS_OBJECT_TYPE_MISMATCH );
}
/* default cancel_async() routine */
void no_cancel_async( struct fd *fd )
{
set_error( STATUS_OBJECT_TYPE_MISMATCH );
}
static inline int is_valid_mounted_device( struct stat *st )
{
#if defined(linux) || defined(__sun__)
......
......@@ -78,9 +78,6 @@ extern void default_fd_queue_async( struct fd *fd, const async_data_t *data, int
extern void default_fd_reselect_async( struct fd *fd, struct async_queue *queue );
extern void default_fd_cancel_async( struct fd *fd );
extern void no_flush( struct fd *fd, struct event **event );
extern enum server_fd_type no_get_fd_type( struct fd *fd );
extern void no_queue_async( struct fd *fd, const async_data_t *data, int type, int count);
extern void no_cancel_async( struct fd *fd );
extern void main_loop(void);
extern void remove_process_locks( struct process *process );
......
......@@ -84,11 +84,11 @@ static const struct fd_ops process_fd_ops =
{
NULL, /* get_poll_events */
process_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
no_queue_async, /* queue_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
no_cancel_async /* cancel async */
NULL /* cancel async */
};
/* process startup info */
......
......@@ -166,11 +166,11 @@ static const struct fd_ops msg_queue_fd_ops =
{
NULL, /* get_poll_events */
msg_queue_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
no_queue_async, /* queue_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
no_cancel_async /* cancel async */
NULL /* cancel async */
};
......
......@@ -106,11 +106,11 @@ static const struct fd_ops master_socket_fd_ops =
{
NULL, /* get_poll_events */
master_socket_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
no_queue_async, /* queue_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
no_cancel_async /* cancel_async */
NULL /* cancel_async */
};
......
......@@ -82,11 +82,11 @@ static const struct fd_ops handler_fd_ops =
{
NULL, /* get_poll_events */
handler_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
no_queue_async, /* queue_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
no_cancel_async /* cancel_async */
NULL /* cancel_async */
};
static struct handler *handler_sighup;
......
......@@ -129,11 +129,11 @@ static const struct fd_ops thread_fd_ops =
{
NULL, /* get_poll_events */
thread_poll_event, /* poll_event */
no_flush, /* flush */
no_get_fd_type, /* get_fd_type */
no_queue_async, /* queue_async */
NULL, /* flush */
NULL, /* get_fd_type */
NULL, /* queue_async */
NULL, /* reselect_async */
no_cancel_async /* cancel_async */
NULL /* cancel_async */
};
static struct list thread_list = LIST_INIT(thread_list);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment