summaryrefslogtreecommitdiff
path: root/src/stacks.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-12-05 12:38:33 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-12-05 12:38:33 -0500
commitf3fe3aa7a0ccb881e659a4281d6f0a0bb5c33cc5 (patch)
treea6066b1259b0ae5781ddfa994f46011dcadef4bc /src/stacks.c
parentd52fdf6a6d4d710a8de12ca153bcd2735290c743 (diff)
downloadqemu-seabios-f3fe3aa7a0ccb881e659a4281d6f0a0bb5c33cc5.tar.gz
Require a "_cfuncXX_" symbol prefix for inter-mode c function references.
The compiler can get confused when referencing a C function in a different mode. (It reasonably assumes that the C function in the current mode is desired.) To avoid this compiler confusion, introduce symbol prefixes (_cfunc16_, _cfunc32flat_, _cfunc32seg_) that must be used on C function symbols that are referenced from other compilation modes. This makes it less likely compiler confusion will occur. It will also makes it easier to implement and use vtable like operation structures.
Diffstat (limited to 'src/stacks.c')
-rw-r--r--src/stacks.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/stacks.c b/src/stacks.c
index c77ba1f..53bf669 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -373,8 +373,6 @@ wait_preempt(void)
return 1;
}
-extern void yield_preempt(void);
-#if MODESEGMENT == 0
// Try to execute 32bit threads.
void VISIBLE32INIT
yield_preempt(void)
@@ -382,7 +380,6 @@ yield_preempt(void)
PreemptCount++;
switch_next(&MainThread);
}
-#endif
// 16bit code that checks if threads are pending and executes them if so.
void
@@ -393,5 +390,6 @@ check_preempt(void)
|| GET_FLATPTR(MainThread.next) == &MainThread)
return;
- call32(yield_preempt, 0, 0);
+ extern void _cfunc32flat_yield_preempt(void);
+ call32(_cfunc32flat_yield_preempt, 0, 0);
}