void y_on_stdin(char *input_line) { int flag = ym_dbenter; ym_dbenter = yp_did_prompt = 0; if (!y_read_prompt) { if (input_line) while (input_line[0]==' ' || input_line[0]=='\t') input_line++; if (flag && input_line && input_line[0]) { extern void yg_got_expose(void); yp_continue = 0; if (p_signalling) p_abort(); /* drop current debug block plus task and clean up vm state */ ResetStack(0); yr_reset(); yg_got_expose(); p_clr_alarm(0, 0); } if (yg_blocking) { if (yg_blocking==2) { extern void yg_got_expose(void); yg_got_expose(); /* escape from pause on keyboard input */ if (input_line && input_line[0]) YputsErr("WARNING discarding keyboard input that aborts pause"); return; } else { YputsErr("WARNING discarding keyboard input during window wait"); return; } } y_add_line(input_line); } else { yr_reader(input_line); } }
void GatewayStack::NMSessionReset() { // for Close - Reconnect procedure fired by CMD 42 LOG_INFO_APP("Session to NM is being reset .."); ResetStack(); clientNM->Close(); }
/*==================[external functions definition]==========================*/ void StartOs_Arch(void) { uint8f loopi; /* init every task */ for( loopi = 0; loopi < TASKS_COUNT; loopi++) { /* init stack */ ResetStack(loopi); /* set entry point */ SetEntryPoint(loopi); } /* initialize singals handler */ signal(SIGALRM,OsInterruptHandler); signal(SIGUSR1,OsInterruptHandler); signal(SIGTERM,OsInterruptHandler); /* shared memory for interrupts */ OSEK_InterruptFlags = mmap(NULL, sizeof(8), PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0); /* init Thread Terminate flag */ Os_Terminate_Flag = false; if(0 != pthread_create(&Os_Thread_Timer, NULL, HWTimerThread, (void*)0)) { printf("Error creating OS Thread timer!\n"); exit(-1); } #if 0 printf("Process ID: %d\n", getpid()); #endif /* All these is done in a similar way in StartOS.c, Is it code to be deleted? */ #if 0 /* enable interrupts */ InterruptState = 1; /* enable HWTimer0, interrupt 4 */ InterruptMask = ~(1 << 4); #if (defined HWCOUNTER1) /* enable HWTimer0, interrupt 5 */ InterruptMask &= ~(1 << 5); #endif #endif SaveOsStack(); }
void GatewayStack::NMSessionClosed() { state = stIdle; LOG_INFO_APP("NMSessionClosed::ResetStack"); ResetStack(); if (NotifyRejoinCallback) { NotifyRejoinCallback(); } LOG_WARN_APP("Session to NM closed. reconnect start ..."); datalink.ResetNeighborSession(clientNM->ActiveSession()); clientNM->Connect(); LOG_DEBUG_APP("GatewayStack::NMSessionClosed: end"); }