2

I've been looking into the getrusage function, which I see a prototype for within the file
/include/linux/resource.h. I've tried to trace the directives to find where the actual function is, but I haven't found it. Does anyone know where it is?

  • 1
    You mean the implementation of it? It's part of the GNU C library. You would have to get that library's source code. – Kusalananda Jun 26 '19 at 17:13
  • getrusage(2) is a system call, the getrusage(2) function from the GNU C library is just a thin wrapper (which may even be autogenerated). The getrusage() linux kernel implementation is here. –  Jun 27 '19 at 05:08

0 Answers0