Changeset 498ced1 in mainline for uspace/srv/net/udp/assoc.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/net/udp/assoc.c
rb13d80b r498ced1 91 91 92 92 /* One for the user */ 93 atomic_set(&assoc->refcnt, 1);93 refcount_init(&assoc->refcnt); 94 94 95 95 /* Initialize receive queue */ … … 145 145 { 146 146 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: upd_assoc_addref(%p)", assoc->name, assoc); 147 atomic_inc(&assoc->refcnt);147 refcount_up(&assoc->refcnt); 148 148 } 149 149 … … 158 158 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: udp_assoc_delref(%p)", assoc->name, assoc); 159 159 160 if ( atomic_predec(&assoc->refcnt) == 0)160 if (refcount_down(&assoc->refcnt)) 161 161 udp_assoc_free(assoc); 162 162 }
Note:
See TracChangeset
for help on using the changeset viewer.