thrdqueue: make thrdq_await_done only for unit tests

It is not used for anything else, so drop Curl_ and make it conditional
accordingly.

Closes #21499
This commit is contained in:
Daniel Stenberg 2026-05-04 23:44:25 +02:00
parent 1ff399c3f7
commit 117d50b4bf
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 8 additions and 3 deletions

View file

@ -351,11 +351,16 @@ out:
Curl_mutex_release(&tqueue->lock);
}
CURLcode Curl_thrdq_await_done(struct curl_thrdq *tqueue,
uint32_t timeout_ms)
#ifdef UNITTESTS
/* @unittest 3301 */
UNITTEST CURLcode thrdq_await_done(struct curl_thrdq *tqueue,
uint32_t timeout_ms);
UNITTEST CURLcode thrdq_await_done(struct curl_thrdq *tqueue,
uint32_t timeout_ms)
{
return Curl_thrdpool_await_idle(tqueue->tpool, timeout_ms);
}
#endif
CURLcode Curl_thrdq_set_props(struct curl_thrdq *tqueue,
uint32_t max_len,

View file

@ -110,7 +110,7 @@ static CURLcode test_unit3301(const char *arg)
fail_unless(!r, "queue-b send");
}
r = Curl_thrdq_await_done(tqueue, 0);
r = thrdq_await_done(tqueue, 0);
fail_unless(!r, "queue-b await done");
nrecvd = 0;