1
/******************************************************
2
The thread local storage
6
Created 10/5/1995 Heikki Tuuri
7
*******************************************************/
9
/* This module implements storage private to each thread,
10
a capability useful in some situations like storing the
11
OS handle to the current thread, or its priority. */
17
#include "os0thread.h"
19
/********************************************************************
20
Initializes the thread local storage module. */
25
/***********************************************************************
26
Creates a local storage struct for the calling new thread. */
29
thr_local_create(void);
30
/*==================*/
31
/***********************************************************************
32
Frees the local storage struct for the specified thread. */
37
os_thread_id_t id); /* in: thread id */
38
/***********************************************************************
39
Gets the slot number in the thread table of a thread. */
42
thr_local_get_slot_no(
43
/*==================*/
44
/* out: slot number */
45
os_thread_id_t id); /* in: thread id of the thread */
46
/***********************************************************************
47
Sets in the local storage the slot number in the thread table of a thread. */
50
thr_local_set_slot_no(
51
/*==================*/
52
os_thread_id_t id, /* in: thread id of the thread */
53
ulint slot_no);/* in: slot number */
54
/***********************************************************************
55
Returns pointer to the 'in_ibuf' field within the current thread local
59
thr_local_get_in_ibuf_field(void);
60
/*=============================*/
61
/* out: pointer to the in_ibuf field */