summaryrefslogtreecommitdiffstats
path: root/src/libc++
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2010-05-18 15:55:03 -0500
committerPatrick Williams <iawillia@us.ibm.com>2010-05-18 15:55:03 -0500
commitcf138201c24fdc83ee7835b65cce67e7d7a85e70 (patch)
tree16650f82ac519ff60bc9100b4e90868463bd987d /src/libc++
parent9ea98f274e18a3407ce109a331553e1c910274d9 (diff)
downloadtalos-hostboot-cf138201c24fdc83ee7835b65cce67e7d7a85e70.tar.gz
talos-hostboot-cf138201c24fdc83ee7835b65cce67e7d7a85e70.zip
Create simple console.
Diffstat (limited to 'src/libc++')
-rw-r--r--src/libc++/builtins.C33
-rw-r--r--src/libc++/makefile10
2 files changed, 43 insertions, 0 deletions
diff --git a/src/libc++/builtins.C b/src/libc++/builtins.C
new file mode 100644
index 000000000..ed373c8cc
--- /dev/null
+++ b/src/libc++/builtins.C
@@ -0,0 +1,33 @@
+#include <stdint.h>
+
+extern "C" int __cxa_guard_acquire(volatile uint64_t* gv)
+{
+ // 0 .. uninitialized
+ // 1 .. locked
+ // 2 .. unlocked, initialized
+ if (0 == *gv)
+ {
+ *gv = 1;
+ return 1;
+ }
+ else if (1 == *gv)
+ {
+ while(1 == *gv);
+ }
+
+ return 0;
+}
+
+extern "C" void __cxa_guard_release(volatile uint64_t* gv)
+{
+ *gv = 2;
+ return;
+}
+
+
+extern "C" int __cxa_atexit(void (*)(void*), void*, void*)
+{
+ return 0;
+}
+
+void* __dso_handle = (void*) &__dso_handle;
diff --git a/src/libc++/makefile b/src/libc++/makefile
new file mode 100644
index 000000000..9f7cd97aa
--- /dev/null
+++ b/src/libc++/makefile
@@ -0,0 +1,10 @@
+OBJDIR = ../../obj
+include ../../config.mk
+
+OBJS = builtins.o
+OBJECTS = $(addprefix ${OBJDIR}/, ${OBJS})
+
+all: ${OBJECTS}
+
+clean:
+ (rm -f ${OBJECTS} )
OpenPOWER on IntegriCloud