1
/*****************************************************************************
3
Copyright (C) 1995, 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
/**************************************************//**
20
@file include/thr0loc.h
21
The thread local storage
23
Created 10/5/1995 Heikki Tuuri
24
*******************************************************/
26
/* This module implements storage private to each thread,
27
a capability useful in some situations like storing the
28
OS handle to the current thread, or its priority. */
34
#include "os0thread.h"
36
/****************************************************************//**
37
Initializes the thread local storage module. */
42
/****************************************************************//**
43
Close the thread local storage module. */
46
thr_local_close(void);
48
/*******************************************************************//**
49
Creates a local storage struct for the calling new thread. */
52
thr_local_create(void);
53
/*==================*/
54
/*******************************************************************//**
55
Frees the local storage struct for the specified thread. */
60
os_thread_id_t id); /*!< in: thread id */
61
/*******************************************************************//**
62
Gets the slot number in the thread table of a thread.
63
@return slot number */
66
thr_local_get_slot_no(
67
/*==================*/
68
os_thread_id_t id); /*!< in: thread id of the thread */
69
/*******************************************************************//**
70
Sets in the local storage the slot number in the thread table of a thread. */
73
thr_local_set_slot_no(
74
/*==================*/
75
os_thread_id_t id, /*!< in: thread id of the thread */
76
ulint slot_no);/*!< in: slot number */
77
/*******************************************************************//**
78
Returns pointer to the 'in_ibuf' field within the current thread local
80
@return pointer to the in_ibuf field */
83
thr_local_get_in_ibuf_field(void);
84
/*=============================*/