summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/log2table.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-01 10:01:52 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-01 14:10:23 +0200
commit499492793b17b9378cbba9b19d7394dea728adeb (patch)
tree953aab64550afb0a1587a816428bf27e44eece94 /cpukit/score/src/log2table.c
parentbsps/powerpc: Fix linker command files (diff)
downloadrtems-499492793b17b9378cbba9b19d7394dea728adeb.tar.bz2
score: Move __log2table to separate file
Diffstat (limited to 'cpukit/score/src/log2table.c')
-rw-r--r--cpukit/score/src/log2table.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/cpukit/score/src/log2table.c b/cpukit/score/src/log2table.c
new file mode 100644
index 0000000000..f81f82154e
--- /dev/null
+++ b/cpukit/score/src/log2table.c
@@ -0,0 +1,43 @@
+/*
+ * @file
+ *
+ * @brief Priority Bit Map Implementation
+ *
+ * @ingroup ScorePriorityBitmap
+ */
+
+/*
+ * Copyright (C) 2010 Gedare Bloom.
+ * Copyright (C) 2011 On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/prioritybitmapimpl.h>
+
+#if ( CPU_USE_GENERIC_BITFIELD_DATA == TRUE )
+const unsigned char __log2table[256] = {
+ 7, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+#endif