My question is regarding the PC register value of which is giving to the created thread.
if I create a new process with fork() the PC value will be copied from parent to child as PC value is the next command in the code.
However if I create a new thread as following
int pthread_create(pthread_t *restrict tidp, const pthread_attr_t *restrict attr, void *(*start_rtn)(void), void *restrict arg)
err = pthread_create(&thready, NULL, &mythread, NULL);
Now the question is where the created thread gets it's PC value. How does the PC value set to the first line of mythread code?