(threadfct): Initialize context before calling makecontext.