Skip to content

Commit 0074f4d

Browse files
pcercueiQuzarDC
authored andcommitted
workqueue: Pack workqueue_job_t more tightly
Reorder the fields so that the fields will be better aligned inside the struct, reducing the total size of the struct. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
1 parent 5ac164d commit 0074f4d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/kos/workqueue.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ typedef struct workqueue workqueue_t;
4343
\brief Structure describing a job for the work queue.
4444
*/
4545
typedef struct workqueue_job {
46-
/** \brief Routine to call. */
47-
void (*cb)(workqueue_t *queue, struct workqueue_job *job);
48-
4946
/** \brief Time at which the job will be processed.
5047
If set to 0, the job will be set to execute immediately. */
5148
uint64_t time_ms;
5249

50+
/** \brief Routine to call. */
51+
void (*cb)(workqueue_t *queue, struct workqueue_job *job);
52+
5353
/** \brief List handle. No need to set manually. */
5454
STAILQ_ENTRY(workqueue_job) entry;
5555
} workqueue_job_t;

0 commit comments

Comments
 (0)