[PATCH 2/6] Allow completion object to be attached to a fd object

Alexandre Julliard julliard at winehq.org
Wed Sep 26 06:54:06 CDT 2007


Andrey Turkin <andrey.turkin at gmail.com> writes:

> +struct compl_map *create_completion_map( obj_handle_t handle, unsigned long completion_key )
> +{
> +    struct completion *completion;
> +    struct compl_map *map;
> +
> +    if ((completion = get_completion_obj( current->process, handle, IO_COMPLETION_MODIFY_STATE )) == NULL)
> +        return NULL;
> +    if ((map = mem_alloc( sizeof(*map) )) == NULL)
> +    {
> +        release_object( completion );
> +        return NULL;
> +    }
> +    map->completion = completion;
> +    map->completion_key = completion_key;
> +    return map;
> +}

There doesn't seem to be a need for a separate compl_map type here,
you could just as well store the completion object in the fd structure
directly.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list