• Ingo Molnar's avatar
    [PATCH] hide-threads-2.5.34-C1 · a5d2bf7b
    Ingo Molnar authored
    I fixed up the 'remove thread group inferiors from the tasklist' patch. I
    think i managed to find a reasonably good construct to iterate over all
    threads:
    
    	do_each_thread(g, p) {
    		...
    	} while_each_thread(g, p);
    
    the only caveat with this is that the construct suggests a single-loop -
    while it's two loops internally - and 'break' will not work. I added a
    comment to sched.h that warns about this, but perhaps it would help more
    to have naming that suggests two loops:
    
    	for_each_process_do_each_thread(g, p) {
    		...
    	} while_each_thread(g, p);
    
    but this looks a bit too long. I dont know. We might as well use it all
    unrolled and no helper macros - although with the above construct it's
    pretty straightforward to iterate over all threads in the system.
    a5d2bf7b
sysrq.c 11.2 KB