[syslinux:lwip] thread: fix warnings

syslinux-bot for H. Peter Anvin hpa at zytor.com
Sun May 1 18:12:05 PDT 2011


Commit-ID:  f8e82f9f4dab637783b5dbcec61956bba1c57faf
Gitweb:     http://syslinux.zytor.com/commit/f8e82f9f4dab637783b5dbcec61956bba1c57faf
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 1 May 2011 18:05:23 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 1 May 2011 18:05:23 -0700

thread: fix warnings

Fix set-but-not-used variable warnings and undefined references.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/include/thread.h     |    1 +
 core/thread/exit_thread.c |    6 +++---
 core/thread/schedule.c    |    1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/core/include/thread.h b/core/include/thread.h
index 5852df2..73e8824 100644
--- a/core/include/thread.h
+++ b/core/include/thread.h
@@ -6,6 +6,7 @@
 #include <limits.h>
 #include <stdbool.h>
 #include <timer.h>
+#include <sys/cpu.h>
 
 /* The idle thread runs at this priority */
 #define IDLE_THREAD_PRIORITY	INT_MAX
diff --git a/core/thread/exit_thread.c b/core/thread/exit_thread.c
index 92c84a4..d9fd83a 100644
--- a/core/thread/exit_thread.c
+++ b/core/thread/exit_thread.c
@@ -1,14 +1,14 @@
-#include "thread.h"
 #include <limits.h>
 #include <stdlib.h>
 #include <klibc/compiler.h>
+#include "thread.h"
+#include "core.h"
 
 __noreturn __exit_thread(void)
 {
-    irq_state_t irq;
     struct thread *curr = current();
 
-    irq = irq_save();
+    cli();
 
     /* Remove from the linked list */
     curr->list.prev->next = curr->list.next;
diff --git a/core/thread/schedule.c b/core/thread/schedule.c
index cf25f25..8991305 100644
--- a/core/thread/schedule.c
+++ b/core/thread/schedule.c
@@ -1,5 +1,6 @@
 #include <sys/cpu.h>
 #include "thread.h"
+#include "core.h"
 
 void (*sched_hook_func)(void);
 



More information about the Syslinux-commits mailing list