aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-02-08 00:45:44 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-02-09 11:10:23 -0500
commitb5c7da68667c782bb5049a68a36995cde4c70aaf (patch)
tree44fca1d1766c303457e2216f1fb7bc2c0891716c
parent0f6198a116fdffeeaa3cf6036f4ca6611a71b2b3 (diff)
downloadseabios-b5c7da68667c782bb5049a68a36995cde4c70aaf.tar.gz
No need to check both CONFIG_THREADS and CONFIG_THREAD_OPTIONROMS.
CONFIG_THREAD_OPTIONROMS depends on CONFIG_THREADS, so the code can assume that the two are always on when CONFIG_THREAD_OPTIONROMS is on. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/post.c4
-rw-r--r--src/stacks.c10
2 files changed, 6 insertions, 8 deletions
diff --git a/src/post.c b/src/post.c
index 9930ae5..6c4ff70 100644
--- a/src/post.c
+++ b/src/post.c
@@ -170,7 +170,7 @@ platform_hardware_setup(void)
xen_hypercall_setup();
// Start hardware initialization (if optionrom threading)
- if (CONFIG_THREADS && CONFIG_THREAD_OPTIONROMS)
+ if (CONFIG_THREAD_OPTIONROMS)
device_hardware_setup();
// Find and initialize other cpus
@@ -229,7 +229,7 @@ maininit(void)
vgarom_setup();
// Do hardware initialization (if running synchronously)
- if (!CONFIG_THREADS || !CONFIG_THREAD_OPTIONROMS) {
+ if (!CONFIG_THREAD_OPTIONROMS) {
device_hardware_setup();
wait_threads();
}
diff --git a/src/stacks.c b/src/stacks.c
index 9381729..93da7b5 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -431,7 +431,7 @@ static u32 PreemptCount;
void
start_preempt(void)
{
- if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS)
+ if (! CONFIG_THREAD_OPTIONROMS)
return;
CanPreempt = 1;
PreemptCount = 0;
@@ -442,7 +442,7 @@ start_preempt(void)
void
finish_preempt(void)
{
- if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS) {
+ if (! CONFIG_THREAD_OPTIONROMS) {
yield();
return;
}
@@ -456,8 +456,7 @@ finish_preempt(void)
int
wait_preempt(void)
{
- if (MODESEGMENT || !CONFIG_THREADS || !CONFIG_THREAD_OPTIONROMS
- || !CanPreempt)
+ if (MODESEGMENT || !CONFIG_THREAD_OPTIONROMS || !CanPreempt)
return 0;
while (CanPreempt)
yield();
@@ -476,8 +475,7 @@ yield_preempt(void)
void
check_preempt(void)
{
- if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS
- || !GET_GLOBAL(CanPreempt)
+ if (! CONFIG_THREAD_OPTIONROMS || !GET_GLOBAL(CanPreempt)
|| GET_FLATPTR(MainThread.next) == &MainThread)
return;