ColinIanKing / stress-ng

This is the stress-ng upstream project git repository. stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.
https://github.com/ColinIanKing/stress-ng
GNU General Public License v2.0
1.82k stars 290 forks source link

problem: fix stress-prio-inv #443

Closed JimmyHoSF closed 1 month ago

JimmyHoSF commented 1 month ago
  1. The origin code expected PTHREAD_PRIO_INHERIT to be defined, but it is not solve: add #define PTHREAD_PRIO_INHERIT 1
  2. warning message output have an incorrect precondition, so the warning message will not be printed solve: change the condition
ColinIanKing commented 1 month ago

Hi, thanks for the suggested fix. I discovered that I has assumed that these PTHREADPRIO{INHERIT|NONE|PROTECT} values were enums and not #defined macros, so I had to add some built-time checking to determine this. I've pushed a fix. Please pull the changes and do:

make clean make -j $(nproc)

and I think this should fix the issue.

Kind regards,

Colin