http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55749



--- Comment #2 from blue_3too at hotmail dot com 2012-12-20 16:17:20 UTC ---

Thanks for the comments. I checked the document @

gcc.gnu.org/onlinedocs/gcc/Labels-as-Values.html . But find no description hat

label-as-a-value should be used with computed goto.  Can you be more specific

about where is the decription from?



But back to my problem: my_labe is a resuming point for a thread to acquire a

lock after being blocked on the lock and slept. When it is waken, it should

resume execution from my_label. So I guess it conradicts with following

description in the doc:

"You may not use this mechanism to jump to code in a different function. If you

do that, totally unpredictable things happen. The best way to avoid this is to

store the label address only in automatic variables and never pass it as an

argument. "



Because the label is passed out of the function, it is used to jump back the

function when the sleeping thread is awaken. Now

Reply via email to