Beispiel #1
0
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);
  }
}
Beispiel #2
0
/**
 * 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);
}
Beispiel #3
0
void Loop::pending()
{
    if (S_LIKELY(_loop != nullptr)) {
        ev_suspend(_loop);
    }
}
Beispiel #4
0
static PyObject *
Loop_suspend(Loop *self)
{
    ev_suspend(self->loop);
    Py_RETURN_NONE;
}