papi/papi-3.7.0-multiplex.patch

16 lines
481 B
Diff

diff -up src/multiplex.c.mult src/multiplex.c
--- src/multiplex.c.mult 2009-09-25 12:11:49.451283900 -0400
+++ src/multiplex.c 2009-09-25 12:12:53.144294969 -0400
@@ -313,9 +313,10 @@ static MasterEvent *get_my_threads_maste
return (tlist->head);
tid = _papi_hwi_thread_id_fn();
+ unsigned long pid = getpid();
while (t) {
- if (t->tid == tid)
+ if (t->tid == tid || ((tid==0) && (t->tid==pid)))
return (t->head);
t = t->next;
}