From aa91b84afa2ae2ac4ab6c71be3068d9d2467bf1e Mon Sep 17 00:00:00 2001 From: alexpeshkoff Date: Fri, 5 Feb 2010 12:25:41 +0000 Subject: [PATCH] Restored accidentailly committed to CORE-195 experimental changes --- src/jrd/jrd.cpp | 3 --- src/jrd/sch.cpp | 47 ----------------------------------------------- 2 files changed, 50 deletions(-) diff --git a/src/jrd/jrd.cpp b/src/jrd/jrd.cpp index dfee1ec558..354bdd7d66 100644 --- a/src/jrd/jrd.cpp +++ b/src/jrd/jrd.cpp @@ -6658,9 +6658,6 @@ static ISC_STATUS shutdown_all() // that no threads will get in and try to access the data // structures we released here - void SCH_stop(void); - SCH_stop(); - thread_db thd_context; thread_db* tdbb = JRD_MAIN_set_thread_data(thd_context); diff --git a/src/jrd/sch.cpp b/src/jrd/sch.cpp index 7235388f04..4d7bd36207 100644 --- a/src/jrd/sch.cpp +++ b/src/jrd/sch.cpp @@ -378,16 +378,6 @@ THREAD SCH_current_thread(void) } -static FB_THREAD_ID schStopped = 0; - -void SCH_stop(void) -{ - sch_mutex_lock(thread_mutex); - schStopped = ThreadData::getId(); - sch_mutex_unlock(thread_mutex); -} - - void SCH_enter(void) { /************************************** @@ -421,28 +411,8 @@ void SCH_enter(void) /* Get mutex on scheduler data structures to prevent tragic misunderstandings */ -#ifdef MULTI_THREAD - if (schStopped) - { -mStop: - if (ThreadData::getId() != schStopped) - { - pthread_exit(0); - } - return; - } -#endif - sch_mutex_lock(thread_mutex); -#ifdef MULTI_THREAD - if (schStopped) - { - sch_mutex_unlock(thread_mutex); - goto mStop; - } -#endif - THREAD thread = alloc_thread(); thread->thread_id = ThreadData::getId(); @@ -496,25 +466,8 @@ void SCH_exit(void) active_thread = NULL; free_threads->thread_next = NULL; #else - - if (schStopped) - { -mStop: - if (ThreadData::getId() != schStopped) - { - pthread_exit(0); - } - return; - } - sch_mutex_lock(thread_mutex); - if (schStopped) - { - sch_mutex_unlock(thread_mutex); - goto mStop; - } - ast_enable(); /* Reenable AST delivery */ THREAD thread = active_thread;