Changeset a35b458 in mainline for uspace/lib/c/generic/adt/prodcons.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/prodcons.c
r3061bc1 ra35b458 47 47 { 48 48 fibril_mutex_lock(&pc->mtx); 49 49 50 50 list_append(item, &pc->list); 51 51 fibril_condvar_signal(&pc->cv); 52 52 53 53 fibril_mutex_unlock(&pc->mtx); 54 54 } … … 57 57 { 58 58 fibril_mutex_lock(&pc->mtx); 59 59 60 60 while (list_empty(&pc->list)) 61 61 fibril_condvar_wait(&pc->cv, &pc->mtx); 62 62 63 63 link_t *head = list_first(&pc->list); 64 64 list_remove(head); 65 65 66 66 fibril_mutex_unlock(&pc->mtx); 67 67 68 68 return head; 69 69 }
Note:
See TracChangeset
for help on using the changeset viewer.