This commit is contained in:
Mylloon 2024-04-23 11:05:57 +02:00
parent f42777db6c
commit 4be632e1c0
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -205,7 +205,7 @@ current_thread(struct scheduler *s)
pthread_t current = pthread_self(); pthread_t current = pthread_self();
pthread_mutex_lock(&s->mutex); pthread_mutex_lock(&s->mutex);
for(int i = 0; i < s->nthreads; i++) { for(int i = 0; i < s->nthreads; ++i) {
if(pthread_equal(s->threads[i], current)) { if(pthread_equal(s->threads[i], current)) {
pthread_mutex_unlock(&s->mutex); pthread_mutex_unlock(&s->mutex);
return i; return i;