diff options
author | unknown <monty@mysql.com> | 2004-05-25 22:54:00 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-25 22:54:00 +0300 |
commit | a9b481d3cd7fbf832b17523c521185db6366492c (patch) | |
tree | b258dbd41e0b45f70adf8c42ee94cce74cd0232f /innobase/srv/srv0que.c | |
parent | de5edbf8db66e1f896b76d408152cd0094dcf684 (diff) | |
parent | a3d0ce6bc611673e2d5342bc9cd735a9febfe6b4 (diff) | |
download | mariadb-git-a9b481d3cd7fbf832b17523c521185db6366492c.tar.gz |
merge with 4.0 to get Netware patches and fixes for libmysqld.dll
configure.in:
Auto merged
Build-tools/Do-compile:
Auto merged
client/mysql.cc:
Auto merged
client/mysqladmin.c:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqlimport.c:
Auto merged
client/mysqlshow.c:
Auto merged
client/mysqltest.c:
Auto merged
include/my_global.h:
Auto merged
include/thr_alarm.h:
Auto merged
innobase/include/trx0roll.h:
Auto merged
innobase/include/trx0trx.h:
Auto merged
innobase/que/que0que.c:
Auto merged
innobase/srv/srv0srv.c:
Auto merged
innobase/trx/trx0purge.c:
Auto merged
innobase/trx/trx0roll.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/usr/usr0sess.c:
Auto merged
isam/isamchk.c:
Auto merged
myisam/myisam_ftdump.c:
Auto merged
myisam/myisamchk.c:
Auto merged
myisam/myisampack.c:
Auto merged
mysys/default.c:
Auto merged
mysys/my_getopt.c:
Auto merged
mysys/my_init.c:
Auto merged
mysys/my_pthread.c:
Auto merged
netware/Makefile.am:
Auto merged
netware/init_db.sql:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
tools/mysqlmanager.c:
Auto merged
VC++Files/dbug/dbug.dsp:
Auto merged
VC++Files/heap/heap.dsp:
Auto merged
VC++Files/isam/isam.dsp:
Auto merged
VC++Files/libmysql/libmysql.dsp:
Auto merged
VC++Files/myisam/myisam.dsp:
Auto merged
VC++Files/myisammrg/myisammrg.dsp:
Auto merged
VC++Files/mysys/mysys.dsp:
Auto merged
VC++Files/libmysqld/libmysqld.dsp:
merge
client/mysqlbinlog.cc:
merge
extra/perror.c:
merge
include/mysql_com.h:
merge
libmysqld/Makefile.am:
merge
netware/BUILD/mwenv:
merge
sql/mysqld.cc:
merge
Diffstat (limited to 'innobase/srv/srv0que.c')
-rw-r--r-- | innobase/srv/srv0que.c | 111 |
1 files changed, 0 insertions, 111 deletions
diff --git a/innobase/srv/srv0que.c b/innobase/srv/srv0que.c deleted file mode 100644 index ac8bd7d0e65..00000000000 --- a/innobase/srv/srv0que.c +++ /dev/null @@ -1,111 +0,0 @@ -/****************************************************** -Server query execution - -(c) 1996 Innobase Oy - -Created 6/5/1996 Heikki Tuuri -*******************************************************/ - -#include "srv0que.h" - -#include "srv0srv.h" -#include "sync0sync.h" -#include "os0thread.h" -#include "usr0sess.h" -#include "que0que.h" - -/************************************************************************** -Checks if there is work to do in the server task queue. If there is, the -thread starts processing a task. Before leaving, it again checks the task -queue and picks a new task if any exists. This is called by a SRV_WORKER -thread. */ - -void -srv_que_task_queue_check(void) -/*==========================*/ -{ - que_thr_t* thr; - - for (;;) { - mutex_enter(&kernel_mutex); - - thr = UT_LIST_GET_FIRST(srv_sys->tasks); - - if (thr == NULL) { - mutex_exit(&kernel_mutex); - - return; - } - - UT_LIST_REMOVE(queue, srv_sys->tasks, thr); - - mutex_exit(&kernel_mutex); - - que_run_threads(thr); - } -} - -/************************************************************************** -Performs round-robin on the server tasks. This is called by a SRV_WORKER -thread every second or so. */ - -que_thr_t* -srv_que_round_robin( -/*================*/ - /* out: the new (may be == thr) query thread - to run */ - que_thr_t* thr) /* in: query thread */ -{ - que_thr_t* new_thr; - - ut_ad(thr); - ut_ad(thr->state == QUE_THR_RUNNING); - - mutex_enter(&kernel_mutex); - - UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); - - new_thr = UT_LIST_GET_FIRST(srv_sys->tasks); - - mutex_exit(&kernel_mutex); - - return(new_thr); -} - -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if there -is a suspended one. */ - -void -srv_que_task_enqueue_low( -/*=====================*/ - que_thr_t* thr) /* in: query thread */ -{ - ut_ad(thr); - -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - - UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); - - srv_release_threads(SRV_WORKER, 1); -} - -/************************************************************************** -Enqueues a task to server task queue and releases a worker thread, if there -is a suspended one. */ - -void -srv_que_task_enqueue( -/*=================*/ - que_thr_t* thr) /* in: query thread */ -{ - ut_ad(thr); - - mutex_enter(&kernel_mutex); - - srv_que_task_enqueue_low(thr); - - mutex_exit(&kernel_mutex); -} |