SCHED_FIFO not working with g++ but gcc ?!
Hello,
for various reasons i once had to compile my code with gcc instead of g++ and it dramatically changed the scheduling behaviour, so im guessing sched_fifo didnt work at all with g++.
my code is basically:
sched_param prio;
prio.sched_priority = sched_get_priority_max( SCHED_FIFO );
sched_setscheduler( 0, SCHED_FIFO, &prio );
a_lot_of_work();
(im checking if setscheduler() returns 0 )
running it compiled with g++ results in a really friendly programm which occasionally uses 10% cpu....
compiled with gcc the program runs really realtime ... consoles react a lot slower and so on ... but didnt hang system
so what is the problem with g++ ? setscheduler returned 0 but doesnt work ?!
|