Jump to content

Sign in to follow this  

scmRTOS. Указатель на процесс. Возможно такое?

Recommended Posts

Не вижу препятствий :)


Вот, например, код, который проходится по всем процессам и выдаёт по ним статистику (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";

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this