Changeset 6f13257 in mainline for uspace/srv/bd/hr/fge.c


Ignore:
Timestamp:
2025-05-20T11:01:31Z (2 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
c5b60e25
Parents:
a2281efc
git-author:
Miroslav Cimerman <mc@…> (2025-05-20 10:55:15)
git-committer:
Miroslav Cimerman <mc@…> (2025-05-20 11:01:31)
Message:

hr: cstyle: don't align struct members and fcn decls

File:
1 edited

Legend:

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

    ra2281efc r6f13257  
    5959typedef struct wu_queue wu_queue_t;
    6060
    61 static void     *hr_fpool_make_storage(hr_fpool_t *, ssize_t *);
    62 static void      hr_fpool_group_epilogue(hr_fpool_t *);
    63 static errno_t  fge_fibril(void *);
    64 static errno_t  wu_queue_init(wu_queue_t *, size_t);
    65 static void      wu_queue_push(wu_queue_t *, fge_fibril_data_t *);
    66 static void      wu_queue_pop(wu_queue_t *, fge_fibril_data_t *);
    67 static ssize_t  hr_fpool_get_free_slot(hr_fpool_t *);
     61static void *hr_fpool_make_storage(hr_fpool_t *, ssize_t *);
     62static void hr_fpool_group_epilogue(hr_fpool_t *);
     63static errno_t fge_fibril(void *);
     64static errno_t wu_queue_init(wu_queue_t *, size_t);
     65static void wu_queue_push(wu_queue_t *, fge_fibril_data_t *);
     66static void wu_queue_pop(wu_queue_t *, fge_fibril_data_t *);
     67static ssize_t hr_fpool_get_free_slot(hr_fpool_t *);
    6868
    6969struct fge_fibril_data {
    70         hr_wu_t          wu;            /* work unit function pointer */
    71         void            *arg;           /* work unit function argument */
    72         hr_fgroup_t     *group;         /* back-pointer to group */
    73         ssize_t          memslot;       /* index to pool bitmap slot */
     70        hr_wu_t wu; /* work unit function pointer */
     71        void *arg; /* work unit function argument */
     72        hr_fgroup_t *group; /* back-pointer to group */
     73        ssize_t memslot; /* index to pool bitmap slot */
    7474};
    7575
    7676struct wu_queue {
    77         fibril_mutex_t          lock;
    78         fibril_condvar_t        not_empty;
    79         fibril_condvar_t        not_full;
    80         fge_fibril_data_t       *fexecs;        /* circ-buf memory */
     77        fibril_mutex_t lock;
     78        fibril_condvar_t not_empty;
     79        fibril_condvar_t not_full;
     80        fge_fibril_data_t *fexecs; /* circ-buf memory */
    8181        circ_buf_t cbuf;
    8282};
    8383
    8484struct hr_fpool {
    85         fibril_mutex_t  lock;
    86         bitmap_t         bitmap;        /* memory slot bitmap */
    87         wu_queue_t      queue;
    88         fid_t           *fibrils;
    89         uint8_t         *wu_storage;    /* pre-allocated pool storage */
    90         size_t          fibril_cnt;
    91         size_t          max_wus;
    92         size_t          active_groups;
    93         bool            stop;
    94         size_t          wu_size;
    95         size_t          wu_storage_free_count;
     85        fibril_mutex_t lock;
     86        bitmap_t bitmap; /* memory slot bitmap */
     87        wu_queue_t queue;
     88        fid_t *fibrils;
     89        uint8_t *wu_storage; /* pre-allocated pool storage */
     90        size_t fibril_cnt;
     91        size_t max_wus;
     92        size_t active_groups;
     93        bool stop;
     94        size_t wu_size;
     95        size_t wu_storage_free_count;
    9696        fibril_condvar_t all_wus_done;
    9797};
    9898
    9999struct hr_fgroup {
    100         hr_fpool_t      *pool;          /* back-pointer to pool */
    101         size_t           wu_cnt;        /* upper bound of work units */
    102         size_t           submitted;     /* number of submitted jobs */
    103         size_t           reserved_cnt;  /* no. of reserved wu storage slots */
    104         size_t          reserved_avail;
    105         size_t          *memslots;      /* indices to pool bitmap */
    106         void            *own_mem;       /* own allocated memory */
    107         size_t           own_used;      /* own memory slots used counter */
    108         errno_t          final_errno;   /* agreggated errno */
    109         size_t           finished_okay; /* no. of wus that ended with EOK */
    110         size_t           finished_fail; /* no. of wus that ended with != EOK */
    111         fibril_mutex_t  lock;
     100        hr_fpool_t *pool;/* back-pointer to pool */
     101        size_t wu_cnt;/* upper bound of work units */
     102        size_t submitted; /* number of submitted jobs */
     103        size_t reserved_cnt; /* no. of reserved wu storage slots */
     104        size_t reserved_avail;
     105        size_t *memslots; /* indices to pool bitmap */
     106        void *own_mem; /* own allocated memory */
     107        size_t own_used; /* own memory slots used counter */
     108        errno_t final_errno; /* agreggated errno */
     109        size_t finished_okay; /* no. of wus that ended with EOK */
     110        size_t finished_fail; /* no. of wus that ended with != EOK */
     111        fibril_mutex_t lock;
    112112        fibril_condvar_t all_done;
    113113};
Note: See TracChangeset for help on using the changeset viewer.