Changeset 8565a42 in mainline for uspace/lib/c/generic/adt/prodcons.c
- Timestamp:
- 2018-03-02T20:34:50Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a1a81f69, d5e5fd1
- Parents:
- 3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
- git-committer:
- GitHub <noreply@…> (2018-03-02 20:34:50)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/adt/prodcons.c
r3061bc1 r8565a42 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.