Changeset 81b4c795 in mainline
- Timestamp:
- 2025-06-21T17:25:23Z (4 weeks ago)
- Children:
- 263a2389
- Parents:
- cff2342
- Location:
- uspace/srv/bd/hr
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/hr/fge.c
rcff2342 r81b4c795 140 140 assert(wu_cnt > 0); 141 141 142 hr_fgroup_t *result = malloc_waitok(sizeof(hr_fgroup_t));142 hr_fgroup_t *result = hr_malloc_waitok(sizeof(hr_fgroup_t)); 143 143 144 144 result->reserved_cnt = 0; … … 161 161 */ 162 162 size_t taking = parent->wu_storage_free_count; 163 result->own_mem = malloc_waitok(parent->wu_size * (wu_cnt - taking)); 163 result->own_mem = 164 hr_malloc_waitok(parent->wu_size * (wu_cnt - taking)); 164 165 result->reserved_cnt = taking; 165 166 parent->wu_storage_free_count = 0; … … 168 169 if (result->reserved_cnt > 0) { 169 170 result->memslots = 170 malloc_waitok(sizeof(size_t) * result->reserved_cnt);171 hr_malloc_waitok(sizeof(size_t) * result->reserved_cnt); 171 172 } 172 173 -
uspace/srv/bd/hr/io.c
rcff2342 r81b4c795 234 234 hr_extent_t *extents = (hr_extent_t *)&io->vol->extents; 235 235 236 uint8_t *data = malloc_waitok(io->cnt * io->vol->bsize);236 uint8_t *data = hr_malloc_waitok(io->cnt * io->vol->bsize); 237 237 238 238 rc = hr_read_direct(extents[ext_idx].svc_id, io->ba, io->cnt, data); … … 280 280 hr_extent_t *extents = (hr_extent_t *)&io->vol->extents; 281 281 282 uint8_t *data = malloc_waitok(io->cnt * io->vol->bsize);282 uint8_t *data = hr_malloc_waitok(io->cnt * io->vol->bsize); 283 283 284 284 rc = hr_write_direct(extents[ext_idx].svc_id, io->ba, io->cnt, data); -
uspace/srv/bd/hr/raid5.c
rcff2342 r81b4c795 260 260 * path. 261 261 */ 262 hr_range_lock_t **rlps = malloc_waitok(stripes_cnt * sizeof(*rlps));262 hr_range_lock_t **rlps = hr_malloc_waitok(stripes_cnt * sizeof(*rlps)); 263 263 for (size_t i = 0; i < stripes_cnt; i++) 264 rlps[i] = malloc_waitok(sizeof(**rlps));264 rlps[i] = hr_malloc_waitok(sizeof(**rlps)); 265 265 266 266 /* … … 474 474 * path. 475 475 */ 476 hr_range_lock_t **rlps = malloc_waitok(stripes_cnt * sizeof(*rlps));476 hr_range_lock_t **rlps = hr_malloc_waitok(stripes_cnt * sizeof(*rlps)); 477 477 for (size_t i = 0; i < stripes_cnt; i++) 478 rlps[i] = malloc_waitok(sizeof(**rlps));478 rlps[i] = hr_malloc_waitok(sizeof(**rlps)); 479 479 480 480 /* -
uspace/srv/bd/hr/util.c
rcff2342 r81b4c795 84 84 * Return value is never NULL. 85 85 */ 86 void * malloc_waitok(size_t size)86 void *hr_malloc_waitok(size_t size) 87 87 { 88 88 void *ret; … … 93 93 } 94 94 95 void * calloc_waitok(size_t nmemb, size_t size)95 void *hr_calloc_waitok(size_t nmemb, size_t size) 96 96 { 97 97 void *ret; … … 524 524 uint64_t cnt) 525 525 { 526 hr_range_lock_t *rl = malloc_waitok(sizeof(hr_range_lock_t));526 hr_range_lock_t *rl = hr_malloc_waitok(sizeof(hr_range_lock_t)); 527 527 528 528 return hr_range_lock_acquire_internal(rl, vol, ba, cnt); -
uspace/srv/bd/hr/util.h
rcff2342 r81b4c795 77 77 } hr_range_lock_t; 78 78 79 extern void * malloc_waitok(size_t)79 extern void *hr_malloc_waitok(size_t) 80 80 __attribute__((malloc)); 81 81 82 extern void * calloc_waitok(size_t, size_t)82 extern void *hr_calloc_waitok(size_t, size_t) 83 83 __attribute__((malloc)); 84 84
Note:
See TracChangeset
for help on using the changeset viewer.