Skip to content

File critical_section.h

FileList > cubrid > src > thread > critical_section.h

Go to the source code of this file

  • #include "dbtype_def.h"
  • #include "porting.h"
  • #include "thread_compat.hpp"
  • #include <pthread.h>
  • #include <sys/time.h>

Classes

Type Name
struct sync_critical_section
struct sync_rmutex
struct sync_rwlock
struct sync_stats

Public Types

Type Name
typedef struct sync_critical_section SYNC_CRITICAL_SECTION
enum SYNC_PRIMITIVE_TYPE
typedef struct sync_rmutex SYNC_RMUTEX
typedef struct sync_rwlock SYNC_RWLOCK
typedef struct sync_stats SYNC_STATS
enum critical__section_8h_1a755c96456945ef03bae544705e8cca64
enum critical__section_8h_1abc1a2abf1bf92c4036064143db1c8210

Public Static Attributes

Type Name
const int CRITICAL_SECTION_COUNT = [**STATIC\_CAST**](porting_8h.md#define-static_cast) ([**int**](broker__monitor_8c.md#function-timeout), CSECT\_LAST)

Public Functions

Type Name
int csect_check_own (THREAD_ENTRY * thread_p, int cs_index)
int csect_demote (THREAD_ENTRY * thread_p, int cs_index, int wait_secs)
void csect_dump_statistics (FILE * fp)
int csect_enter (THREAD_ENTRY * thread_p, int cs_index, int wait_secs)
int csect_enter_as_reader (THREAD_ENTRY * thread_p, int cs_index, int wait_secs)
int csect_enter_critical_section (THREAD_ENTRY * thread_p, SYNC_CRITICAL_SECTION * cs_ptr, int wait_secs)
int csect_enter_critical_section_as_reader (THREAD_ENTRY * thread_p, SYNC_CRITICAL_SECTION * cs_ptr, int wait_secs)
int csect_exit (THREAD_ENTRY * thread_p, int cs_index)
int csect_exit_critical_section (THREAD_ENTRY * thread_p, SYNC_CRITICAL_SECTION * cs_ptr)
int csect_finalize_critical_section (SYNC_CRITICAL_SECTION * cs_ptr)
int csect_finalize_static_critical_sections (void)
int csect_initialize_critical_section (SYNC_CRITICAL_SECTION * cs_ptr, const char * name)
int csect_initialize_static_critical_sections (void)
const char * csect_name_at (int cs_index)
int csect_promote (THREAD_ENTRY * thread_p, int cs_index, int wait_secs)
int csect_start_scan (THREAD_ENTRY * thread_p, int show_type, DB_VALUE ** arg_values, int arg_cnt, void ** ctx)
void rmutex_dump_statistics (FILE * fp)
int rmutex_finalize (SYNC_RMUTEX * rmutex)
int rmutex_initialize (SYNC_RMUTEX * rmutex, const char * name)
int rmutex_lock (THREAD_ENTRY * thread_p, SYNC_RMUTEX * rmutex)
int rmutex_unlock (THREAD_ENTRY * thread_p, SYNC_RMUTEX * rmutex)
void rwlock_dump_statistics (FILE * fp)
int rwlock_finalize (SYNC_RWLOCK * rwlock)
int rwlock_initialize (SYNC_RWLOCK * rwlock, const char * name)
int rwlock_read_lock (SYNC_RWLOCK * rwlock)
int rwlock_read_unlock (SYNC_RWLOCK * rwlock)
int rwlock_write_lock (SYNC_RWLOCK * rwlock)
int rwlock_write_unlock (SYNC_RWLOCK * rwlock)
void sync_dump_statistics (FILE * fp, SYNC_PRIMITIVE_TYPE type)
int sync_finalize_sync_stats (void)
int sync_initialize_sync_stats (void)

Public Types Documentation

typedef SYNC_CRITICAL_SECTION

typedef struct sync_critical_section SYNC_CRITICAL_SECTION;

enum SYNC_PRIMITIVE_TYPE

enum SYNC_PRIMITIVE_TYPE {
    SYNC_TYPE_NONE,
    SYNC_TYPE_CSECT,
    SYNC_TYPE_RWLOCK,
    SYNC_TYPE_RMUTEX,
    SYNC_TYPE_MUTEX,
    SYNC_TYPE_LAST = SYNC_TYPE_MUTEX,
    SYNC_TYPE_COUNT = SYNC_TYPE_LAST,
    SYNC_TYPE_ALL = SYNC_TYPE_LAST
};

typedef SYNC_RMUTEX

typedef struct sync_rmutex SYNC_RMUTEX;

typedef SYNC_RWLOCK

typedef struct sync_rwlock SYNC_RWLOCK;

typedef SYNC_STATS

typedef struct sync_stats SYNC_STATS;

enum critical__section_8h_1a755c96456945ef03bae544705e8cca64

enum critical__section_8h_1a755c96456945ef03bae544705e8cca64 {
    INF_WAIT = -1,
    NOT_WAIT = 0
};

enum critical__section_8h_1abc1a2abf1bf92c4036064143db1c8210

enum critical__section_8h_1abc1a2abf1bf92c4036064143db1c8210 {
    CSECT_WFG = 0,
    CSECT_LOG,
    CSECT_LOCATOR_SR_CLASSNAME_TABLE,
    CSECT_QPROC_QUERY_TABLE,
    CSECT_QPROC_LIST_CACHE,
    CSECT_DISK_CHECK,
    CSECT_CNV_FMT_LEXER,
    CSECT_HEAP_CHNGUESS,
    CSECT_TRAN_TABLE,
    CSECT_CT_OID_TABLE,
    CSECT_HA_SERVER_STATE,
    CSECT_COMPACTDB_ONE_INSTANCE,
    CSECT_ACL,
    CSECT_PARTITION_CACHE,
    CSECT_EVENT_LOG_FILE,
    CSECT_TRACE_LOG_FILE,
    CSECT_LOG_ARCHIVE,
    CSECT_ACCESS_STATUS,
    CSECT_LAST
};

Public Static Attributes Documentation

variable CRITICAL_SECTION_COUNT

const int CRITICAL_SECTION_COUNT;

Public Functions Documentation

function csect_check_own

int csect_check_own (
    THREAD_ENTRY * thread_p,
    int cs_index
) 

function csect_demote

int csect_demote (
    THREAD_ENTRY * thread_p,
    int cs_index,
    int wait_secs
) 

function csect_dump_statistics

void csect_dump_statistics (
    FILE * fp
) 

function csect_enter

int csect_enter (
    THREAD_ENTRY * thread_p,
    int cs_index,
    int wait_secs
) 

function csect_enter_as_reader

int csect_enter_as_reader (
    THREAD_ENTRY * thread_p,
    int cs_index,
    int wait_secs
) 

function csect_enter_critical_section

int csect_enter_critical_section (
    THREAD_ENTRY * thread_p,
    SYNC_CRITICAL_SECTION * cs_ptr,
    int wait_secs
) 

function csect_enter_critical_section_as_reader

int csect_enter_critical_section_as_reader (
    THREAD_ENTRY * thread_p,
    SYNC_CRITICAL_SECTION * cs_ptr,
    int wait_secs
) 

function csect_exit

int csect_exit (
    THREAD_ENTRY * thread_p,
    int cs_index
) 

function csect_exit_critical_section

int csect_exit_critical_section (
    THREAD_ENTRY * thread_p,
    SYNC_CRITICAL_SECTION * cs_ptr
) 

function csect_finalize_critical_section

int csect_finalize_critical_section (
    SYNC_CRITICAL_SECTION * cs_ptr
) 

function csect_finalize_static_critical_sections

int csect_finalize_static_critical_sections (
    void
) 

function csect_initialize_critical_section

int csect_initialize_critical_section (
    SYNC_CRITICAL_SECTION * cs_ptr,
    const  char * name
) 

function csect_initialize_static_critical_sections

int csect_initialize_static_critical_sections (
    void
) 

function csect_name_at

const  char * csect_name_at (
    int cs_index
) 

function csect_promote

int csect_promote (
    THREAD_ENTRY * thread_p,
    int cs_index,
    int wait_secs
) 

function csect_start_scan

int csect_start_scan (
    THREAD_ENTRY * thread_p,
    int show_type,
    DB_VALUE ** arg_values,
    int arg_cnt,
    void ** ctx
) 

function rmutex_dump_statistics

void rmutex_dump_statistics (
    FILE * fp
) 

function rmutex_finalize

int rmutex_finalize (
    SYNC_RMUTEX * rmutex
) 

function rmutex_initialize

int rmutex_initialize (
    SYNC_RMUTEX * rmutex,
    const  char * name
) 

function rmutex_lock

int rmutex_lock (
    THREAD_ENTRY * thread_p,
    SYNC_RMUTEX * rmutex
) 

function rmutex_unlock

int rmutex_unlock (
    THREAD_ENTRY * thread_p,
    SYNC_RMUTEX * rmutex
) 

function rwlock_dump_statistics

void rwlock_dump_statistics (
    FILE * fp
) 

function rwlock_finalize

int rwlock_finalize (
    SYNC_RWLOCK * rwlock
) 

function rwlock_initialize

int rwlock_initialize (
    SYNC_RWLOCK * rwlock,
    const  char * name
) 

function rwlock_read_lock

int rwlock_read_lock (
    SYNC_RWLOCK * rwlock
) 

function rwlock_read_unlock

int rwlock_read_unlock (
    SYNC_RWLOCK * rwlock
) 

function rwlock_write_lock

int rwlock_write_lock (
    SYNC_RWLOCK * rwlock
) 

function rwlock_write_unlock

int rwlock_write_unlock (
    SYNC_RWLOCK * rwlock
) 

function sync_dump_statistics

void sync_dump_statistics (
    FILE * fp,
    SYNC_PRIMITIVE_TYPE type
) 

function sync_finalize_sync_stats

int sync_finalize_sync_stats (
    void
) 

function sync_initialize_sync_stats

int sync_initialize_sync_stats (
    void
) 


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