#ifndef SCHEDULER_IFACE_HPP
#define SCHEDULER_IFACE_HPP

// Common task-callback signature used by all schedulers.
//   taskId      — index of the unit of work (e.g. frame index 0..F-1)
//   workerId    — id of the worker thread invoking the callback (0..K-1)
//   workerCount — total number of worker threads K
//   ctx         — opaque pointer passed through from the caller
typedef void (*task_fn_t)(int taskId, int workerId, int workerCount, void* ctx);

// Pin the calling thread to `core_id` (modulo nproc). No-op if core_id < 0.
// Best-effort: failures are silently ignored so a missing CAP_SYS_NICE etc.
// doesn't abort the benchmark.
void set_thread_affinity(int core_id);

#endif
