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

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 13 06:49:34 CDT 2007


Module: wine
Branch: master
Commit: 3f0575943e1cea48174e8b724c8353fb1450068d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3f0575943e1cea48174e8b724c8353fb1450068d

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Thu Apr 12 20:21:53 2007 +0200

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

---

 server/change.c  |   10 +++++-----
 server/fd.c      |   18 ------------------
 server/file.h    |    3 ---
 server/process.c |    8 ++++----
 server/queue.c   |    8 ++++----
 server/request.c |    8 ++++----
 server/signal.c  |    8 ++++----
 server/thread.c  |    8 ++++----
 8 files changed, 25 insertions(+), 46 deletions(-)

diff --git a/server/change.c b/server/change.c
index 6f4489d..c7d5823 100644
--- a/server/change.c
+++ b/server/change.c
@@ -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 )
diff --git a/server/fd.c b/server/fd.c
index 7797ced..88fa6a4 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -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__)
diff --git a/server/file.h b/server/file.h
index 25d74b2..5e2e5f0 100644
--- a/server/file.h
+++ b/server/file.h
@@ -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 );
 
diff --git a/server/process.c b/server/process.c
index 1724a24..2e9fd59 100644
--- a/server/process.c
+++ b/server/process.c
@@ -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 */
diff --git a/server/queue.c b/server/queue.c
index 7335cfc..fa80d62 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -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 */
 };
 
 
diff --git a/server/request.c b/server/request.c
index ec83ef9..404dda0 100644
--- a/server/request.c
+++ b/server/request.c
@@ -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 */
 };
 
 
diff --git a/server/signal.c b/server/signal.c
index 89fc809..11a0179 100644
--- a/server/signal.c
+++ b/server/signal.c
@@ -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;
diff --git a/server/thread.c b/server/thread.c
index a4a113d..2bf031e 100644
--- a/server/thread.c
+++ b/server/thread.c
@@ -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);




More information about the wine-cvs mailing list