Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changes between Version 22 and Version 23 of DeviceDrivers


Ignore:
Timestamp:
2011-11-16T15:56:54Z (8 years ago)
Author:
Jiri Svoboda
Comment:

Unify style

Legend:

Unmodified
Added
Removed
Modified
  • DeviceDrivers

    v22 v23  
    226226
    227227The soft-state management functions are:
    228  * void *ddf_dev_data_alloc(ddf_dev_t *dev, size_t size) - allocate driver-specific device data
    229  * void *ddf_fun_data_alloc(ddf_fun_t *fun, size_t size) - allocate driver-specific function data
    230 
     228 * ddf_dev_data_alloc() - allocate driver-specific device data
     229 * ddf_fun_data_alloc() - allocate driver-specific function data
     230
     231{{{
     232void *ddf_dev_data_alloc(ddf_dev_t *dev, size_t size)
     233}}}
    231234The function ''ddf_dev_data_alloc'' allocates a driver-specific data strutcure ''size'' bytes large, associated with the device ''dev''. The structure will not be deallocated by the framework until the ''dev_remove'' or ''dev_gone'' entry point returns '''and''' control exits all driver entry points that are invoked with ''dev'' as a parameter. (Internally, this is achieved using reference counting).
    232235
     236{{{
     237void *ddf_fun_data_alloc(ddf_fun_t *fun, size_t size)
     238}}}
    233239The function ''ddf_fun_data_alloc'' allocates a driver-specific data structure ''size'' bytes large, associated with the function ''fun''. The structure will not be deallocated by the framework until ''ddf_fun_destroy()'' is called '''and''' control exits all driver entry points that are invoked with ''fun'' as parameter. 'ddf_dev_data_alloc'' is normally called from within the ''dev_add'' emtry point.
    234240