Skip to content

Commit 204377a

Browse files
max-krasnyanskyfmz
authored andcommitted
threadpool: update threadpool resume/pause function names
1 parent 49ac51f commit 204377a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ggml/src/ggml.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18888,13 +18888,13 @@ void ggml_release_threadpool(struct ggml_compute_threadpool* threadpool) {
1888818888

1888918889
#ifndef GGML_USE_OPENMP
1889018890
// 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) {
1889218892
GGML_PRINT_DEBUG("Pausing threadpool\n");
1889318893
threadpool->pause = true;
1889418894
ggml_cond_broadcast(&threadpool->cond);
1889518895
}
1889618896

18897-
static void __ggml_resume_threadpool(struct ggml_compute_threadpool * threadpool) {
18897+
static void ggml_resume_threadpool_locked(struct ggml_compute_threadpool * threadpool) {
1889818898
GGML_PRINT_DEBUG("Resuming threadpool\n");
1889918899
threadpool->pause = false;
1890018900
ggml_cond_broadcast(&threadpool->cond);
@@ -18905,7 +18905,7 @@ void ggml_pause_threadpool(struct ggml_compute_threadpool * threadpool) {
1890518905
#ifndef GGML_USE_OPENMP
1890618906
ggml_mutex_lock(&threadpool->mutex);
1890718907
if (!threadpool->pause) {
18908-
__ggml_pause_threadpool(threadpool);
18908+
ggml_pause_threadpool_locked(threadpool);
1890918909
}
1891018910
ggml_mutex_unlock(&threadpool->mutex);
1891118911
#else
@@ -18917,7 +18917,7 @@ void ggml_resume_threadpool(struct ggml_compute_threadpool * threadpool) {
1891718917
#ifndef GGML_USE_OPENMP
1891818918
ggml_mutex_lock(&threadpool->mutex);
1891918919
if (threadpool->pause) {
18920-
__ggml_resume_threadpool(threadpool);
18920+
ggml_resume_threadpool_locked(threadpool);
1892118921
}
1892218922
ggml_mutex_unlock(&threadpool->mutex);
1892318923
#else
@@ -19238,7 +19238,7 @@ static void ggml_graph_compute_kickoff(struct ggml_compute_threadpool * threadpo
1923819238

1923919239
if (threadpool->pause) {
1924019240
// resume does cond broadcast
19241-
__ggml_resume_threadpool(threadpool);
19241+
ggml_resume_threadpool_locked(threadpool);
1924219242
} else {
1924319243
ggml_cond_broadcast(&threadpool->cond);
1924419244
}

0 commit comments

Comments
 (0)