CUBRID Engine  latest
thread_entry.cpp File Reference
#include "thread_entry.hpp"
#include "adjustable_array.h"
#include "critical_section.h"
#include "critical_section_tracker.hpp"
#include "error_manager.h"
#include "fault_injection.h"
#include "list_file.h"
#include "lock_free.h"
#include "lockfree_transaction_system.hpp"
#include "log_compress.h"
#include "log_system_tran.hpp"
#include "memory_alloc.h"
#include "page_buffer.h"
#include "resource_tracker.hpp"
#include <cstring>
#include <sstream>
#include <pthread.h>
Include dependency graph for thread_entry.cpp:

Go to the source code of this file.

Namespaces

 cubthread
 

Typedefs

using thread_clock_type = std::chrono::system_clock
 

Functions

static void thread_wakeup_internal (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, bool had_mutex)
 
static void thread_check_suspend_reason_and_wakeup_internal (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason, thread_resume_suspend_status suspend_reason, bool had_mutex)
 
static void thread_timeval_add_usec (const std::chrono::microseconds &usec, struct timeval &tv)
 
void thread_suspend_wakeup_and_unlock_entry (cubthread::entry *thread_p, thread_resume_suspend_status suspended_reason)
 
int thread_suspend_timeout_wakeup_and_unlock_entry (cubthread::entry *thread_p, struct timespec *time_p, thread_resume_suspend_status suspended_reason)
 
void thread_wakeup (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason)
 
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_wakeup_already_had_mutex (cubthread::entry *thread_p, thread_resume_suspend_status resume_reason)
 
int thread_suspend_with_other_mutex (cubthread::entry *thread_p, pthread_mutex_t *mutex_p, int timeout, struct timespec *to, thread_resume_suspend_status suspended_reason)
 
const char * thread_type_to_string (thread_type type)
 
const char * thread_status_to_string (cubthread::entry::status status)
 
const char * thread_resume_status_to_string (thread_resume_suspend_status resume_status)
 

Variables

static const bool cubthread::ENABLE_TRACKERS
 
const char * cubthread::ALLOC_TRACK_NAME = "Virtual Memory"
 
const char * cubthread::ALLOC_TRACK_RES_NAME = "res_ptr"
 
const std::size_t cubthread::ALLOC_TRACK_MAX_ITEMS = 32767
 
const char * cubthread::PGBUF_TRACK_NAME = "Page Buffer"
 
const char * cubthread::PGBUF_TRACK_RES_NAME = "pgptr"
 
const std::size_t cubthread::PGBUF_TRACK_MAX_ITEMS = 1024
 
const unsigned cubthread::PGBUF_TRACK_MAX_AMOUNT = 16
 

Typedef Documentation

using thread_clock_type = std::chrono::system_clock

Definition at line 430 of file thread_entry.cpp.

Function Documentation

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

Definition at line 610 of file thread_entry.cpp.

References thread_check_suspend_reason_and_wakeup_internal().

Referenced by css_stop_log_writer(), and thread_unlock_entry().

Here is the caller graph for this function:

static void thread_check_suspend_reason_and_wakeup_internal ( cubthread::entry thread_p,
thread_resume_suspend_status  resume_reason,
thread_resume_suspend_status  suspend_reason,
bool  had_mutex 
)
static

Definition at line 575 of file thread_entry.cpp.

References cubthread::entry::resume_status, thread_lock_entry(), thread_unlock_entry(), and cubthread::entry::wakeup_cond.

Referenced by thread_check_suspend_reason_and_wakeup().

Here is the caller graph for this function:

const char* thread_status_to_string ( cubthread::entry::status  status)
static void thread_timeval_add_usec ( const std::chrono::microseconds &  usec,
struct timeval &  tv 
)
static

Definition at line 441 of file thread_entry.cpp.

References ratio.

Referenced by thread_suspend_wakeup_and_unlock_entry().

Here is the caller graph for this function:

const char* thread_type_to_string ( thread_type  type)

Definition at line 692 of file thread_entry.cpp.

References TT_DAEMON, TT_LOADDB, TT_MASTER, TT_NONE, TT_SERVER, TT_VACUUM_MASTER, TT_VACUUM_WORKER, and TT_WORKER.

Referenced by showstmt_array_end_scan(), and thread_unlock_entry().

Here is the caller graph for this function:

void thread_wakeup ( cubthread::entry thread_p,
thread_resume_suspend_status  resume_reason 
)
void thread_wakeup_already_had_mutex ( cubthread::entry thread_p,
thread_resume_suspend_status  resume_reason 
)
static void thread_wakeup_internal ( cubthread::entry thread_p,
thread_resume_suspend_status  resume_reason,
bool  had_mutex 
)
static

Definition at line 550 of file thread_entry.cpp.

References cubthread::entry::resume_status, thread_lock_entry(), thread_unlock_entry(), and cubthread::entry::wakeup_cond.

Referenced by thread_wakeup(), and thread_wakeup_already_had_mutex().

Here is the caller graph for this function: