mirror of
https://github.com/donnaskiez/ac.git
synced 2024-11-21 22:24:08 +01:00
ea2278e7b3
- Refactor process list. New implementation consists of a hashmap. Each process entry then contains the associated user modules. - Implement user module integrity checks on timer callback
37 lines
No EOL
934 B
C++
37 lines
No EOL
934 B
C++
#pragma once
|
|
|
|
#include "threadpool.h"
|
|
|
|
#include "timer.h"
|
|
|
|
#include "../kernel_interface/kernel_interface.h"
|
|
|
|
#include "../module.h"
|
|
|
|
namespace dispatcher {
|
|
|
|
constexpr int DISPATCH_LOOP_SLEEP_TIME = 30;
|
|
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 {
|
|
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();
|
|
void init_timer_callbacks();
|
|
void run_timer_thread();
|
|
void run_io_port_thread();
|
|
void request_session_pk();
|
|
|
|
public:
|
|
dispatcher(LPCWSTR driver_name, client::message_queue &queue, module::module_information* module_info);
|
|
void run();
|
|
};
|
|
} // namespace dispatcher
|