Esempio n. 1
0
void enable() {
        endpoint_t ep;
        char name[256];
        int priv_f;

        /* Fetch our endpoint */
        sys_whoami(&ep, name, 256, &priv_f);
        /* Enable IO-sensitive operations for ourselves */
        sys_enable_iop(ep);
        asm( "STI" );
}
Esempio n. 2
0
int main(int argc, char **argv) {

	sef_startup();

	/* Enable IO-sensitive operations for ourselves */
	sys_enable_iop(SELF);

	if ( argc == 1 ) {
		print_usage(argv);
		return 0;
	} else {
		proc_args(argc, argv);
	}
	return 0;

}
Esempio n. 3
0
int main(int argc, char **argv) {

	/* Initialize service */

	sef_startup();

	sys_enable_iop(SELF);

	if ( argc == 1 ) {
		print_usage(argv);
		return 0;
	} else {
		proc_args(argc, argv);
	}
	return 0;

}
Esempio n. 4
0
int main(int argc, char *argv[]) {

	/* Initialize service */
	sef_startup();

	/* Enable IO-sensitive operations for ourselves */
	sys_enable_iop(SELF);

	if (racinix_start())
	{
		racinix_exit();
		printf("Racinix: An error occurred and the program was stopped.\n");
		return 1;
	}

	racinix_exit();

	return 0;
}
Esempio n. 5
0
File: Main.c Progetto: PTJohe/LCOM
int main(int argc, char *argv[]) {
	initLog();
	LOG("main", "Starting Where's Wally? ...");

	/* Initialize service */
	sef_startup();

	/* Enable IO-sensitive operations for ourselves */
	sys_enable_iop(SELF);

	printf("Starting \"Where's Wally?\" ....\n");

	initGraphics(MODE_1280_1024);

	WallyNIX* wally = (WallyNIX*) startWallyNIX();
	while (!wally->exit) {
		updateWallyNIX(wally);

		if (!wally->exit) {
			if (wally->timerFPS->ticked) {
				wally->timerFPS->ticked = 0;
				drawWallyNIX(wally);

				copyToMouseBuffer();
				if (getMouse()->draw) {
					drawMouse();
				}

				copyToVideoMem();
			}
		}
	}
	stopWallyNIX(wally);

	exitGraphics();

	LOG("main", "Terminated Where's Wally? ...");
	printf("\"Where's Wally?\" exited successfully.\n");

	return EXIT_SUCCESS;
}
Esempio n. 6
0
/*===========================================================================*
 *				m_do_open				     *
 *===========================================================================*/
static int m_do_open(message *m_ptr)
{
/* Open a memory character device. */
  int r;

/* Check device number on open. */
  if (m_prepare(m_ptr->DEVICE) == NULL) return(ENXIO);
  if (m_device == MEM_DEV)
  {
	r = sys_enable_iop(m_ptr->USER_ENDPT);
	if (r != OK)
	{
		printf("m_do_open: sys_enable_iop failed for %d: %d\n",
			m_ptr->USER_ENDPT, r);
		return r;
	}
  }

  openct[m_device]++;

  return(OK);
}