Changeset 498ced1 in mainline for uspace/srv/bd/vbd/disk.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/bd/vbd/disk.c
rb13d80b r498ced1 244 244 { 245 245 log_msg(LOG_DEFAULT, LVL_DEBUG2, "vbds_part_add_ref"); 246 atomic_inc(&part->refcnt);246 refcount_up(&part->refcnt); 247 247 } 248 248 … … 250 250 { 251 251 log_msg(LOG_DEFAULT, LVL_DEBUG2, "vbds_part_del_ref"); 252 if ( atomic_predec(&part->refcnt) == 0) {252 if (refcount_down(&part->refcnt)) { 253 253 log_msg(LOG_DEFAULT, LVL_DEBUG2, " - free part"); 254 254 free(part); … … 328 328 part->block0 = lpinfo.block0; 329 329 part->nblocks = lpinfo.nblocks; 330 atomic_set(&part->refcnt, 1);330 refcount_init(&part->refcnt); 331 331 332 332 bd_srvs_init(&part->bds);
Note:
See TracChangeset
for help on using the changeset viewer.