Skip to content

File util_func.h

FileList > base > util_func.h

Go to the source code of this file

  • #include <sys/types.h>
  • #include <math.h>
  • #include <time.h>

Public Types

Type Name
typedef void(* SIG_HANDLER

Public Functions

Type Name
unsigned int hashpjw (const char * s)
void util_arm_signal_handlers (SIG_HANDLER DB_INT32_handler, SIG_HANDLER quit_handler)
int util_bsearch (const void * key, const void * base, int n_elems, unsigned int sizeof_elem, int(*)(const void *, const void *) func_compare, bool * out_found)
int util_compare_filepath (const char * file1, const char * file2)
void util_disarm_signal_handlers (void)
void util_free_string_array (char ** array)
void util_get_second_and_ms_since_epoch (time_t * secs, int * msec)
int util_log_write_command (int argc, char * argv, int util_name_pos)
int util_log_write_errid (int message_id, ...)
int util_log_write_errstr (const char * format, ...)
int util_log_write_result (int error)
int util_log_write_warnstr (const char * format, ...)
void util_shuffle_string_array (char ** array, int count)
char ** util_split_string (const char * str, const char * delim)
time_t util_str_to_time_since_epoch (char * str)

Macros

Type Name
define PRINT_AND_LOG_ERR_MSG (...) /* multi line expression */
define SLEEP_MILISEC (sec, msec) /* multi line expression */
define UTIL_PID_ENVVAR_NAME "UTIL\_PID"
define UTIL_infinity () ([**HUGE\_VAL**](broker__monitor_8c.md#function-timeout))

Public Types Documentation

typedef SIG_HANDLER

typedef void(* SIG_HANDLER) (void);

Public Functions Documentation

function hashpjw

unsigned  int hashpjw (
    const  char * s
) 

function util_arm_signal_handlers

void util_arm_signal_handlers (
    SIG_HANDLER DB_INT32_handler,
    SIG_HANDLER quit_handler
) 

function util_bsearch

int util_bsearch (
    const  void * key,
    const  void * base,
    int n_elems,
    unsigned  int sizeof_elem,
    int (*)( const  void *, const  void *) func_compare,
    bool * out_found
) 

function util_compare_filepath

int util_compare_filepath (
    const  char * file1,
    const  char * file2
) 

function util_disarm_signal_handlers

void util_disarm_signal_handlers (
    void
) 

function util_free_string_array

void util_free_string_array (
    char ** array
) 

function util_get_second_and_ms_since_epoch

void util_get_second_and_ms_since_epoch (
    time_t * secs,
    int * msec
) 

function util_log_write_command

int util_log_write_command (
    int argc,
    char * argv,
    int util_name_pos
) 

function util_log_write_errid

int util_log_write_errid (
    int message_id,
    ...
) 

function util_log_write_errstr

int util_log_write_errstr (
    const  char * format,
    ...
) 

function util_log_write_result

int util_log_write_result (
    int error
) 

function util_log_write_warnstr

int util_log_write_warnstr (
    const  char * format,
    ...
) 

function util_shuffle_string_array

void util_shuffle_string_array (
    char ** array,
    int count
) 

function util_split_string

char ** util_split_string (
    const  char * str,
    const  char * delim
) 

function util_str_to_time_since_epoch

time_t util_str_to_time_since_epoch (
    char * str
) 

Macro Definition Documentation

define PRINT_AND_LOG_ERR_MSG

#define PRINT_AND_LOG_ERR_MSG (
    ...
) `/* multi line expression */`

define SLEEP_MILISEC

#define SLEEP_MILISEC (
    sec,
    msec
) `/* multi line expression */`

define UTIL_PID_ENVVAR_NAME

#define UTIL_PID_ENVVAR_NAME `"UTIL_PID"`

define UTIL_infinity

#define UTIL_infinity (

) `( HUGE_VAL )`


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