I want to implement some custom library functions in Linux. For example, I want to implement my own pthread_mutex_lock, pthread_mutex_unlock, malloc and free functions. I've read LD_PRELOAD can be used to use your own custom functions, although I haven't got into the details.
But I have one question, I also want to use the original functions within my new implementations. What would be the trick to do that, as both would have the same names?