Bool xf86VTSwitchAway() { ev_flush(); ev_suspend(); sco_ledstatus = ioctl(xf86Info.consoleFd, KDGETLED, &sco_ledstate); xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_TRUE) < 0) { return(FALSE); } else { return(TRUE); } }
/** * Suspends the event loop, pausing all timers and delays processing of events. * * NOTE: DO NOT CALL IF YOU HAVE CALLED EventLoop->suspend() ALREADY! * * @return boolean false if object is not initialized */ PHP_METHOD(EventLoop, suspend) { /* TODO: Implement a check for if we already have suspended the eventloop? */ event_loop_object *obj = (event_loop_object *)zend_object_store_get_object(getThis() TSRMLS_CC); assert(obj->loop); if(obj->loop) { ev_suspend(obj->loop); RETURN_BOOL(1); } RETURN_BOOL(0); }
void Loop::pending() { if (S_LIKELY(_loop != nullptr)) { ev_suspend(_loop); } }
static PyObject * Loop_suspend(Loop *self) { ev_suspend(self->loop); Py_RETURN_NONE; }