~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************
 
2
Server query execution
 
3
 
 
4
(c) 1996 Innobase Oy
 
5
 
 
6
Created 6/5/1996 Heikki Tuuri
 
7
*******************************************************/
 
8
 
 
9
 
 
10
#ifndef srv0que_h
 
11
#define srv0que_h
 
12
 
 
13
#include "univ.i"
 
14
#include "que0types.h"
 
15
 
 
16
/**************************************************************************
 
17
Checks if there is work to do in the server task queue. If there is, the
 
18
thread starts processing a task. Before leaving, it again checks the task
 
19
queue and picks a new task if any exists. This is called by a SRV_WORKER
 
20
thread. */
 
21
 
 
22
void
 
23
srv_que_task_queue_check(void);
 
24
/*==========================*/
 
25
/**************************************************************************
 
26
Performs round-robin on the server tasks. This is called by a SRV_WORKER
 
27
thread every second or so. */
 
28
 
 
29
que_thr_t*
 
30
srv_que_round_robin(
 
31
/*================*/
 
32
                                /* out: the new (may be == thr) query thread
 
33
                                to run */
 
34
        que_thr_t*      thr);   /* in: query thread */
 
35
/**************************************************************************
 
36
Enqueues a task to server task queue and releases a worker thread, if
 
37
there exists one suspended. */
 
38
 
 
39
void
 
40
srv_que_task_enqueue(
 
41
/*=================*/
 
42
        que_thr_t*      thr);   /* in: query thread */
 
43
/**************************************************************************
 
44
Enqueues a task to server task queue and releases a worker thread, if
 
45
there exists one suspended. */
 
46
 
 
47
void
 
48
srv_que_task_enqueue_low(
 
49
/*=====================*/
 
50
        que_thr_t*      thr);   /* in: query thread */
 
51
 
 
52
#endif
 
53