Note that large parts of this thread manager are involved with setup of an environment allowing context switching, and that the key parts from the point of view of this assignment come later in the body of the thread package, in the user-callable thread management routines mentioned in the header file, excluding thread_launch(), a body of code that is very difficult to follow. Note also that it is not an error that the header file is not included by the source file!
Part B: Is longjmp() used in the thread manager for exception handling? Where?
main() { int i; i = 0; if (fork()) { int j; for (j = 0;j < 10; j++) { puts( "x" ); } exit(); } else { int j; for (j = 0;j < 10; j++) { puts( "y" ); } exit(); } }Translate this program into code to run under the thread manager and explain any differences you observe between the behavior of the original and the behavior of your code running under the thread manager.