struct thread_options *o = &td->o;
struct cpu_options *co = td->eo;
int td_previous_state;
+ char *msg;
if (!co->cpuload) {
td_vmsg(td, EINVAL, "cpu thread needs rate (cpuload=)","cpuio");
* set thinktime_sleep and thinktime_spin appropriately
*/
o->thinktime_blocks = 1;
+ o->thinktime_blocks_type = THINKTIME_BLOCKS_TYPE_COMPLETE;
o->thinktime_spin = 0;
o->thinktime = ((unsigned long long) co->cpucycle *
(100 - co->cpuload)) / co->cpuload;
qsort_init(td);
break;
default:
- td_vmsg(td, EINVAL, "cpu engine mode bad: %d", co->cpumode);
+ if (asprintf(&msg, "bad cpu engine mode: %d", co->cpumode) < 0)
+ msg = NULL;
+ td_vmsg(td, EINVAL, msg ? : "(?)", __func__);
+ free(msg);
return 1;
}