• D
    Add reference counting on virDomainObjPtr objects · a340f913
    Daniel P. Berrange 提交于
    Add reference counting on the virDomainObjPtr objects. With the
    forthcoming asynchronous QEMU monitor, it will be neccessary to
    release the lock on virDomainObjPtr while waiting for a monitor
    command response. It is neccessary to ensure one thread can't
    delete a virDomainObjPtr while another is waiting. By introducing
    reference counting threads can make sure objects they are using
    are not accidentally deleted while unlocked.
    
    * src/conf/domain_conf.h, src/conf/domain_conf.c: Add
      virDomainObjRef/Unref APIs, remove virDomainObjFree
    * src/openvz/openvz_conf.c: replace call to virDomainObjFree
      with virDomainObjUnref
    a340f913
domain_conf.c 169.1 KB