diff options
Diffstat (limited to 'meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch')
-rw-r--r-- | meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch b/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch index ae43692a..8cb618ec 100644 --- a/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch +++ b/meta-microblaze/recipes-core/systemd/files/microblaze-once-macro.patch | |||
@@ -9,19 +9,19 @@ worst expected behavior could be multiple log messages. | |||
9 | 9 | ||
10 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | 10 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> |
11 | 11 | ||
12 | diff --git a/src/fundamental/macro-fundamental.h b/src/fundamental/macro-fundamental.h | 12 | Index: git/src/fundamental/macro-fundamental.h |
13 | index 967518600d..44785e516b 100644 | 13 | =================================================================== |
14 | --- a/src/fundamental/macro-fundamental.h | 14 | --- git.orig/src/fundamental/macro-fundamental.h |
15 | +++ b/src/fundamental/macro-fundamental.h | 15 | +++ git/src/fundamental/macro-fundamental.h |
16 | @@ -55,11 +55,28 @@ | 16 | @@ -109,11 +109,28 @@ |
17 | * on this macro will run concurrently to all other code conditionalized | 17 | * on this macro will run concurrently to all other code conditionalized |
18 | * the same way, there's no ordering or completion enforced. */ | 18 | * the same way, there's no ordering or completion enforced. */ |
19 | #define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) | 19 | #define ONCE __ONCE(UNIQ_T(_once_, UNIQ)) |
20 | +#if !defined (__microblaze__) | 20 | +#if !defined (__microblaze__) |
21 | #define __ONCE(o) \ | 21 | #define __ONCE(o) \ |
22 | ({ \ | 22 | ({ \ |
23 | static bool (o) = false; \ | 23 | static sd_bool (o) = sd_false; \ |
24 | __sync_bool_compare_and_swap(&(o), false, true); \ | 24 | __sync_bool_compare_and_swap(&(o), sd_false, sd_true); \ |
25 | }) | 25 | }) |
26 | +#else | 26 | +#else |
27 | + /* Microblaze does not contain __sync_bool_compare_and_swap, so we do it | 27 | + /* Microblaze does not contain __sync_bool_compare_and_swap, so we do it |
@@ -30,11 +30,11 @@ index 967518600d..44785e516b 100644 | |||
30 | + * an issue. */ | 30 | + * an issue. */ |
31 | +#define __ONCE(o) \ | 31 | +#define __ONCE(o) \ |
32 | + ({ \ | 32 | + ({ \ |
33 | + static bool (o) = false; \ | 33 | + static bool (o) = sd_false; \ |
34 | + bool rc = false; \ | 34 | + bool rc = sd_false; \ |
35 | + if ((o) == false) { \ | 35 | + if ((o) == sd_false) { \ |
36 | + (o) = true; \ | 36 | + (o) = sd_true; \ |
37 | + rc = true; \ | 37 | + rc = sd_true; \ |
38 | + } \ | 38 | + } \ |
39 | + rc; \ | 39 | + rc; \ |
40 | + }) | 40 | + }) |