diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2010-09-25 14:53:15 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2010-09-25 14:53:15 -0400 |
commit | 4d96edc76ba1e7556700908c10cb0e257cce5573 (patch) | |
tree | a617f3410df24b01c0bf10d12c0d076fcc85e45c /src/stacks.c | |
parent | a899945754d20f084bb73a1cd2453f8cabfeb0e8 (diff) | |
download | seabios-hppa-4d96edc76ba1e7556700908c10cb0e257cce5573.zip seabios-hppa-4d96edc76ba1e7556700908c10cb0e257cce5573.tar.gz seabios-hppa-4d96edc76ba1e7556700908c10cb0e257cce5573.tar.bz2 |
Cleanup - it's no longer necessary to manually reset global variables.
Now that a soft-reboot forces a hard-reboot, it is no longer necessary
to manually reset global variables.
Diffstat (limited to 'src/stacks.c')
-rw-r--r-- | src/stacks.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/stacks.c b/src/stacks.c index dade3af..14f6f8a 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -15,7 +15,9 @@ struct thread_info { void *stackpos; struct thread_info **pprev; }; -struct thread_info VAR16VISIBLE MainThread; +struct thread_info VAR32FLATVISIBLE MainThread = { + &MainThread, NULL, &MainThread.next +}; /**************************************************************** @@ -190,15 +192,6 @@ stack_hop(u32 eax, u32 edx, void *func) #define THREADSTACKSIZE 4096 int VAR16VISIBLE CanPreempt; -void -thread_setup(void) -{ - MainThread.next = &MainThread; - MainThread.pprev = &MainThread.next; - MainThread.stackpos = NULL; - CanPreempt = 0; -} - // Return the 'struct thread_info' for the currently running thread. struct thread_info * getCurThread(void) @@ -397,7 +390,7 @@ check_preempt(void) { if (! CONFIG_THREADS || ! CONFIG_THREAD_OPTIONROMS || !GET_GLOBAL(CanPreempt) - || GET_GLOBAL(MainThread.next) == &MainThread) + || GET_FLATPTR(MainThread.next) == &MainThread) return; call32(yield_preempt); |