diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-03-20 18:17:19 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-03-20 18:17:19 -0400 |
commit | d7eb27efa3f9265dca8357cfa05d9e0560fd4534 (patch) | |
tree | e47ab5db226465cf2a87276d161f861e626ccef5 /src/stacks.c | |
parent | 7415270ed16175e443ac1b10205ccabbc964a309 (diff) | |
download | seabios-hppa-d7eb27efa3f9265dca8357cfa05d9e0560fd4534.zip seabios-hppa-d7eb27efa3f9265dca8357cfa05d9e0560fd4534.tar.gz seabios-hppa-d7eb27efa3f9265dca8357cfa05d9e0560fd4534.tar.bz2 |
Don't move EBDA while an optionrom is running (CONFIG_THREAD_OPTIONROMS).
Moving the ebda while an optionrom is running could confuse it. So,
avoid doing that.
Diffstat (limited to 'src/stacks.c')
-rw-r--r-- | src/stacks.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/stacks.c b/src/stacks.c index c783967..4a30b3d 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -297,6 +297,18 @@ finish_preempt(void) dprintf(1, "Done preempt - %d checks\n", PreemptCount); } +// Check if preemption is on, and wait for it to complete if so. +int +wait_preempt(void) +{ + if (MODESEGMENT || !CONFIG_THREADS || !CONFIG_THREAD_OPTIONROMS + || !CanPreempt) + return 0; + while (CanPreempt) + yield(); + return 1; +} + extern void yield_preempt(void); #if MODESEGMENT == 0 // Try to execute 32bit threads. |