X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=ext%2Fthreads%2Fthreads.xs;h=ff2df9dfe2e6602ed37179e7c1b3c61b16bc4269;hb=678a9b6c63252a38ff5453e7acc1b7b4bf5b7197;hp=835cd63af4c64483ce5238534e3d0a8119e20cfd;hpb=dfe3554aff0fcf2eccc3abaf234fe559a45c6494;p=p5sagit%2Fp5-mst-13.2.git diff --git a/ext/threads/threads.xs b/ext/threads/threads.xs index 835cd63..ff2df9d 100755 --- a/ext/threads/threads.xs +++ b/ext/threads/threads.xs @@ -367,7 +367,6 @@ Perl_ithread_create(pTHX_ SV *obj, char* classname, SV* init_function, SV* param MUTEX_INIT(&thread->mutex); thread->tid = tid_counter++; thread->gimme = GIMME_V; - thread->state = (thread->gimme == G_VOID) ? 1 : 0; /* "Clone" our interpreter into the thread's interpreter * This gives thread access to "static data" and code. @@ -553,6 +552,23 @@ CODE: } void +ithread_list(char *classname) +PPCODE: +{ + ithread *curr_thread; + MUTEX_LOCK(&create_destruct_mutex); + curr_thread = threads; + while(curr_thread) { + PUSHs( ithread_to_SV(aTHX_ NULL, curr_thread, classname, TRUE)); + curr_thread = curr_thread->next; + if(curr_thread == threads) + break; + } + MUTEX_UNLOCK(&create_destruct_mutex); +} + + +void ithread_self(char *classname) CODE: {