Changeset 498ced1 in mainline for uspace/srv/devman/dev.c
- Timestamp:
- 2018-08-11T02:43:32Z (7 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/dev.c
rb13d80b r498ced1 48 48 return NULL; 49 49 50 atomic_set(&dev->refcnt, 0);50 refcount_init(&dev->refcnt); 51 51 list_initialize(&dev->functions); 52 52 link_initialize(&dev->driver_devices); … … 74 74 void dev_add_ref(dev_node_t *dev) 75 75 { 76 atomic_inc(&dev->refcnt);76 refcount_up(&dev->refcnt); 77 77 } 78 78 … … 85 85 void dev_del_ref(dev_node_t *dev) 86 86 { 87 if ( atomic_predec(&dev->refcnt) == 0)87 if (refcount_down(&dev->refcnt)) 88 88 delete_dev_node(dev); 89 89 }
Note:
See TracChangeset
for help on using the changeset viewer.