threadpool: improve setprioty error message
This commit is contained in:
parent
bead7d47fb
commit
8e8f8ce42d
1 changed files with 2 additions and 2 deletions
|
@ -285,7 +285,7 @@ bool set_process_priority(enum ggml_sched_priority prio) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t p = 0;
|
int p = 0;
|
||||||
switch (prio) {
|
switch (prio) {
|
||||||
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
|
case GGML_SCHED_PRIO_NORMAL: p = 0; break;
|
||||||
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
|
case GGML_SCHED_PRIO_MEDIUM: p = -5; break;
|
||||||
|
@ -294,7 +294,7 @@ bool set_process_priority(enum ggml_sched_priority prio) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!setpriority(PRIO_PROCESS, 0, p)) {
|
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 false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue