Skip to content

Commit

Permalink
threadpool: improve setprioty error message
Browse files Browse the repository at this point in the history
  • Loading branch information
max-krasnyansky committed Aug 28, 2024
1 parent bead7d4 commit 8e8f8ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ bool set_process_priority(enum ggml_sched_priority prio) {
return true;
}

int32_t p = 0;
int p = 0;
switch (prio) {
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
Expand All @@ -294,7 +294,7 @@ bool set_process_priority(enum ggml_sched_priority prio) {
}

if (!setpriority(PRIO_PROCESS, 0, p)) {
fprintf(stderr, "warn: failed to set process priority class %d : %s (%d)\n", prio, strerror(errno), errno);
fprintf(stderr, "warn: failed to set process priority %d : %s (%d)\n", prio, strerror(errno), errno);
return false;
}
return true;
Expand Down

0 comments on commit 8e8f8ce

Please sign in to comment.