Changeset 498ced1 in mainline for uspace/srv/devman/fun.c
- Timestamp:
- 2018-08-11T02:43:32Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 05882233
- Parents:
- b13d80b
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:29:02)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-11 02:43:32)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/devman/fun.c
rb13d80b r498ced1 60 60 61 61 fun->state = FUN_INIT; 62 atomic_set(&fun->refcnt, 0);62 refcount_init(&fun->refcnt); 63 63 fibril_mutex_initialize(&fun->busy_lock); 64 64 link_initialize(&fun->dev_functions); … … 89 89 void fun_add_ref(fun_node_t *fun) 90 90 { 91 atomic_inc(&fun->refcnt);91 refcount_up(&fun->refcnt); 92 92 } 93 93 … … 100 100 void fun_del_ref(fun_node_t *fun) 101 101 { 102 if ( atomic_predec(&fun->refcnt) == 0)102 if (refcount_down(&fun->refcnt)) 103 103 delete_fun_node(fun); 104 104 }
Note:
See TracChangeset
for help on using the changeset viewer.