Changeset bda60d9 in mainline for uspace/srv/devman/match.c


Ignore:
Timestamp:
2010-03-19T14:40:14Z (15 years ago)
Author:
Lenka Trochtova <trochtova.lenka@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d347b53
Parents:
7707954
Message:

adding child device - parts of code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/match.c

    r7707954 rbda60d9  
    8989}
    9090
    91 void add_match_id(match_id_list_t *ids, match_id_t *id)
    92 {
    93         match_id_t *mid = NULL;
    94         link_t *link = ids->ids.next;   
    95        
    96         while (link != &ids->ids) {
    97                 mid = list_get_instance(link, match_id_t,link);
    98                 if (mid->score < id->score) {
    99                         break;
    100                 }       
    101                 link = link->next;
    102         }
    103        
    104         list_insert_before(&id->link, link);   
    105 }
    10691
    107 void clean_match_ids(match_id_list_t *ids)
    108 {
    109         link_t *link = NULL;
    110         match_id_t *id;
    111        
    112         while(!list_empty(&ids->ids)) {
    113                 link = ids->ids.next;
    114                 list_remove(link);             
    115                 id = list_get_instance(link, match_id_t, link);
    116                 delete_match_id(id);           
    117         }       
    118 }
    11992
Note: See TracChangeset for help on using the changeset viewer.