]> xenbits.xensource.com Git - seabios.git/commitdiff
No need to check both CONFIG_THREADS and CONFIG_THREAD_OPTIONROMS.
authorKevin O'Connor <kevin@koconnor.net>
Fri, 8 Feb 2013 05:45:44 +0000 (00:45 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 9 Feb 2013 16:10:23 +0000 (11:10 -0500)
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>
src/post.c
src/stacks.c

index 9930ae5144e56e39bb02770ea42c5ab02f1ad2e6..6c4ff70ef2f96e2877245986e96235d1c7fc98e8 100644 (file)
@@ -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();
     }
index 938172953e0742b95f561f924a880d84a2d1316b..93da7b51525b8a8b65bb71056f684c4658e3faca 100644 (file)
@@ -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;