Changeset 102f641 in mainline for uspace/srv/taskman/task.c
- Timestamp:
- 2019-09-02T19:01:50Z (6 years ago)
- Children:
- 25697163
- Parents:
- 241f1985
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/taskman/task.c
r241f1985 r102f641 46 46 void *arg; 47 47 } walker_context_t; 48 48 49 49 /* 50 50 * Forwards … … 59 59 static size_t ht_task_key_hash(const void *key) 60 60 { 61 return *(task_id_t *)key;61 return *(task_id_t *)key; 62 62 } 63 63 … … 71 71 { 72 72 task_t *ht = hash_table_get_inst(item, task_t, link); 73 return ht->id == *(task_id_t *)key;73 return ht->id == *(task_id_t *)key; 74 74 } 75 75 … … 127 127 128 128 fibril_rwlock_initialize(&task_hash_table_lock); 129 129 130 130 return EOK; 131 131 } … … 145 145 return NULL; 146 146 } 147 147 148 148 task_t *t = hash_table_get_inst(link, task_t, link); 149 149 return t; … … 202 202 goto finish; 203 203 } 204 204 205 205 t = malloc(sizeof(task_t)); 206 206 if (t == NULL) { … … 217 217 hash_table_insert(&task_hash_table, &t->link); 218 218 DPRINTF("%s: %llu\n", __func__, t->id); 219 219 220 220 finish: 221 221 fibril_rwlock_write_unlock(&task_hash_table_lock); … … 223 223 } 224 224 225 226 225 /** 227 226 * @}
Note:
See TracChangeset
for help on using the changeset viewer.