summaryrefslogtreecommitdiff
path: root/OpenBSD/386/include/emu.h
diff options
context:
space:
mode:
authorCharles Forsyth <charles.forsyth@gmail.com>2018-12-21 14:58:57 +0000
committerCharles Forsyth <charles.forsyth@gmail.com>2018-12-21 14:58:57 +0000
commit3a4ecaa73af6efcbfa30eedde025a87dc1d20f27 (patch)
treebb756897181c9a9dc2538f843a2eb3b3a270424a /OpenBSD/386/include/emu.h
parentf2847740e449ea52349968e40fa4e5fb8426bb41 (diff)
parent9615754de500d96213e295cb80e41cb24e4a75ac (diff)
Merged in mechazoidal/inferno-os (pull request #19)
Fix building on OpenBSD
Diffstat (limited to 'OpenBSD/386/include/emu.h')
-rw-r--r--OpenBSD/386/include/emu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/OpenBSD/386/include/emu.h b/OpenBSD/386/include/emu.h
index 5e03489b..5392e2a4 100644
--- a/OpenBSD/386/include/emu.h
+++ b/OpenBSD/386/include/emu.h
@@ -15,6 +15,7 @@ struct FPU
#define KSTACK (32 * 1024)
+#ifndef USE_PTHREADS
static __inline Proc *getup(void) {
Proc *p;
__asm__( "movl %%esp, %%eax\n\t"
@@ -22,6 +23,9 @@ static __inline Proc *getup(void) {
);
return *(Proc **)((unsigned long)p & ~(KSTACK - 1));
};
+#else
+extern Proc* getup(void);
+#endif
#define up (getup())