mirror-ac/module/dispatcher/dispatcher.h

37 lines
934 B
C
Raw Normal View History

#pragma once
#include "threadpool.h"
2024-01-22 14:02:59 +01:00
#include "timer.h"
#include "../kernel_interface/kernel_interface.h"
#include "../module.h"
namespace dispatcher {
constexpr int DISPATCH_LOOP_SLEEP_TIME = 30;
2024-02-14 17:16:27 +01:00
constexpr int KERNEL_DISPATCH_FUNCTION_COUNT = 12;
constexpr int DISPATCHER_THREAD_COUNT = 4;
constexpr int TIMER_CALLBACK_DELAY = 15;
constexpr int WRITE_SHARED_MAPPING_PERIOD = 30;
constexpr int WRITE_SHARED_MAPPING_DUE_TIME = 30;
class dispatcher {
2024-01-22 14:02:59 +01:00
timer timers;
thread_pool thread_pool;
kernel_interface::kernel_interface k_interface;
module::module_information *module_info;
void issue_kernel_job();
void write_shared_mapping_operation();
2024-01-22 14:02:59 +01:00
void init_timer_callbacks();
void run_timer_thread();
void run_io_port_thread();
2024-01-28 08:34:09 +01:00
void request_session_pk();
public:
dispatcher(LPCWSTR driver_name, client::message_queue &queue, module::module_information* module_info);
void run();
};
} // namespace dispatcher