/* * Log task */ LOCAL void log_task( INT logtask_port ) { static B logtask_buf[MBF_LOG_MAXMSZ+1]; INT msgsz; ER ercd; logtask_alive = 1; log_msg_maxmsz = MBF_LOG_MAXMSZ; for ( ;; ) { ercd = tk_rcv_mbf(log_mbfid, logtask_buf, TMO_FEVR); if ( ercd < E_OK ) { break; } msgsz = ercd; logtask_buf[msgsz++] = '\n'; ercd = console_out(logtask_port, logtask_buf, (UW)msgsz); if ( ercd < E_OK ) { sys_write(logtask_buf, msgsz); } } logtask_alive = 0; tk_exd_tsk(); }
void client_task(INT stacd, VP exinf) { DEBUG_PRINT(("client task started\n")); test_tcp_client(); tk_sig_sem(semid, 1); tk_exd_tsk(); }
static VOID TEngineTaskProc(INT stacd, VP param) { cg_log_debug_l4("Entering...\n"); CgThread *thread = (CgThread *)param; if (thread->action != NULL) thread->action(thread); tk_exd_tsk(); cg_log_debug_l4("Leaving...\n"); }
static void server_task(INT stacd, VP exinf) { DEBUG_PRINT(("server task started\n")); ping(inet_addr(IP_T_ENGINE_ORG)); // t-engine.org traceroute(inet_addr(IP_T_ENGINE_ORG)); // t-engine.org //traceroute(inet_addr(IP_GOOGLE_CO_JP)); // google.co.jp test_tcp_server(); test_getaddrinfo(); test_getnameinfo(); test_http(); tk_sig_sem(semid, 1); tk_exd_tsk(); }