Drizzled Public API Documentation

thr0loc.h File Reference
#include "univ.i"
#include "os0thread.h"

Go to the source code of this file.

Functions

UNIV_INTERN void thr_local_init (void)
UNIV_INTERN void thr_local_close (void)
UNIV_INTERN void thr_local_create (void)
UNIV_INTERN void thr_local_free (os_thread_id_t id)
UNIV_INTERN ulint thr_local_get_slot_no (os_thread_id_t id)
UNIV_INTERN void thr_local_set_slot_no (os_thread_id_t id, ulint slot_no)
UNIV_INTERN ibool * thr_local_get_in_ibuf_field (void)

Detailed Description

The thread local storage

Created 10/5/1995 Heikki Tuuri

Definition in file thr0loc.h.

Function Documentation

UNIV_INTERN void thr_local_close ( void  )

Close the thread local storage module.

Definition at line 281 of file thr0loc.cc.

References HASH_GET_FIRST, hash_get_n_cells(), HASH_GET_NEXT, thr_local_struct::magic_n, mem_free, thr_local_close(), ut_a, and ut_ad.

Referenced by innobase_shutdown_for_mysql(), and thr_local_close().

UNIV_INTERN void thr_local_create ( void  )
UNIV_INTERN void thr_local_free ( os_thread_id_t  id)

Frees the local storage struct for the specified thread. in: thread id

Frees the local storage struct for the specified thread.

Parameters
idin: thread id

Definition at line 231 of file thr0loc.cc.

References HASH_DELETE, HASH_SEARCH, thr_local_struct::id, thr_local_struct::magic_n, mem_free, os_thread_eq(), os_thread_pf(), thr_local_free(), ut_a, and ut_ad.

Referenced by InnobaseEngine::close_connection(), srv_purge_thread(), and thr_local_free().

UNIV_INTERN ibool* thr_local_get_in_ibuf_field ( void  )

Returns pointer to the 'in_ibuf' field within the current thread local storage.

Returns
pointer to the in_ibuf field

Definition at line 183 of file thr0loc.cc.

References thr_local_struct::in_ibuf, os_thread_get_curr_id(), and thr_local_get_in_ibuf_field().

Referenced by ibuf_inside(), and thr_local_get_in_ibuf_field().

UNIV_INTERN ulint thr_local_get_slot_no ( os_thread_id_t  id)

Gets the slot number in the thread table of a thread.

Returns
slot number in: thread id of the thread

Gets the slot number in the thread table of a thread.

Returns
slot number
Parameters
idin: thread id of the thread

Definition at line 139 of file thr0loc.cc.

References thr_local_struct::slot_no, and thr_local_get_slot_no().

Referenced by srv_get_thread_type(), and thr_local_get_slot_no().

UNIV_INTERN void thr_local_init ( void  )

Initializes the thread local storage module.

Definition at line 265 of file thr0loc.cc.

References thr_local_init(), and ut_a.

Referenced by srv_general_init(), thr_local_create(), and thr_local_init().

UNIV_INTERN void thr_local_set_slot_no ( os_thread_id_t  id,
ulint  slot_no 
)

Sets in the local storage the slot number in the thread table of a thread. in: slot number

Sets the slot number in the thread table of a thread.

Parameters
idin: thread id of the thread
slot_noin: slot number

Definition at line 161 of file thr0loc.cc.

References thr_local_struct::slot_no, and thr_local_set_slot_no().

Referenced by thr_local_set_slot_no().