~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/include/srv0que.h

  • Committer: Monty Taylor
  • Date: 2009-03-24 17:44:41 UTC
  • mto: (960.5.2 mordred)
  • mto: This revision was merged to the branch mainline in revision 964.
  • Revision ID: mordred@inaugust.com-20090324174441-nmsq0gwjlgf7f0mt
Changed handlerton to StorageEngine.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 
 
3
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
 
4
 
 
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.
 
8
 
 
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.
 
12
 
 
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
 
16
 
 
17
*****************************************************************************/
 
18
 
 
19
/******************************************************
 
20
Server query execution
 
21
 
 
22
Created 6/5/1996 Heikki Tuuri
 
23
*******************************************************/
 
24
 
 
25
#ifndef srv0que_h
 
26
#define srv0que_h
 
27
 
 
28
#include "univ.i"
 
29
#include "que0types.h"
 
30
 
 
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
 
35
thread. */
 
36
UNIV_INTERN
 
37
void
 
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. */
 
43
UNIV_INTERN
 
44
que_thr_t*
 
45
srv_que_round_robin(
 
46
/*================*/
 
47
                                /* out: the new (may be == thr) query thread
 
48
                                to run */
 
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. */
 
53
UNIV_INTERN
 
54
void
 
55
srv_que_task_enqueue(
 
56
/*=================*/
 
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. */
 
61
UNIV_INTERN
 
62
void
 
63
srv_que_task_enqueue_low(
 
64
/*=====================*/
 
65
        que_thr_t*      thr);   /* in: query thread */
 
66
 
 
67
#endif
 
68