X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=c%2Fpthread_extra%2Fpthread_user_data.c;h=cf97a652f6d1c973aa06f9920c2e0643cb17ae63;hb=9b4be8e8c190f7734a7611c2f354e2616e0f2c2f;hp=a1e1ebd4d40fbf05a547a968c2131d31fb533c83;hpb=70bd1c94dee46dac0885831ccce3d1840388656e;p=mirrors%2FPrograms.git diff --git a/c/pthread_extra/pthread_user_data.c b/c/pthread_extra/pthread_user_data.c index a1e1ebd..cf97a65 100644 --- a/c/pthread_extra/pthread_user_data.c +++ b/c/pthread_extra/pthread_user_data.c @@ -48,6 +48,19 @@ pthread_user_data_internal_t* pthread_user_data_internal(pthread_t thread) { return &pthread_user_data[i]; } +//Iterate specified callback over all registered threads +int pthread_user_data_internal_iterate(int (*routine)(pthread_t), void *arg) { + (void) arg; + int i; + pthread_user_data_lock(); + for(i = 0; iusr;