Skip to content

Commit

Permalink
Thread pool's code reformatted
Browse files Browse the repository at this point in the history
Signed-off-by: Anatoliy Bilenko <anatoliy.bilenko@canonical.com>
  • Loading branch information
just-now committed Feb 21, 2024
1 parent b3f53e4 commit e8ce8bc
Show file tree
Hide file tree
Showing 4 changed files with 246 additions and 227 deletions.
26 changes: 13 additions & 13 deletions src/lib/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ typedef void *queue[2];
* Moves elements from queue @h to queue @n
* Note: Removed QUEUE__SPLIT() and merged it into QUEUE__MOVE().
*/
#define QUEUE__MOVE(h, n) \
{ \
if (QUEUE__IS_EMPTY(h)) { \
QUEUE__INIT(n); \
} else { \
queue *__q = QUEUE__HEAD(h); \
QUEUE__PREV(n) = QUEUE__PREV(h); \
QUEUE__PREV_NEXT(n) = (n); \
QUEUE__NEXT(n) = (__q); \
QUEUE__PREV(h) = QUEUE__PREV(__q); \
QUEUE__PREV_NEXT(h) = (h); \
QUEUE__PREV(__q) = (n); \
} \
#define QUEUE__MOVE(h, n) \
{ \
if (QUEUE__IS_EMPTY(h)) { \
QUEUE__INIT(n); \
} else { \
queue *__q = QUEUE__HEAD(h); \
QUEUE__PREV(n) = QUEUE__PREV(h); \
QUEUE__PREV_NEXT(n) = (n); \
QUEUE__NEXT(n) = (__q); \
QUEUE__PREV(h) = QUEUE__PREV(__q); \
QUEUE__PREV_NEXT(h) = (h); \
QUEUE__PREV(__q) = (n); \
} \
}

/**
Expand Down
Loading

0 comments on commit e8ce8bc

Please sign in to comment.