Changeset 34588a80 in mainline


Ignore:
Timestamp:
2011-02-14T22:41:44Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
83a2f43
Parents:
659ca07
Message:

Check for function type and bind state when adding match ID or adding
to class. Clarify in documentation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r659ca07 r34588a80  
    607607}
    608608
    609 /** Add single match ID to function.
     609/** Add single match ID to inner function.
    610610 *
    611611 * Construct and add a single match ID to the specified function.
     612 * Cannot be called when the function node is bound.
    612613 *
    613614 * @param fun                   Function
     
    621622        match_id_t *match_id;
    622623       
     624        assert(fun->bound == false);
     625        assert(fun->ftype == fun_inner);
     626       
    623627        match_id = create_match_id();
    624628        if (match_id == NULL)
     
    640644}
    641645
     646/** Add exposed function to class.
     647 *
     648 * Must only be called when the function is bound.
     649 */
    642650int add_function_to_class(function_t *fun, const char *class_name)
    643651{
     652        assert(fun->bound == true);
     653        assert(fun->ftype == fun_exposed);
     654       
    644655        return devman_add_device_to_class(fun->handle, class_name);
    645656}
Note: See TracChangeset for help on using the changeset viewer.