Changeset 0f0f8bc in mainline for uspace/lib/drv/include/ddf/driver.h


Ignore:
Timestamp:
2011-08-29T18:46:37Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4d94002d
Parents:
8cc4ddb
Message:

Use reference counting to synchronize freeing of ddf_fun_t and ddf_dev_t.
This ensures that a function structure (device structure, potentially)
passed as argument to a driver entry point is not deallocated until
control returns from that entry point. We still need similar guarantee
for driver data.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/ddf/driver.h

    r8cc4ddb r0f0f8bc  
    8181         */
    8282        devman_handle_t handle;
     83        /** Reference count */
     84        atomic_t refcnt;
    8385       
    8486        /**
     
    104106        /** Function indentifier (asigned by device manager) */
    105107        devman_handle_t handle;
     108        /** Reference count */
     109        atomic_t refcnt;
    106110       
    107111        /** Device which this function belogs to */
Note: See TracChangeset for help on using the changeset viewer.