From 74c3f757f61365ed4e45406c59e629cf23b2e26b Mon Sep 17 00:00:00 2001 From: dimitr Date: Mon, 9 Jun 2008 10:07:09 +0000 Subject: [PATCH] Fixed the Windows build. This solution is temporary and should be re-optimized for Beta. --- src/jrd/os/thd_priority.h | 16 +++------------- src/jrd/os/win32/thd_priority.cpp | 17 +++++++++++++++++ 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/src/jrd/os/thd_priority.h b/src/jrd/os/thd_priority.h index 65116e226a..dc65634fd3 100644 --- a/src/jrd/os/thd_priority.h +++ b/src/jrd/os/thd_priority.h @@ -119,21 +119,10 @@ public: static void Cleanup(void*); // Goes to low priority zone - static void enter() - { - ThreadPriorityScheduler *t = get(); - fb_assert(t); - t->inside = true; - t->gonein = true; - } + static void enter(); // Goes from low priority zone - static void exit() - { - ThreadPriorityScheduler *t = get(); - fb_assert(t); - t->inside = false; - } + static void exit(); // Check whether current thread has high priority static bool boosted() @@ -163,6 +152,7 @@ public: public: static void enter() {} static void exit() {} + static bool boosted() { return false; diff --git a/src/jrd/os/win32/thd_priority.cpp b/src/jrd/os/win32/thd_priority.cpp index dcf884ac38..7a92758f7e 100644 --- a/src/jrd/os/win32/thd_priority.cpp +++ b/src/jrd/os/win32/thd_priority.cpp @@ -68,6 +68,23 @@ ThreadPriorityScheduler* ThreadPriorityScheduler::get() return TLS_GET(currentScheduler); } +// Goes to low priority zone +void ThreadPriorityScheduler::enter() +{ + ThreadPriorityScheduler *t = get(); + fb_assert(t); + t->inside = true; + t->gonein = true; +} + +// Goes from low priority zone +void ThreadPriorityScheduler::exit() +{ + ThreadPriorityScheduler *t = get(); + fb_assert(t); + t->inside = false; +} + void ThreadPriorityScheduler::init() { if (opMode != Running)