Dmitry Timoshkov : server: Add access mapping for IO completion objects.
Alexandre Julliard
julliard at winehq.org
Tue Apr 17 13:31:49 CDT 2012
Module: wine
Branch: master
Commit: 16b7a7f707fd5f38cf5b290d02daed2676120180
URL: http://source.winehq.org/git/wine.git/?a=commit;h=16b7a7f707fd5f38cf5b290d02daed2676120180
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Apr 17 17:02:19 2012 +0900
server: Add access mapping for IO completion objects.
---
server/completion.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/server/completion.c b/server/completion.c
index 2a8f9ac..948d7d1 100644
--- a/server/completion.c
+++ b/server/completion.c
@@ -53,8 +53,9 @@ struct completion
static void completion_dump( struct object*, int );
static struct object_type *completion_get_type( struct object *obj );
+static int completion_signaled( struct object *obj, struct thread *thread );
+static unsigned int completion_map_access( struct object *obj, unsigned int access );
static void completion_destroy( struct object * );
-static int completion_signaled( struct object *obj, struct thread *thread );
static const struct object_ops completion_ops =
{
@@ -67,7 +68,7 @@ static const struct object_ops completion_ops =
no_satisfied, /* satisfied */
no_signal, /* signal */
no_get_fd, /* get_fd */
- no_map_access, /* map_access */
+ completion_map_access, /* map_access */
default_get_sd, /* get_sd */
default_set_sd, /* set_sd */
no_lookup_name, /* lookup_name */
@@ -120,6 +121,15 @@ static int completion_signaled( struct object *obj, struct thread *thread )
return !list_empty( &completion->queue );
}
+static unsigned int completion_map_access( struct object *obj, unsigned int access )
+{
+ if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | SYNCHRONIZE | IO_COMPLETION_QUERY_STATE;
+ if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE;
+ if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
+ if (access & GENERIC_ALL) access |= STANDARD_RIGHTS_ALL | IO_COMPLETION_ALL_ACCESS;
+ return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
+}
+
static struct completion *create_completion( struct directory *root, const struct unicode_str *name, unsigned int attr, unsigned int concurrent )
{
struct completion *completion;
More information about the wine-cvs
mailing list