Commit 07086fcf authored by Ivan Kozik's avatar Ivan Kozik Committed by GitHub
Browse files

Fix column misalignment for priority -101 threads

BFS-patched kernels can have kernel threads with priority -101.
This change makes priority -101 display as "RT", just like priority -100.

Related: https://github.com/hishamhm/htop/issues/314
parent 6d4df3d1
Showing with 1 addition and 1 deletion
+1 -1
......@@ -429,7 +429,7 @@ void Process_writeField(Process* this, RichString* str, ProcessField field) {
case PID: snprintf(buffer, n, Process_pidFormat, this->pid); break;
case PPID: snprintf(buffer, n, Process_pidFormat, this->ppid); break;
case PRIORITY: {
if(this->priority == -100)
if(this->priority <= -100)
snprintf(buffer, n, " RT ");
else
snprintf(buffer, n, "%3ld ", this->priority);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment