diff options
author | Will Deacon <will.deacon@arm.com> | 2017-10-16 10:32:47 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-10-16 10:32:47 +0100 |
commit | 9fee8cc800d855d73641c5c12e1b266204cb3946 (patch) | |
tree | 89e5b42d4d1cf525667693a5660db3ce0d71c51c | |
parent | 61483dd12ffeb625f48a6b2fedbf5eb9e1d58d12 (diff) | |
download | qrwlock-rmem-9fee8cc800d855d73641c5c12e1b266204cb3946.tar.gz |
Got rid of stdlib.h dependency
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | kernel.h | 3 | ||||
-rw-r--r-- | main.c | 5 |
2 files changed, 7 insertions, 1 deletions
@@ -5,7 +5,7 @@ #ifndef __KERNEL_H #define __KERNEL_H -#include <stdlib.h> /* abort() */ +extern void abort(void); /* Compiler bits */ #define __branch_check__(x, expect, is_constant) ({ \ @@ -18,6 +18,7 @@ #define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x))) #define __force #define __aligned(x) __attribute__((aligned(x))) +#define __always_inline inline __attribute__((always_inline)) /* Type definitions */ typedef unsigned char u8; @@ -2,6 +2,11 @@ struct qrwlock lock; +void abort(void) +{ + while (1); +} + int main(void) { arch_read_lock(&lock); |