static void* svc_plugin_thread_func(void* arg) { rdpSvcPlugin* plugin = (rdpSvcPlugin*)arg; DEBUG_SVC("in"); IFCALL(plugin->connect_callback, plugin); while (1) { if (plugin->interval_ms > 0) freerdp_thread_wait_timeout(plugin->priv->thread, plugin->interval_ms); else freerdp_thread_wait(plugin->priv->thread); if (freerdp_thread_is_stopped(plugin->priv->thread)) break; freerdp_thread_reset(plugin->priv->thread); svc_plugin_process_data_in(plugin); if (plugin->interval_ms > 0) IFCALL(plugin->interval_callback, plugin); } freerdp_thread_quit(plugin->priv->thread); DEBUG_SVC("out"); return 0; }
static void* serial_thread_func(void* arg) { SERIAL_DEVICE* serial = (SERIAL_DEVICE*)arg; while (1) { freerdp_thread_wait(serial->thread); serial->nfds = 1; FD_ZERO(&serial->read_fds); FD_ZERO(&serial->write_fds); serial->tv.tv_sec = 20; serial->tv.tv_usec = 0; serial->select_timeout = 0; if (freerdp_thread_is_stopped(serial->thread)) break; freerdp_thread_reset(serial->thread); serial_process_irp_list(serial); if (wait_obj_is_set(serial->in_event)) { if (serial_check_fds(serial)) wait_obj_clear(serial->in_event); } } freerdp_thread_quit(serial->thread); return NULL; }
static void* printer_thread_func(void* arg) { PRINTER_DEVICE* printer_dev = (PRINTER_DEVICE*) arg; while (1) { freerdp_thread_wait(printer_dev->thread); if (freerdp_thread_is_stopped(printer_dev->thread)) break; freerdp_thread_reset(printer_dev->thread); printer_process_irp_list(printer_dev); } freerdp_thread_quit(printer_dev->thread); return NULL; }
static void* parallel_thread_func(void* arg) { PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*) arg; while (1) { freerdp_thread_wait(parallel->thread); if (freerdp_thread_is_stopped(parallel->thread)) break; freerdp_thread_reset(parallel->thread); parallel_process_irp_list(parallel); } freerdp_thread_quit(parallel->thread); return NULL; }
static void * scard_thread_func(void* arg) { SCARD_DEVICE* scard = (SCARD_DEVICE*) arg; while (1) { freerdp_thread_wait(scard->thread); if (freerdp_thread_is_stopped(scard->thread)) break; freerdp_thread_reset(scard->thread); scard_process_irp_list(scard); } freerdp_thread_quit(scard->thread); return NULL; }