From e148f38dc937c34b222ba8df8612b3fa2b6bc349 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Sun, 29 May 2022 11:23:29 +0300 Subject: modify formatting rules --- common/tcb.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'common/tcb.c') diff --git a/common/tcb.c b/common/tcb.c index 1382f67..316cc3e 100644 --- a/common/tcb.c +++ b/common/tcb.c @@ -192,35 +192,35 @@ stat_t destroy_proc(struct tcb *p) return __destroy_thread_data(p); } -#define DEFINE_ATTACH(name, type) \ - stat_t name(struct tcb *r, struct tcb *t) \ - { \ - hard_assert(r != t, ERR_INVAL); \ - struct tcb *next = r->type.next; \ - t->type.next = next; \ -\ +#define DEFINE_ATTACH(name, type) \ + stat_t name(struct tcb *r, struct tcb *t) \ + { \ + hard_assert(r != t, ERR_INVAL); \ + struct tcb *next = r->type.next; \ + t->type.next = next; \ + \ if (next) { next->type.prev = t; } \ -\ - t->type.prev = r; \ - r->type.next = t; \ - return OK; \ + \ + t->type.prev = r; \ + r->type.next = t; \ + return OK; \ } DEFINE_ATTACH(attach_rpc, rpc); DEFINE_ATTACH(attach_proc, proc); -#define DEFINE_DETACH(name, type) \ - stat_t name(struct tcb *r, struct tcb *t) \ - { \ - MAYBE_UNUSED(r); \ - hard_assert(r != t, ERR_INVAL); \ - struct tcb *prev = t->type.prev; \ - struct tcb *next = t->type.next; \ -\ +#define DEFINE_DETACH(name, type) \ + stat_t name(struct tcb *r, struct tcb *t) \ + { \ + MAYBE_UNUSED(r); \ + hard_assert(r != t, ERR_INVAL); \ + struct tcb *prev = t->type.prev; \ + struct tcb *next = t->type.next; \ + \ if (prev) { prev->type.next = next; } \ if (next) { next->type.prev = prev; } \ -\ - return OK; \ + \ + return OK; \ } DEFINE_DETACH(detach_rpc, rpc); -- cgit v1.3