Getting the process id of a current process without unistd.h

Posted by syaoran on Stack Overflow See other posts from Stack Overflow or by syaoran
Published on 2009-02-09T22:51:45Z Indexed on 2010/06/02 10:43 UTC
Read the original article Hit count: 149

I'm working on a deadlock detection algorithm and I'm only given kernel level libraries, i.e. #include <linux/somelibrary> and nothing else. Are there kernel-level facilities that will allow me to get the pid of the current process similar to getpid() of unistd.h?

© Stack Overflow or respective owner

Related posts about linux

Related posts about linux-kernel