nanorobot 1 May 31, 2017 Posted May 31, 2017 (edited) · Report post typedef OS::process<OS::pr0, 160> TProc1; OS::TBaseProcess * pproc = &Proc1; . . . . . . pproc->sleep(); pproc->wake_up(); Edited May 31, 2017 by nanorobot Quote Share this post Link to post Share on other sites More sharing options...
AHTOXA 3 May 31, 2017 Posted May 31, 2017 · Report post Не вижу препятствий :) Вот, например, код, который проходится по всем процессам и выдаёт по ним статистику (OS::get_proc() как раз возвращает указатель на TBaseProcess) : for(uint_fast8_t i = 0; i < OS::PROCESS_COUNT; ++i) { uint32_t cpu = profiler.get_result(i)/10; stream << priorities[i] << '\t' << OS::get_proc(i)->name() << '\t' << OS::get_proc(i)->stack_slack() * sizeof(stack_item_t) << '\t' << cpu / 10 << '.'<< cpu % 10 <<"\r\n"; } Quote Share this post Link to post Share on other sites More sharing options...