MySQL 9.0.0
Source Code Documentation
My_xp_thread_util Class Reference

#include <my_xp_thread.h>

Static Public Member Functions

static bool init ()
 Initialize a MySQL context on the invoking thread. More...
 
static void exit (void *value_ptr)
 Terminate invoking thread. More...
 
static int attr_init (native_thread_attr_t *attr)
 Initialize thread attributes object. More...
 
static int attr_destroy (native_thread_attr_t *attr)
 Destroy thread attributes object. More...
 
static native_thread_t self ()
 Retrieve current thread id. More...
 
static int equal (native_thread_t t1, native_thread_t t2)
 Compares two thread identifiers. More...
 
static int attr_setstacksize (native_thread_attr_t *attr, size_t stacksize)
 Sets the stack size attribute of the thread attributes object referred to by attr to the value specified in stacksize. More...
 
static int attr_getstacksize (native_thread_attr_t *attr, size_t *stacksize)
 Returns the stack size attribute of the thread attributes object referred to by attr in the buffer pointed to by stacksize. More...
 
static int attr_setdetachstate (native_thread_attr_t *attr, int detachstate)
 Sets the detach state attribute of the thread attributes object referred to by attr to the value specified in detachstate. More...
 
static void yield ()
 Causes the calling thread to relinquish the CPU, and to be moved to the end of the queue and another thread gets to run. More...
 

Member Function Documentation

◆ attr_destroy()

int My_xp_thread_util::attr_destroy ( native_thread_attr_t attr)
static

Destroy thread attributes object.

Parameters
attrthread attributes
Returns
success status

◆ attr_getstacksize()

int My_xp_thread_util::attr_getstacksize ( native_thread_attr_t attr,
size_t *  stacksize 
)
static

Returns the stack size attribute of the thread attributes object referred to by attr in the buffer pointed to by stacksize.

Parameters
attrthread attributes
stacksizepointer to attribute stack size returning placeholder
Return values
0on success
nonzeroerror number, on error

◆ attr_init()

int My_xp_thread_util::attr_init ( native_thread_attr_t attr)
static

Initialize thread attributes object.

Parameters
attrthread attributes
Returns
success status

◆ attr_setdetachstate()

int My_xp_thread_util::attr_setdetachstate ( native_thread_attr_t attr,
int  detachstate 
)
static

Sets the detach state attribute of the thread attributes object referred to by attr to the value specified in detachstate.

Parameters
attrthread attributes
detachstatedetermines if the thread is to be created in a joinable (MY_THREAD_CREATE_JOINABLE) or a detached state (MY_THREAD_CREATE_DETACHED)
Return values
0on success
nonzeroerror number, on error

◆ attr_setstacksize()

int My_xp_thread_util::attr_setstacksize ( native_thread_attr_t attr,
size_t  stacksize 
)
static

Sets the stack size attribute of the thread attributes object referred to by attr to the value specified in stacksize.

Parameters
attrthread attributes
stacksizenew attribute stack size
Return values
0on success
nonzeroerror number, on error

◆ equal()

int My_xp_thread_util::equal ( native_thread_t  t1,
native_thread_t  t2 
)
static

Compares two thread identifiers.

Parameters
t1identifier of one thread
t2identifier of another thread
Return values
0if ids are different
someother value if ids are equal

◆ exit()

void My_xp_thread_util::exit ( void *  value_ptr)
static

Terminate invoking thread.

Parameters
value_ptrthread exit value pointer

◆ init()

bool My_xp_thread_util::init ( )
static

Initialize a MySQL context on the invoking thread.

Returns
success status

◆ self()

native_thread_t My_xp_thread_util::self ( )
static

Retrieve current thread id.

Returns
current thread id

◆ yield()

void My_xp_thread_util::yield ( )
static

Causes the calling thread to relinquish the CPU, and to be moved to the end of the queue and another thread gets to run.


The documentation for this class was generated from the following files: