Beispiel #1
0
int netdrv_main(int argc, char *argv[])
{
  struct netbuf *buf;

  netdrv_init();
  kz_setintr(SOFTVEC_TYPE_ETHINTR, netdrv_intr); /* 割込みハンドラ設定 */

  while (1) {
    kz_recv(MSGBOX_ID_NETPROC, NULL, (char **)&buf);
    netdrv_proc(buf);
    kz_kmfree(buf);
  }

  return 0;
}
Beispiel #2
0
int consdrv_main(int argc, char *argv[])
{
  int size, index;
  kz_thread_id_t id;
  char *p;

  consdrv_init();
  kz_setintr(SOFTVEC_TYPE_SERINTR, consdrv_intr); /* 割込みハンドラ設定 */

  while (1) {
    id = kz_recv(MSGBOX_ID_CONSOUTPUT, &size, &p);
    index = p[0] - '0';
    consdrv_command(&consreg[index], id, index, size - 1, p + 1);
    kz_kmfree(p);
  }

  return 0;
}