Increase threads priority

Hi Everyone,

Is it possible to increase a threads priority after creation?

Cheers Simon

Hi,

Hi Simon!

Is it possible to increase a threads priority after creation?

I remember that Rene implemented that once and the PR should be still there somewhere (closed and labeled as "memo"), but we decided not to merge it because nobody could come up with a sensible use case. If you need it, however, it shouldn't be too difficult (TM) to merge since the kernel API is rather stable throughout the years.

Cheers, Oleg

Hi,

I am fiddling around with C++ and RIOT. I would like to write a OOP Wrapper on the thread implementation.

Currently I'll try to implement a join Method. The caller of this function should do nothing until the thread is terminated.

My Idea is something like:

auto join() -> void {      while (this->getStatus() != STATUS_STOPPED) {          // Increase Threads Priority to calling threads priority          thread_yield();      } }

I think it might solve my Problem without much overhead.

Simon

Hi Oleg,

I don't really "need" it, at least not for TCP.

It would offer a simple solution to a Problem in one of my pet Projects (https://github.com/brummer-simon/riot-cpp-wrapper) :wink:

Cheers Simon

Hey Oleg,

I havn't found any PR regarding this Issue. Any hints?

Cheers, Simon

Hi Simon,

I was talking about this one: https://github.com/RIOT-OS/RIOT/pull/1307

Cheers, Oliver

Hi Oleg,

Thanks I can surely use it in my thread c++ wrapper. Is it enough "use case" to bring the feature up in general ?

Cheers Simon

Hi Simon!