Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 24th, 2012  |  syntax: None  |  size: 0.25 KB  |  views: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #define for_each_process(p)
  2.     for (p = &init_task ; (p = next_task(p)) != &init_task ; )
  3.        
  4. if (p->real_parent->pid == NULL)
  5.       printk("PROCESS: name: %s pid: %d n",p->comm,p->pid);
  6.  else
  7.       printk("THREAD: name: %s tid: %d n",p->comm,p->pid);