Skip to content

File thread_entry.hpp

FileList > cubrid > src > thread > thread_entry.hpp

Go to the source code of this file

  • #include "error_context.hpp"
  • #include "lockfree_transaction_def.hpp"
  • #include "porting.h"
  • #include "system.h"
  • #include <atomic>
  • #include <thread>
  • #include <cassert>

Namespaces

Type Name
namespace cubbase
namespace cubload
namespace cubsync
namespace cubthread

Classes

Type Name
class entry
struct event_stat

Public Types

Type Name
typedef struct event_stat EVENT_STAT
typedef cubthread::entry THREAD_ENTRY
enum thread__entry_8hpp_1a19ec6beb56ffd72599a9e41ec1024563
typedef std::thread::id thread_id_t
enum thread_resume_suspend_status
enum thread_type

Public Functions

Type Name
void thread_check_suspend_reason_and_wakeup (cubthread::entry * thread_p, thread_resume_suspend_status resume_reason, thread_resume_suspend_status suspend_reason)
void thread_clear_recursion_depth (cubthread::entry * thread_p)
void thread_dec_recursion_depth (cubthread::entry * thread_p)
cubthread::entry * thread_get_main_thread (cubthread::entry * thread_p)
int thread_get_recursion_depth (cubthread::entry * thread_p)
bool thread_get_sort_stats_active (cubthread::entry * thread_p)
void thread_inc_recursion_depth (cubthread::entry * thread_p)
bool thread_is_on_trace (cubthread::entry * thread_p)
void thread_lock_entry (cubthread::entry * thread_p)
bool thread_need_clear_trace (cubthread::entry * thread_p)
const char * thread_resume_status_to_string (thread_resume_suspend_status resume_status)
void thread_set_clear_trace (cubthread::entry * thread_p, bool clear)
bool thread_set_sort_stats_active (cubthread::entry * thread_p, bool new_flag)
void thread_set_trace_format (cubthread::entry * thread_p, int format)
const char * thread_status_to_string (cubthread::entry::status status)
int thread_suspend_timeout_wakeup_and_unlock_entry (cubthread::entry * p, struct timespec * t, thread_resume_suspend_status suspended_reason)
void thread_suspend_wakeup_and_unlock_entry (cubthread::entry * p, thread_resume_suspend_status suspended_reason)
int thread_suspend_with_other_mutex (cubthread::entry * p, pthread_mutex_t * mutexp, int timeout, struct timespec * to, thread_resume_suspend_status suspended_reason)
void thread_trace_off (cubthread::entry * thread_p)
void thread_trace_on (cubthread::entry * thread_p)
const char * thread_type_to_string (thread_type type)
void thread_unlock_entry (cubthread::entry * thread_p)
void thread_wakeup (cubthread::entry * p, thread_resume_suspend_status resume_reason)
void thread_wakeup_already_had_mutex (cubthread::entry * p, thread_resume_suspend_status resume_reason)

Macros

Type Name
define NO_UNLOAD_PARALLEL_PROCESSIING (-1)
define THREAD_TS_COUNT THREAD\_TS\_LAST

Public Types Documentation

typedef EVENT_STAT

typedef struct event_stat EVENT_STAT;

typedef THREAD_ENTRY

typedef cubthread::entry THREAD_ENTRY;

enum thread__entry_8hpp_1a19ec6beb56ffd72599a9e41ec1024563

enum thread__entry_8hpp_1a19ec6beb56ffd72599a9e41ec1024563 {
    THREAD_TS_SPAGE_SAVING = 0,
    THREAD_TS_OBJ_LOCK_RES,
    THREAD_TS_OBJ_LOCK_ENT,
    THREAD_TS_CATALOG,
    THREAD_TS_SESSIONS,
    THREAD_TS_FREE_SORT_LIST,
    THREAD_TS_GLOBAL_UNIQUE_STATS,
    THREAD_TS_HFID_TABLE,
    THREAD_TS_XCACHE,
    THREAD_TS_FPCACHE,
    THREAD_TS_DWB_SLOTS,
    THREAD_TS_LAST
};

typedef thread_id_t

typedef std::thread::id thread_id_t;

enum thread_resume_suspend_status

enum thread_resume_suspend_status {
    THREAD_RESUME_NONE = 0,
    THREAD_RESUME_DUE_TO_INTERRUPT = 1,
    THREAD_RESUME_DUE_TO_SHUTDOWN = 2,
    THREAD_PGBUF_SUSPENDED = 3,
    THREAD_PGBUF_RESUMED = 4,
    THREAD_JOB_QUEUE_SUSPENDED = 5,
    THREAD_JOB_QUEUE_RESUMED = 6,
    THREAD_CSECT_READER_SUSPENDED = 7,
    THREAD_CSECT_READER_RESUMED = 8,
    THREAD_CSECT_WRITER_SUSPENDED = 9,
    THREAD_CSECT_WRITER_RESUMED = 10,
    THREAD_CSECT_PROMOTER_SUSPENDED = 11,
    THREAD_CSECT_PROMOTER_RESUMED = 12,
    THREAD_CSS_QUEUE_SUSPENDED = 13,
    THREAD_CSS_QUEUE_RESUMED = 14,
    THREAD_HEAP_CLSREPR_SUSPENDED = 15,
    THREAD_HEAP_CLSREPR_RESUMED = 16,
    THREAD_LOCK_SUSPENDED = 17,
    THREAD_LOCK_RESUMED = 18,
    THREAD_LOGWR_SUSPENDED = 19,
    THREAD_LOGWR_RESUMED = 20,
    THREAD_ALLOC_BCB_SUSPENDED = 21,
    THREAD_ALLOC_BCB_RESUMED = 22,
    THREAD_DWB_QUEUE_SUSPENDED = 23,
    THREAD_DWB_QUEUE_RESUMED = 24
};

enum thread_type

enum thread_type {
    TT_MASTER,
    TT_SERVER,
    TT_WORKER,
    TT_DAEMON,
    TT_LOADDB,
    TT_VACUUM_MASTER,
    TT_VACUUM_WORKER,
    TT_RECOVERY,
    TT_NONE
};

Public Functions Documentation

function thread_check_suspend_reason_and_wakeup

void thread_check_suspend_reason_and_wakeup (
    cubthread::entry * thread_p,
    thread_resume_suspend_status resume_reason,
    thread_resume_suspend_status suspend_reason
) 

function thread_clear_recursion_depth

inline void thread_clear_recursion_depth (
    cubthread::entry * thread_p
) 

function thread_dec_recursion_depth

inline void thread_dec_recursion_depth (
    cubthread::entry * thread_p
) 

function thread_get_main_thread

inline cubthread::entry * thread_get_main_thread (
    cubthread::entry * thread_p
) 

function thread_get_recursion_depth

inline int thread_get_recursion_depth (
    cubthread::entry * thread_p
) 

function thread_get_sort_stats_active

inline bool thread_get_sort_stats_active (
    cubthread::entry * thread_p
) 

function thread_inc_recursion_depth

inline void thread_inc_recursion_depth (
    cubthread::entry * thread_p
) 

function thread_is_on_trace

inline bool thread_is_on_trace (
    cubthread::entry * thread_p
) 

function thread_lock_entry

inline void thread_lock_entry (
    cubthread::entry * thread_p
) 

function thread_need_clear_trace

inline bool thread_need_clear_trace (
    cubthread::entry * thread_p
) 

function thread_resume_status_to_string

const  char * thread_resume_status_to_string (
    thread_resume_suspend_status resume_status
) 

function thread_set_clear_trace

inline void thread_set_clear_trace (
    cubthread::entry * thread_p,
    bool clear
) 

function thread_set_sort_stats_active

inline bool thread_set_sort_stats_active (
    cubthread::entry * thread_p,
    bool new_flag
) 

function thread_set_trace_format

inline void thread_set_trace_format (
    cubthread::entry * thread_p,
    int format
) 

function thread_status_to_string

const  char * thread_status_to_string (
    cubthread::entry::status status
) 

function thread_suspend_timeout_wakeup_and_unlock_entry

int thread_suspend_timeout_wakeup_and_unlock_entry (
    cubthread::entry * p,
    struct  timespec * t,
    thread_resume_suspend_status suspended_reason
) 

function thread_suspend_wakeup_and_unlock_entry

void thread_suspend_wakeup_and_unlock_entry (
    cubthread::entry * p,
    thread_resume_suspend_status suspended_reason
) 

function thread_suspend_with_other_mutex

int thread_suspend_with_other_mutex (
    cubthread::entry * p,
    pthread_mutex_t * mutexp,
    int timeout,
    struct  timespec * to,
    thread_resume_suspend_status suspended_reason
) 

function thread_trace_off

inline void thread_trace_off (
    cubthread::entry * thread_p
) 

function thread_trace_on

inline void thread_trace_on (
    cubthread::entry * thread_p
) 

function thread_type_to_string

const  char * thread_type_to_string (
    thread_type type
) 

function thread_unlock_entry

inline void thread_unlock_entry (
    cubthread::entry * thread_p
) 

function thread_wakeup

void thread_wakeup (
    cubthread::entry * p,
    thread_resume_suspend_status resume_reason
) 

function thread_wakeup_already_had_mutex

void thread_wakeup_already_had_mutex (
    cubthread::entry * p,
    thread_resume_suspend_status resume_reason
) 

Macro Definition Documentation

define NO_UNLOAD_PARALLEL_PROCESSIING

#define NO_UNLOAD_PARALLEL_PROCESSIING `(-1)`

define THREAD_TS_COUNT

#define THREAD_TS_COUNT `THREAD_TS_LAST`


The documentation for this class was generated from the following file cubrid/src/thread/thread_entry.hpp