refactor: clarify interval duration is not macro

master
Sean McBride 5 years ago
parent 95f339de94
commit 324253095d

@ -9,7 +9,7 @@
***********/ ***********/
extern __thread volatile sig_atomic_t software_interrupt_is_disabled; extern __thread volatile sig_atomic_t software_interrupt_is_disabled;
extern uint64_t SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_CYCLES; extern uint64_t software_interrupt_interval_duration_in_cycles;
/************************* /*************************
* Public Static Inlines * * Public Static Inlines *

@ -119,7 +119,7 @@ local_runqueue_minheap_preempt(ucontext_t *user_context)
// TODO: Factor quantum and/or sandbox allocation time into decision // TODO: Factor quantum and/or sandbox allocation time into decision
// uint64_t global_deadline = global_request_scheduler_peek() - // uint64_t global_deadline = global_request_scheduler_peek() -
// SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_CYCLES; // software_interrupt_interval_duration_in_cycles;
bool should_enable_software_interrupt = true; bool should_enable_software_interrupt = true;
uint64_t local_deadline = priority_queue_peek(&local_runqueue_minheap); uint64_t local_deadline = priority_queue_peek(&local_runqueue_minheap);

@ -202,7 +202,7 @@ main(int argc, char **argv)
memset(runtime_worker_threads, 0, sizeof(pthread_t) * WORKER_THREAD_CORE_COUNT); memset(runtime_worker_threads, 0, sizeof(pthread_t) * WORKER_THREAD_CORE_COUNT);
runtime_processor_speed_MHz = runtime_get_processor_speed_MHz(); runtime_processor_speed_MHz = runtime_get_processor_speed_MHz();
SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_CYCLES = (uint64_t)SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_USEC software_interrupt_interval_duration_in_cycles = (uint64_t)SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_USEC
* runtime_processor_speed_MHz; * runtime_processor_speed_MHz;
debuglog("Detected processor speed of %f MHz\n", runtime_processor_speed_MHz); debuglog("Detected processor speed of %f MHz\n", runtime_processor_speed_MHz);

@ -20,7 +20,7 @@
******************/ ******************/
static const int software_interrupt_supported_signals[] = { SIGALRM, SIGUSR1 }; static const int software_interrupt_supported_signals[] = { SIGALRM, SIGUSR1 };
uint64_t SOFTWARE_INTERRUPT_INTERVAL_DURATION_IN_CYCLES; uint64_t software_interrupt_interval_duration_in_cycles;
/****************** /******************
* Thread Globals * * Thread Globals *

Loading…
Cancel
Save