MIDAS
|
Classes | |
struct | FL_PARAM |
struct | suspend_struct |
Macros | |
#define | bin_to_ascii(c) ((c)>=38?((c)-38+'a'):(c)>=12?((c)-12+'A'):(c)+'.') |
#define | N_STACK_HISTORY 500 |
Typedefs | |
typedef struct suspend_struct | SUSPEND_STRUCT |
Variables | ||
struct { | ||
char c | ||
double d | ||
} | test_align | |
struct { | ||
double d | ||
char c | ||
} | test_padding | |
static BOOL | _daemon_flag | |
static std::atomic_bool | s_semaphore_trace {false} | |
static std::atomic_int | s_semaphore_nest_level {0} | |
static std::mutex | gTzMutex | |
void(* | MidasExceptionHandler )(void) | |
static std::vector< SUSPEND_STRUCT * > | _ss_suspend_vector | |
static midas_thread_t | _ss_odb_thread = 0 | |
static SUSPEND_STRUCT * | _ss_suspend_odb = NULL | |
static midas_thread_t | _ss_listen_thread = 0 | |
static int | _ss_server_listen_socket = 0 | |
static int | _ss_client_listen_socket = 0 | |
static midas_thread_t | _ss_client_thread = 0 | |
static RPC_SERVER_CONNECTION * | _ss_client_connection = NULL | |
static midas_thread_t | _ss_server_thread = 0 | |
static RPC_SERVER_ACCEPTION_LIST * | _ss_server_acceptions = NULL | |
static bool | gSocketTrace = false | |
char | stack_history [N_STACK_HISTORY][80] | |
int | stack_history_pointer = -1 | |
dox
Definition at line 7889 of file system.cxx.
#define N_STACK_HISTORY 500 |
Definition at line 7990 of file system.cxx.
Definition at line 168 of file system.cxx.
Definition at line 80 of file system.cxx.
Definition at line 5393 of file system.cxx.
Definition at line 5448 of file system.cxx.
Definition at line 5556 of file system.cxx.
Definition at line 16136 of file midas.cxx.
Definition at line 5279 of file system.cxx.
Definition at line 3737 of file system.cxx.
std::string EXPRT ss_asctime | ( | ) |
Definition at line 3549 of file system.cxx.
Definition at line 7299 of file system.cxx.
Definition at line 7891 of file system.cxx.
Definition at line 3899 of file system.cxx.
Definition at line 2001 of file system.cxx.
Definition at line 7186 of file system.cxx.
Definition at line 6796 of file system.cxx.
Definition at line 6814 of file system.cxx.
Definition at line 7811 of file system.cxx.
Definition at line 7847 of file system.cxx.
Definition at line 6872 of file system.cxx.
Definition at line 6890 of file system.cxx.
Definition at line 6620 of file system.cxx.
Definition at line 7048 of file system.cxx.
bool ss_event_socket_has_data | ( | ) |
Definition at line 4520 of file system.cxx.
Definition at line 3844 of file system.cxx.
Definition at line 2132 of file system.cxx.
Definition at line 2237 of file system.cxx.
Definition at line 2068 of file system.cxx.
Definition at line 7219 of file system.cxx.
Definition at line 7118 of file system.cxx.
Definition at line 6713 of file system.cxx.
Definition at line 6731 of file system.cxx.
Definition at line 7154 of file system.cxx.
Definition at line 6952 of file system.cxx.
Definition at line 6972 of file system.cxx.
Definition at line 7010 of file system.cxx.
std::string ss_get_executable | ( | void | ) |
Definition at line 1488 of file system.cxx.
Definition at line 1319 of file system.cxx.
Definition at line 1345 of file system.cxx.
Definition at line 7503 of file system.cxx.
std::string EXPRT ss_getcwd | ( | ) |
Definition at line 5770 of file system.cxx.
std::string ss_gethostname | ( | ) |
Definition at line 5706 of file system.cxx.
Definition at line 5740 of file system.cxx.
Definition at line 7440 of file system.cxx.
Definition at line 1377 of file system.cxx.
Definition at line 7770 of file system.cxx.
midas_thread_t EXPRT ss_gettid | ( | void | ) |
Definition at line 1519 of file system.cxx.
Definition at line 8068 of file system.cxx.
Definition at line 7966 of file system.cxx.
Definition at line 7961 of file system.cxx.
Definition at line 3664 of file system.cxx.
Definition at line 1471 of file system.cxx.
|
static |
Definition at line 3993 of file system.cxx.
Returns the actual time in milliseconds with an arbitrary origin. This time may only be used to calculate relative times.
Overruns in the 32 bit value don't hurt since in a subtraction calculated with 32 bit accuracy this overrun cancels (you may think about!)..
Definition at line 3393 of file system.cxx.
Definition at line 3365 of file system.cxx.
Definition at line 2941 of file system.cxx.
Definition at line 3211 of file system.cxx.
Definition at line 3157 of file system.cxx.
Definition at line 3037 of file system.cxx.
Definition at line 1440 of file system.cxx.
Definition at line 7382 of file system.cxx.
INT EXPRT ss_recv_net_command | ( | int | sock, |
DWORD * | routine_id, | ||
DWORD * | param_size, | ||
char ** | param_ptr, | ||
int | timeout_ms | ||
) |
Definition at line 5629 of file system.cxx.
Definition at line 8151 of file system.cxx.
bool ss_repair_utf8 | ( | std::string & | s | ) |
Definition at line 8247 of file system.cxx.
Definition at line 2212 of file system.cxx.
Definition at line 4844 of file system.cxx.
Definition at line 2460 of file system.cxx.
Definition at line 2869 of file system.cxx.
Definition at line 2781 of file system.cxx.
Definition at line 2639 of file system.cxx.
Definition at line 7349 of file system.cxx.
Definition at line 3475 of file system.cxx.
Definition at line 1760 of file system.cxx.
Definition at line 755 of file system.cxx.
Definition at line 909 of file system.cxx.
INT ss_shm_flush | ( | const char * | name, |
const void * | adr, | ||
size_t | size, | ||
HNDLE | handle, | ||
bool | wait_for_thread | ||
) |
Definition at line 1176 of file system.cxx.
Definition at line 1136 of file system.cxx.
|
static |
Definition at line 230 of file system.cxx.
INT ss_shm_open | ( | const char * | name, |
INT | size, | ||
void ** | adr, | ||
size_t * | shm_size, | ||
HNDLE * | handle, | ||
BOOL | get_size | ||
) |
Definition at line 324 of file system.cxx.
Definition at line 1003 of file system.cxx.
INT ss_shm_unprotect | ( | HNDLE | handle, |
void ** | adr, | ||
size_t | shm_size, | ||
BOOL | read, | ||
BOOL | write, | ||
const char * | caller_name | ||
) |
Definition at line 1060 of file system.cxx.
Suspend the calling process for a certain time.
The function is similar to the sleep() function, but has a resolution of one milliseconds. Under VxWorks the resolution is 1/60 of a second. It uses the socket select() function with a time-out. See examples in ss_time()
millisec | Time in milliseconds to sleep. Zero means infinite (until another process calls ss_wake) |
Definition at line 3628 of file system.cxx.
Definition at line 4493 of file system.cxx.
Definition at line 5225 of file system.cxx.
INT EXPRT ss_socket_connect_tcp | ( | const char * | hostname, |
int | tcp_port, | ||
int * | sockp, | ||
std::string * | error_msg_p | ||
) |
Definition at line 4967 of file system.cxx.
Definition at line 5240 of file system.cxx.
INT EXPRT ss_socket_listen_tcp | ( | bool | listen_localhost, |
int | tcp_port, | ||
int * | sockp, | ||
int * | tcp_port_p, | ||
std::string * | error_msg_p | ||
) |
Definition at line 5062 of file system.cxx.
Definition at line 4898 of file system.cxx.
Definition at line 1630 of file system.cxx.
Definition at line 7994 of file system.cxx.
Definition at line 8044 of file system.cxx.
Definition at line 8022 of file system.cxx.
Definition at line 4543 of file system.cxx.
|
static |
Definition at line 4207 of file system.cxx.
INT ss_suspend_exit | ( | ) |
Definition at line 4226 of file system.cxx.
INT ss_suspend_get_buffer_port | ( | midas_thread_t | thread_id, |
INT * | port | ||
) |
Definition at line 4353 of file system.cxx.
Definition at line 4327 of file system.cxx.
SUSPEND_STRUCT * ss_suspend_get_struct | ( | midas_thread_t | thread_id | ) |
Definition at line 4165 of file system.cxx.
INT ss_suspend_init_odb_port | ( | ) |
Definition at line 4305 of file system.cxx.
|
static |
Definition at line 4012 of file system.cxx.
Definition at line 4386 of file system.cxx.
INT ss_suspend_set_client_connection | ( | RPC_SERVER_CONNECTION * | connection | ) |
Definition at line 4291 of file system.cxx.
Definition at line 4284 of file system.cxx.
INT ss_suspend_set_rpc_thread | ( | midas_thread_t | thread_id | ) |
Definition at line 4002 of file system.cxx.
INT ss_suspend_set_server_acceptions | ( | RPC_SERVER_ACCEPTION_LIST * | acceptions | ) |
Definition at line 4298 of file system.cxx.
Definition at line 4277 of file system.cxx.
Execute command in a separate process, close all open file descriptors invoke ss_exec() and ignore pid.
command | Command to execute. |
Definition at line 2116 of file system.cxx.
Definition at line 5902 of file system.cxx.
Definition at line 6232 of file system.cxx.
Definition at line 6568 of file system.cxx.
Definition at line 6456 of file system.cxx.
Definition at line 5811 of file system.cxx.
Definition at line 6092 of file system.cxx.
Definition at line 6348 of file system.cxx.
Definition at line 6292 of file system.cxx.
Definition at line 6400 of file system.cxx.
Definition at line 5946 of file system.cxx.
Definition at line 6512 of file system.cxx.
Definition at line 6032 of file system.cxx.
Definition at line 6166 of file system.cxx.
midas_thread_t EXPRT ss_thread_create | ( | INT(*)(void *) | thread_func, |
void * | param | ||
) |
Creates and returns a new thread of execution.
Note the difference when calling from vxWorks versus Linux and Windows. The parameter pointer for a vxWorks call is a VX_TASK_SPAWN structure, whereas for Linux and Windows it is a void pointer. Early versions returned SS_SUCCESS or SS_NO_THREAD instead of thread ID.
Example for VxWorks
Example for Linux
(*thread_func) | Thread function to create. |
param | a pointer to a VX_TASK_SPAWN structure for vxWorks and a void pointer for Unix and Windows |
Definition at line 2310 of file system.cxx.
std::string ss_thread_get_name | ( | ) |
Definition at line 2444 of file system.cxx.
INT EXPRT ss_thread_kill | ( | midas_thread_t | thread_id | ) |
Destroys the thread identified by the passed thread id. The thread id is returned by ss_thread_create() on creation.
thread_id | the thread id of the thread to be killed. |
Definition at line 2383 of file system.cxx.
Definition at line 2426 of file system.cxx.
std::string ss_tid_to_string | ( | midas_thread_t | thread_id | ) |
Definition at line 1571 of file system.cxx.
Returns the actual time in seconds since 1.1.1970 UTC.
Definition at line 3462 of file system.cxx.
Definition at line 3467 of file system.cxx.
bool EXPRT ss_timed_mutex_wait_for_sec | ( | std::timed_mutex & | mutex, |
const char * | mutex_name, | ||
double | timeout_sec | ||
) |
Definition at line 3265 of file system.cxx.
Definition at line 3580 of file system.cxx.
Definition at line 3355 of file system.cxx.
unsigned int ss_us_since | ( | std::chrono::time_point< std::chrono::high_resolution_clock > | start | ) |
std::chrono::time_point< std::chrono::high_resolution_clock > ss_us_start | ( | ) |
Definition at line 8255 of file system.cxx.
Definition at line 5346 of file system.cxx.
|
static |
Definition at line 1999 of file system.cxx.
|
static |
Definition at line 3987 of file system.cxx.
|
static |
Definition at line 3984 of file system.cxx.
|
static |
Definition at line 3986 of file system.cxx.
|
static |
Definition at line 3982 of file system.cxx.
|
static |
Definition at line 3979 of file system.cxx.
|
static |
Definition at line 3990 of file system.cxx.
|
static |
Definition at line 3983 of file system.cxx.
|
static |
Definition at line 3989 of file system.cxx.
|
static |
Definition at line 3980 of file system.cxx.
|
static |
Definition at line 3977 of file system.cxx.
char { ... } ::c |
Definition at line 1310 of file system.cxx.
char { ... } ::c |
Definition at line 1316 of file system.cxx.
double { ... } ::d |
Definition at line 1311 of file system.cxx.
double { ... } ::d |
Definition at line 1315 of file system.cxx.
Definition at line 4964 of file system.cxx.
|
static |
Definition at line 3353 of file system.cxx.
Definition at line 3789 of file system.cxx.
|
static |
Definition at line 2458 of file system.cxx.
|
static |
Definition at line 2457 of file system.cxx.
char stack_history[N_STACK_HISTORY][80] |
Definition at line 7991 of file system.cxx.
int stack_history_pointer = -1 |
Definition at line 7992 of file system.cxx.
struct { ... } test_align |
struct { ... } test_padding |