Annotation of qemu/block/qed-gencb.c, revision 1.1

1.1     ! root        1: /*
        !             2:  * QEMU Enhanced Disk Format
        !             3:  *
        !             4:  * Copyright IBM, Corp. 2010
        !             5:  *
        !             6:  * Authors:
        !             7:  *  Stefan Hajnoczi   <[email protected]>
        !             8:  *
        !             9:  * This work is licensed under the terms of the GNU LGPL, version 2 or later.
        !            10:  * See the COPYING.LIB file in the top-level directory.
        !            11:  *
        !            12:  */
        !            13: 
        !            14: #include "qed.h"
        !            15: 
        !            16: void *gencb_alloc(size_t len, BlockDriverCompletionFunc *cb, void *opaque)
        !            17: {
        !            18:     GenericCB *gencb = qemu_malloc(len);
        !            19:     gencb->cb = cb;
        !            20:     gencb->opaque = opaque;
        !            21:     return gencb;
        !            22: }
        !            23: 
        !            24: void gencb_complete(void *opaque, int ret)
        !            25: {
        !            26:     GenericCB *gencb = opaque;
        !            27:     BlockDriverCompletionFunc *cb = gencb->cb;
        !            28:     void *user_opaque = gencb->opaque;
        !            29: 
        !            30:     qemu_free(gencb);
        !            31:     cb(user_opaque, ret);
        !            32: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.