Email List: Xaustin-group-lX
[All Lists]

uc_link in setcontext() spec

To: austin-group-l@xxxxxxxxxxxxx
Subject: uc_link in setcontext() spec
From: ERSEK Laszlo <lacos@xxxxxxx>
Date: Wed, 06 May 2009 01:27:40 +0200
(Somewhat related to "Enhancement Request Number 106" in [1].)

Although setcontext() seems to be removed in Issue 7 after being
declared Obsolescent in Issue 6, I'd like to ask for help interpreting
the setcontext() specification in Issue 6.

--v--
int setcontext(const ucontext_t *ucp);

The setcontext() function shall restore the user context pointed to by
ucp. [...] If the ucp argument was created with makecontext(), program
execution continues with the function passed to makecontext(). When that
function returns, the thread shall continue as if after a call to
setcontext() with the ucp argument that was input to makecontext().
--^--

Shouldn't the last sentence say something like this?

--v--
When that function returns, the thread shall continue as if after a call
to setcontext() with the *ucp->uc_link* argument that was input to
makecontext().
--^--

(= replace "ucp" with "ucp->uc_link".) Especially because the very next
sentence *continues* to talk about "ucp->uc_link":

--v--
If the uc_link member of the ucontext_t structure pointed to by the ucp
argument is equal to 0, [...]
--^--


In its current form I find this part of the setcontext() spec
contradicting to the makecontext() and ucontext_t specs. Does this merit
an aardvark report or is it me misunderstanding something?

Thank you very much,
Laszlo Ersek

[1] http://www.opengroup.org/austin/aardvark/latest/xshbug2.txt

<Prev in Thread] Current Thread [Next in Thread>