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., 51 Franklin
15
St, Fifth Floor, Boston, MA 02110-1301 USA
17
*****************************************************************************/
19
/**************************************************//**
21
Server query execution
23
Created 6/5/1996 Heikki Tuuri
24
*******************************************************/
29
#include "sync0sync.h"
30
#include "os0thread.h"
34
/**********************************************************************//**
35
Enqueues a task to server task queue and releases a worker thread, if there
36
is a suspended one. */
39
srv_que_task_enqueue_low(
40
/*=====================*/
41
que_thr_t* thr) /*!< in: query thread */
44
ut_ad(mutex_own(&kernel_mutex));
46
UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr);
48
srv_release_threads(SRV_WORKER, 1);