Changeset d5409da in mainline
- Timestamp:
- 2023-10-22T17:26:17Z (14 months ago)
- Branches:
- master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e8c235b
- Parents:
- f0378c6
- git-author:
- Vojtech Horky <vojtech.horky@…> (2023-07-13 20:05:54)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-22 17:26:17)
- Location:
- uspace/lib
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/thread/fibril_synch.c
rf0378c6 rd5409da 160 160 { 161 161 check_fibril_for_deadlock(oi, fibril_self()); 162 }163 164 void fibril_mutex_initialize(fibril_mutex_t *fm)165 {166 fm->oi.owned_by = NULL;167 fm->counter = 1;168 list_initialize(&fm->waiters);169 162 } 170 163 -
uspace/lib/c/include/adt/list.h
rf0378c6 rd5409da 183 183 * 184 184 */ 185 _NO_TRACE static inline void list_initialize(list_t *list)185 _NO_TRACE static inline __CONSTEXPR void list_initialize(list_t *list) 186 186 { 187 187 list->head.prev = &list->head; -
uspace/lib/c/include/fibril_synch.h
rf0378c6 rd5409da 153 153 extern void __fibril_synch_fini(void); 154 154 155 extern void fibril_mutex_initialize(fibril_mutex_t *); 155 /** Initialize fibril mutex. 156 * 157 * Kept as in-line to allow constexpr marker for C++ library where this 158 * is used by C++ mutex type (list initialization are two assignments 159 * so it is actually reasonable to have this inlined). 160 */ 161 static inline __CONSTEXPR void fibril_mutex_initialize(fibril_mutex_t *fm) 162 { 163 fm->oi.owned_by = NULL; 164 fm->counter = 1; 165 list_initialize(&fm->waiters); 166 } 167 156 168 extern void fibril_mutex_lock(fibril_mutex_t *); 157 169 extern bool fibril_mutex_trylock(fibril_mutex_t *); -
uspace/lib/cpp/include/__bits/thread/threading.hpp
rf0378c6 rd5409da 87 87 struct mutex 88 88 { 89 static void init(mutex_type& mtx)89 static constexpr void init(mutex_type& mtx) 90 90 { 91 91 ::helenos::fibril_mutex_initialize(&mtx);
Note:
See TracChangeset
for help on using the changeset viewer.