aboutsummaryrefslogtreecommitdiff
path: root/common/tcb.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 11:23:29 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-29 11:23:29 +0300
commite148f38dc937c34b222ba8df8612b3fa2b6bc349 (patch)
treec51f045c6632b2073cb0e3183bd9d3b559ccd228 /common/tcb.c
parent360c18fcbe228220e5c9799fb30b2032982c06cf (diff)
downloadkmi-e148f38dc937c34b222ba8df8612b3fa2b6bc349.tar.gz
kmi-e148f38dc937c34b222ba8df8612b3fa2b6bc349.zip
modify formatting rules
Diffstat (limited to 'common/tcb.c')
-rw-r--r--common/tcb.c42
1 files changed, 21 insertions, 21 deletions
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);