~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/srv/srv0que.c

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

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
@file srv/srv0que.c
 
21
Server query execution
 
22
 
 
23
Created 6/5/1996 Heikki Tuuri
 
24
*******************************************************/
 
25
 
 
26
#include "srv0que.h"
 
27
 
 
28
#include "srv0srv.h"
 
29
#include "sync0sync.h"
 
30
#include "os0thread.h"
 
31
#include "usr0sess.h"
 
32
#include "que0que.h"
 
33
 
 
34
/**********************************************************************//**
 
35
Enqueues a task to server task queue and releases a worker thread, if there
 
36
is a suspended one. */
 
37
UNIV_INTERN
 
38
void
 
39
srv_que_task_enqueue_low(
 
40
/*=====================*/
 
41
        que_thr_t*      thr)    /*!< in: query thread */
 
42
{
 
43
        ut_ad(thr);
 
44
        ut_ad(mutex_own(&kernel_mutex));
 
45
 
 
46
        UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr);
 
47
 
 
48
        srv_release_threads(SRV_WORKER, 1);
 
49
}