1
/*****************************************************************************
3
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
5
This program is free software; you can redistribute it and/or modify it under
6
the terms of the GNU General Public License as published by the Free Software
7
Foundation; version 2 of the License.
9
This program is distributed in the hope that it will be useful, but WITHOUT
10
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
You should have received a copy of the GNU General Public License along with
14
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
15
Place, Suite 330, Boston, MA 02111-1307 USA
17
*****************************************************************************/
19
/******************************************************
20
Server query execution
22
Created 6/5/1996 Heikki Tuuri
23
*******************************************************/
29
#include "que0types.h"
31
/**************************************************************************
32
Checks if there is work to do in the server task queue. If there is, the
33
thread starts processing a task. Before leaving, it again checks the task
34
queue and picks a new task if any exists. This is called by a SRV_WORKER
38
srv_que_task_queue_check(void);
39
/*==========================*/
40
/**************************************************************************
41
Performs round-robin on the server tasks. This is called by a SRV_WORKER
42
thread every second or so. */
47
/* out: the new (may be == thr) query thread
49
que_thr_t* thr); /* in: query thread */
50
/**************************************************************************
51
Enqueues a task to server task queue and releases a worker thread, if
52
there exists one suspended. */
57
que_thr_t* thr); /* in: query thread */
58
/**************************************************************************
59
Enqueues a task to server task queue and releases a worker thread, if
60
there exists one suspended. */
63
srv_que_task_enqueue_low(
64
/*=====================*/
65
que_thr_t* thr); /* in: query thread */