|
|
@ -46,7 +46,7 @@ public: |
|
|
|
stack_estimate = gp::buffer<char>{seed, (size_t)(gp_config::limits::process_stack*page_cnt)}; |
|
|
|
} |
|
|
|
main_context.value = (process_data*)system_allocator.get().allocate(sizeof(process_data)); |
|
|
|
new(main_context.value) process_data(gp::function<void()>([]() -> void{}, nullopt), stack_estimate.begin().data, stack_estimate.size()); |
|
|
|
new(main_context.value) process_data(gp::function<void()>([]() -> void{}, nullopt), stack_estimate.begin().data, stack_estimate.size(), gp::unique_ptr<base_process_info>::make(system_allocator)); |
|
|
|
gp_config::assertion(main_context.value != nullptr, "failed to allocate return to main switch"); |
|
|
|
scheme.link(*this); |
|
|
|
} |
|
|
@ -57,7 +57,7 @@ public: |
|
|
|
gp_config::assertion(stack != nullptr, "failed to allocate a stack"); |
|
|
|
process_data* created_process = (process_data*)system_allocator.get().allocate(sizeof(process_data)); |
|
|
|
gp_config::assertion(stack != nullptr, "failed to allocate a process data"); |
|
|
|
new(created_process) process_data(fn, stack, stack_sz); |
|
|
|
new(created_process) process_data(fn, stack, stack_sz, gp::unique_ptr<base_process_info>::make(system_allocator)); |
|
|
|
|
|
|
|
topic_list::node_ptr pp = (topic_list::node_ptr)system_allocator.get().allocate( |
|
|
|
sizeof(topic_list::node) |
|
|
@ -92,7 +92,7 @@ public: |
|
|
|
scheduler::scheduler(class system& v, size_t token) |
|
|
|
: id(token) |
|
|
|
, sys(v) |
|
|
|
, main_context_data{gp::function<void()>{[](){}, v.system_allocator}, nullptr, size_t(0)} |
|
|
|
, main_context_data{gp::function<void()>{[](){}, v.system_allocator}, nullptr, size_t(0), gp::unique_ptr<base_process_info>::make(v.system_allocator)} |
|
|
|
, main_context() |
|
|
|
{ |
|
|
|
main_context.value = &main_context_data; |
|
|
|