예제 #1
0
파일: worker.c 프로젝트: Cfretz244/notgios
int run_task(task_type_t type, metric_type_t metric, task_option_t *options, char *id) {
  switch (type) {
    case PROCESS:
      return handle_process(metric, options, id);
    case DIRECTORY:
      return handle_directory(options, id);
    case DISK:
      return handle_disk(metric, options, id);
    case SWAP:
      return handle_swap(id);
    case LOAD:
      return handle_load(id);
    case TOTAL:
      return handle_total(id, metric);
    default: {
      // We've been passed an incorrectly initialized task. Shouldn't happen, but handle
      // for debugging. Plus it gets GCC off my case.
      task_report_t report;
      init_task_report(&report, id, type, metric);
      sprintf(report.message, "FATAL CAUSE INVALID_TASK");
      lpush(&reports, &report);
      return NOTGIOS_GENERIC_ERROR;
    }
  }
}
예제 #2
0
void tlcs870_device::do_SWAP_g(const uint8_t opbyte0, const uint8_t opbyte1)
{
	/*
	    OP                (opbyte0) (immval0) (opbyte1) (immval1) (immval2)    JF ZF CF HF   cycles
	    SWAP g            1110 1ggg           0000 0001                        1  -  -  -    4
	*/
	m_cycles = 4;

	const uint8_t reg = opbyte0 & 0x7;
	handle_swap(reg);
}
예제 #3
0
파일: input.c 프로젝트: Nicholas-S/xaric
void window_swap10(char dumb, char *dumber)
{
    handle_swap(10);
    extended_handled = 1;
}
예제 #4
0
파일: input.c 프로젝트: Nicholas-S/xaric
void window_swap9(char dumb, char *dumber)
{
    handle_swap(9);
    extended_handled = 1;
}