Changeset 81b4c795 in mainline


Ignore:
Timestamp:
2025-06-21T17:25:23Z (4 weeks ago)
Author:
Miroslav Cimerman <mc@…>
Children:
263a2389
Parents:
cff2342
Message:

hr: rename malloc_waitok() to hr_malloc_waitok()

Location:
uspace/srv/bd/hr
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/hr/fge.c

    rcff2342 r81b4c795  
    140140        assert(wu_cnt > 0);
    141141
    142         hr_fgroup_t *result = malloc_waitok(sizeof(hr_fgroup_t));
     142        hr_fgroup_t *result = hr_malloc_waitok(sizeof(hr_fgroup_t));
    143143
    144144        result->reserved_cnt = 0;
     
    161161                 */
    162162                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));
    164165                result->reserved_cnt = taking;
    165166                parent->wu_storage_free_count = 0;
     
    168169        if (result->reserved_cnt > 0) {
    169170                result->memslots =
    170                     malloc_waitok(sizeof(size_t) * result->reserved_cnt);
     171                    hr_malloc_waitok(sizeof(size_t) * result->reserved_cnt);
    171172        }
    172173
  • uspace/srv/bd/hr/io.c

    rcff2342 r81b4c795  
    234234        hr_extent_t *extents = (hr_extent_t *)&io->vol->extents;
    235235
    236         uint8_t *data = malloc_waitok(io->cnt * io->vol->bsize);
     236        uint8_t *data = hr_malloc_waitok(io->cnt * io->vol->bsize);
    237237
    238238        rc = hr_read_direct(extents[ext_idx].svc_id, io->ba, io->cnt, data);
     
    280280        hr_extent_t *extents = (hr_extent_t *)&io->vol->extents;
    281281
    282         uint8_t *data = malloc_waitok(io->cnt * io->vol->bsize);
     282        uint8_t *data = hr_malloc_waitok(io->cnt * io->vol->bsize);
    283283
    284284        rc = hr_write_direct(extents[ext_idx].svc_id, io->ba, io->cnt, data);
  • uspace/srv/bd/hr/raid5.c

    rcff2342 r81b4c795  
    260260         * path.
    261261         */
    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));
    263263        for (size_t i = 0; i < stripes_cnt; i++)
    264                 rlps[i] = malloc_waitok(sizeof(**rlps));
     264                rlps[i] = hr_malloc_waitok(sizeof(**rlps));
    265265
    266266        /*
     
    474474         * path.
    475475         */
    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));
    477477        for (size_t i = 0; i < stripes_cnt; i++)
    478                 rlps[i] = malloc_waitok(sizeof(**rlps));
     478                rlps[i] = hr_malloc_waitok(sizeof(**rlps));
    479479
    480480        /*
  • uspace/srv/bd/hr/util.c

    rcff2342 r81b4c795  
    8484 * Return value is never NULL.
    8585 */
    86 void *malloc_waitok(size_t size)
     86void *hr_malloc_waitok(size_t size)
    8787{
    8888        void *ret;
     
    9393}
    9494
    95 void *calloc_waitok(size_t nmemb, size_t size)
     95void *hr_calloc_waitok(size_t nmemb, size_t size)
    9696{
    9797        void *ret;
     
    524524    uint64_t cnt)
    525525{
    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));
    527527
    528528        return hr_range_lock_acquire_internal(rl, vol, ba, cnt);
  • uspace/srv/bd/hr/util.h

    rcff2342 r81b4c795  
    7777} hr_range_lock_t;
    7878
    79 extern void *malloc_waitok(size_t)
     79extern void *hr_malloc_waitok(size_t)
    8080    __attribute__((malloc));
    8181
    82 extern void *calloc_waitok(size_t, size_t)
     82extern void *hr_calloc_waitok(size_t, size_t)
    8383    __attribute__((malloc));
    8484
Note: See TracChangeset for help on using the changeset viewer.