I want to create an API which, on the call of a function, such as getCPUusage(), redirects to a getCPUusage() function for Windows or Linux.
So I'm using a glue file api.h :
getCPUusage() {
#ifdef WIN32
getCPUusage_windows();
#endif
#ifdef __gnu_linux__
getCPUusage_linux();
#endif
}
So I wonder if using inline would be a better solution, since with what I have, the call will be bigger.
My question is the following : is it better to use inlined function for every call in this situation ?