scheduler: Code refactoring

This commit is contained in:
Pawel Dziepak
2013-12-05 22:47:30 +01:00
parent 2e3cbcfa8a
commit d287274dce
12 changed files with 1555 additions and 1435 deletions
+6 -5
View File
@@ -17,7 +17,6 @@
#include <heap.h>
#include <ksignal.h>
#include <lock.h>
#include <RunQueueLink.h>
#include <smp.h>
#include <thread_defs.h>
#include <timer.h>
@@ -58,12 +57,15 @@ struct cpu_ent;
struct image; // defined in image.c
struct io_context;
struct realtime_sem_context; // defined in realtime_sem.cpp
struct scheduler_thread_data;
struct select_info;
struct user_thread; // defined in libroot/user_thread.h
struct VMAddressSpace;
struct xsi_sem_context; // defined in xsi_semaphore.cpp
namespace Scheduler {
struct ThreadData;
}
namespace BKernel {
struct Team;
struct Thread;
@@ -412,8 +414,7 @@ private:
};
struct Thread : TeamThreadIteratorEntry<thread_id>, KernelReferenceable,
RunQueueLinkImpl<Thread> {
struct Thread : TeamThreadIteratorEntry<thread_id>, KernelReferenceable {
int32 flags; // summary of events relevant in interrupt
// handlers (signals pending, user debugging
// enabled, etc.)
@@ -444,7 +445,7 @@ struct Thread : TeamThreadIteratorEntry<thread_id>, KernelReferenceable,
bool in_kernel; // protected by time_lock, only written by
// this thread
bool has_yielded; // protected by scheduler lock
struct scheduler_thread_data* scheduler_data; // protected by scheduler lock
Scheduler::ThreadData* scheduler_data; // protected by scheduler lock
struct user_thread* user_thread; // write-protected by fLock, only
// modified by the thread itself and
+2
View File
@@ -10,6 +10,8 @@
#include <SupportDefs.h>
#include <debug.h>
#ifdef __cplusplus