I want to use a personal "pthread\_self" function. I want to rewrite the "pthread\_self()" and, at the final, call to the real "pthread\_self".
is it possible in C/C++?

Example:

```
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <unistd.h>
#include <pthread.h>

pthread_t pthread_self(void)
{
  // Do something else.....
  // ...
  // And finally call to de real pthread_self():
  return ::pthread_self();  // This doesn't work
}

main()
{
    printf("\nThis is my main thread: %lu\n", pthread_self());
}

```