Take the 2-minute tour ×

I have been trying to explore the source code of the getcontext() and setcontext functions but I have not been able to spot the right file or resource. Any help in this regard will be helpful.

I was able to trace to http://fossies.org/dox/glibc-2.14.1/setcontext_8c_source.html but there is no info

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

I think the reason you found it difficult to find the source code is that getcontext and setcontext are (generally?) implemented in assembly than in C. Here are the source codes

setcontext and getcontext

However, these assembly codes are not so easy to read. I think man getcontext is better. Anyways, good luck :)

share|improve this answer
add comment

Your Answer


