@@ -18888,13 +18888,13 @@ void ggml_release_threadpool(struct ggml_compute_threadpool* threadpool) {
18888
18888
18889
18889
#ifndef GGML_USE_OPENMP
18890
18890
// pause/resume must be called under mutex
18891
- static void __ggml_pause_threadpool (struct ggml_compute_threadpool * threadpool) {
18891
+ static void ggml_pause_threadpool_locked (struct ggml_compute_threadpool * threadpool) {
18892
18892
GGML_PRINT_DEBUG("Pausing threadpool\n");
18893
18893
threadpool->pause = true;
18894
18894
ggml_cond_broadcast(&threadpool->cond);
18895
18895
}
18896
18896
18897
- static void __ggml_resume_threadpool (struct ggml_compute_threadpool * threadpool) {
18897
+ static void ggml_resume_threadpool_locked (struct ggml_compute_threadpool * threadpool) {
18898
18898
GGML_PRINT_DEBUG("Resuming threadpool\n");
18899
18899
threadpool->pause = false;
18900
18900
ggml_cond_broadcast(&threadpool->cond);
@@ -18905,7 +18905,7 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
18905
18905
#ifndef GGML_USE_OPENMP
18906
18906
ggml_mutex_lock(&threadpool->mutex);
18907
18907
if (!threadpool->pause) {
18908
- __ggml_pause_threadpool (threadpool);
18908
+ ggml_pause_threadpool_locked (threadpool);
18909
18909
}
18910
18910
ggml_mutex_unlock(&threadpool->mutex);
18911
18911
#else
@@ -18917,7 +18917,7 @@ void ggml_resume_threadpool(struct ggml_compute_threadpool * threadpool) {
18917
18917
#ifndef GGML_USE_OPENMP
18918
18918
ggml_mutex_lock(&threadpool->mutex);
18919
18919
if (threadpool->pause) {
18920
- __ggml_resume_threadpool (threadpool);
18920
+ ggml_resume_threadpool_locked (threadpool);
18921
18921
}
18922
18922
ggml_mutex_unlock(&threadpool->mutex);
18923
18923
#else
@@ -19238,7 +19238,7 @@ static void ggml_graph_compute_kickoff(struct ggml_compute_threadpool * threadpo
19238
19238
19239
19239
if (threadpool->pause) {
19240
19240
// resume does cond broadcast
19241
- __ggml_resume_threadpool (threadpool);
19241
+ ggml_resume_threadpool_locked (threadpool);
19242
19242
} else {
19243
19243
ggml_cond_broadcast(&threadpool->cond);
19244
19244
}
0 commit comments