Changeset 3f7e1f24 in mainline for uspace/srv/sysman/configuration.c
- Timestamp:
- 2019-08-03T08:28:26Z (5 years ago)
- Children:
- 095d03c
- Parents:
- d7c5fc0
- git-author:
- Michal Koutný <xm.koutny+hos@…> (2015-04-22 17:54:08)
- git-committer:
- Matthieu Riolo <matthieu.riolo@…> (2019-08-03 08:28:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/sysman/configuration.c
rd7c5fc0 r3f7e1f24 39 39 40 40 static hash_table_t units; 41 static fibril_rwlock_t units_rwl;42 41 43 42 /* Hash table functions */ … … 81 80 { 82 81 hash_table_create(&units, 0, 0, &units_ht_ops); 83 fibril_rwlock_initialize(&units_rwl);84 82 } 85 83 … … 89 87 assert(unit->state == STATE_EMBRYO); 90 88 assert(unit->name != NULL); 91 assert(fibril_rwlock_is_write_locked(&units_rwl));92 89 sysman_log(LVL_DEBUG2, "%s('%s')", __func__, unit_name(unit)); 93 90 … … 100 97 101 98 void configuration_start_update(void) { 102 assert(!fibril_rwlock_is_write_locked(&units_rwl)); 103 sysman_log(LVL_DEBUG2, "%s", __func__); 104 fibril_rwlock_write_lock(&units_rwl); 99 sysman_log(LVL_DEBUG2, "%s", __func__); 105 100 } 106 101 … … 124 119 void configuration_commit(void) 125 120 { 126 assert(fibril_rwlock_is_write_locked(&units_rwl));127 121 sysman_log(LVL_DEBUG2, "%s", __func__); 128 122 … … 132 126 */ 133 127 hash_table_apply(&units, &configuration_commit_unit, NULL); 134 fibril_rwlock_write_unlock(&units_rwl);135 128 } 136 129 … … 157 150 void configuration_rollback(void) 158 151 { 159 assert(fibril_rwlock_is_write_locked(&units_rwl));160 152 sysman_log(LVL_DEBUG2, "%s", __func__); 161 153 162 154 hash_table_apply(&units, &configuration_rollback_unit, NULL); 163 fibril_rwlock_write_unlock(&units_rwl);164 155 } 165 156 … … 199 190 int configuration_resolve_dependecies(void) 200 191 { 201 assert(fibril_rwlock_is_write_locked(&units_rwl));202 192 sysman_log(LVL_DEBUG2, "%s", __func__); 203 193
Note:
See TracChangeset
for help on using the changeset viewer.