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 7895 of file system.cxx.
#define N_STACK_HISTORY 500 |
Definition at line 7996 of file system.cxx.
Definition at line 168 of file system.cxx.
Definition at line 80 of file system.cxx.
Definition at line 5399 of file system.cxx.
Definition at line 5454 of file system.cxx.
Definition at line 5562 of file system.cxx.
Definition at line 16144 of file midas.cxx.
Definition at line 5285 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 7305 of file system.cxx.
Definition at line 7897 of file system.cxx.
Definition at line 3899 of file system.cxx.
Definition at line 2001 of file system.cxx.
Definition at line 7192 of file system.cxx.
Definition at line 6802 of file system.cxx.
Definition at line 6820 of file system.cxx.
Definition at line 7817 of file system.cxx.
Definition at line 7853 of file system.cxx.
Definition at line 6878 of file system.cxx.
Definition at line 6896 of file system.cxx.
Definition at line 6626 of file system.cxx.
Definition at line 7054 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 7225 of file system.cxx.
Definition at line 7124 of file system.cxx.
Definition at line 6719 of file system.cxx.
Definition at line 6737 of file system.cxx.
Definition at line 7160 of file system.cxx.
Definition at line 6958 of file system.cxx.
Definition at line 6978 of file system.cxx.
Definition at line 7016 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 7509 of file system.cxx.
std::string EXPRT ss_getcwd | ( | ) |
Definition at line 5776 of file system.cxx.
std::string ss_gethostname | ( | ) |
Definition at line 5712 of file system.cxx.
Definition at line 5746 of file system.cxx.
Definition at line 7446 of file system.cxx.
Definition at line 1377 of file system.cxx.
Definition at line 7776 of file system.cxx.
midas_thread_t EXPRT ss_gettid | ( | void | ) |
Definition at line 1519 of file system.cxx.
Definition at line 8074 of file system.cxx.
Definition at line 7972 of file system.cxx.
Definition at line 7967 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 7388 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 5635 of file system.cxx.
Definition at line 8157 of file system.cxx.
bool ss_repair_utf8 | ( | std::string & | s | ) |
Definition at line 8253 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 7355 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 5231 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 5246 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 8000 of file system.cxx.
Definition at line 8050 of file system.cxx.
Definition at line 8028 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 5908 of file system.cxx.
Definition at line 6238 of file system.cxx.
Definition at line 6574 of file system.cxx.
Definition at line 6462 of file system.cxx.
Definition at line 5817 of file system.cxx.
Definition at line 6098 of file system.cxx.
Definition at line 6354 of file system.cxx.
Definition at line 6298 of file system.cxx.
Definition at line 6406 of file system.cxx.
Definition at line 5952 of file system.cxx.
Definition at line 6518 of file system.cxx.
Definition at line 6038 of file system.cxx.
Definition at line 6172 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 8261 of file system.cxx.
Definition at line 5352 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 7997 of file system.cxx.
int stack_history_pointer = -1 |
Definition at line 7998 of file system.cxx.
struct { ... } test_align |
struct { ... } test_padding |