Skip to content

Commit

Permalink
CPU1個固定オプション追加
Browse files Browse the repository at this point in the history
CPUが1個しかない場合に余計なループを回さないようにした。効果は小さい
  • Loading branch information
ytoi committed Feb 28, 2021
1 parent 206032c commit 98d8d62
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/cpuemu.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static DbgCpuCallbackFuncEnableType enable_dbg;
static inline bool cpuemu_thread_run_nodbg(int core_id_num)
{
bool is_halt;
CoreIdType i;
CoreIdType i = 0;
Std_ReturnType err;
/**
* デバイス実行実行
Expand All @@ -322,7 +322,9 @@ static inline bool cpuemu_thread_run_nodbg(int core_id_num)
* CPU 実行
*/
is_halt = TRUE;
#ifndef DOPTIMIZE_USE_ONLY_1CPU
for (i = 0; i < core_id_num; i++) {
#endif
virtual_cpu.current_core = &virtual_cpu.cores[i];
/**
* CPU 実行開始通知
Expand All @@ -341,7 +343,9 @@ static inline bool cpuemu_thread_run_nodbg(int core_id_num)
if (virtual_cpu.cores[i].core.is_halt != TRUE) {
is_halt = FALSE;
}
#ifndef DOPTIMIZE_USE_ONLY_1CPU
}
#endif
return is_halt;
}
static inline bool cpuemu_thread_run_dbg(int core_id_num)
Expand Down

0 comments on commit 98d8d62

Please sign in to comment.