summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/percpuasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/percpuasm.c')
-rw-r--r--cpukit/score/src/percpuasm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/cpukit/score/src/percpuasm.c b/cpukit/score/src/percpuasm.c
index 6e5a727b76..01ad50a352 100644
--- a/cpukit/score/src/percpuasm.c
+++ b/cpukit/score/src/percpuasm.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright (c) 2012, 2016 embedded brains GmbH. All rights reserved.
+ * Copyright (C) 2012, 2016 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -44,7 +44,7 @@
#include <rtems/score/percpu.h>
#define PER_CPU_IS_POWER_OF_TWO( value ) \
- ( ( ( ( value ) - 1 ) & ( value ) ) == 0 )
+ ( ( value ) > 1 && ( ( ( value ) - 1 ) & ( value ) ) == 0 )
/*
* The minimum alignment of two is due to the Heap Handler which uses the
@@ -73,6 +73,11 @@ RTEMS_STATIC_ASSERT(
);
RTEMS_STATIC_ASSERT(
+ PER_CPU_IS_POWER_OF_TWO( CPU_STACK_MINIMUM_SIZE ),
+ CPU_STACK_MINIMUM_SIZE
+);
+
+RTEMS_STATIC_ASSERT(
sizeof(void *) == CPU_SIZEOF_POINTER,
CPU_SIZEOF_POINTER
);