X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.cc;h=9b7954d9386b6f5390ed42a32b43a53f5f5f1ca7;hb=08b069a092910d66bab08096177d9f97461725e4;hp=7fa4281d36597db401dfb0b93da45f27f60a1ead;hpb=c36dd97a0b4924e1c906f7931d7ed515d5d7dc61;p=model-checker.git diff --git a/threads.cc b/threads.cc index 7fa4281..9b7954d 100644 --- a/threads.cc +++ b/threads.cc @@ -73,8 +73,9 @@ int Thread::create_context() /** * Swaps the current context to another thread of execution. This form switches * from a user Thread to a system context. - * @param t Thread representing the current context - * @param ctxt Context to switch to + * @param t Thread representing the currently-running thread. The current + * context is saved here. + * @param ctxt Context to which we will swap. Must hold a valid system context. * @return Does not return, unless we return to Thread t's context. See * swapcontext(3) (returns 0 for success, -1 for failure). */ @@ -86,9 +87,9 @@ int Thread::swap(Thread *t, ucontext_t *ctxt) /** * Swaps the current context to another thread of execution. This form switches * from a system context to a user Thread. - * @param t Thread representing the current context - * @param ctxt Context to switch to - * @return Does not return, unless we return to Thread t's context. See + * @param ctxt System context variable to which to save the current context. + * @param t Thread to which we will swap. Must hold a valid user context. + * @return Does not return, unless we return to the system context (ctxt). See * swapcontext(3) (returns 0 for success, -1 for failure). */ int Thread::swap(ucontext_t *ctxt, Thread *t)