Re: non sequential execution...



s88 wrote:
thank for your answer!!

I found another way...

Please include enough context for people to know what you are talking about. Most people do not use Google and there is absolutely no guarantee that they will have seen earlier messages in the thread. Search this group for "Google context" to find instructions on how to post properly through Google.


jmp_buf flag1,flag2;
void add(){
        execution(1);
        if(setjmp(flag1)){
                execution(3);
                longjmp(flag2,1);
        }
}

void sub(){
        execution(2);
        if(setjmp(flag2)){
                execution(4);
                return;
        }
        longjmp(flag1,1);
}

This is not valid C. You are only allowed to call longjmp with a buffer for a function that has not yet terminated.


But it seems a little bit complicated..
Does exist more elegant way?

Why would you want to do this? If you can come up with a sensible scenario in which you think this behaviour is required we can try to come up with a sensible way of solving the problem.
--
Flash Gordon
Living in interesting times.
Although my email address says spam, it is real and I read it.
.




Relevant Pages

  • Re: wodim woes on dvd writer
    ... None that I'm choosing to repeat. ... creators that you may find via google have already been proven to be void. ... The wodim creators and the CDDL author, yes, void, right... ...
    (comp.os.linux.misc)
  • Re: Dave Kelly
    ... The Void wrote: ... bios of many many jugglers but Google doesn't say anything about Mr. Dave ... I saw all Kelly's combo tricks videos and I was wonder is there any uncut ... More Dave on JTV: ...
    (rec.juggling)
  • Re: googletest!
    ... i take it google is being a butt today or last night? ... > or into the void?! ...
    (alt.gathering.rainbow)
  • Re: error compiling this thread
    ... when trying to execute the line ... does not match 'void* ' ... Google on comp.programming.threads... ... but I don't see how the threading takes place in above replacement. ...
    (comp.programming.threads)
  • Re: error compiling this thread
    ... when trying to execute the line ... does not match 'void* ' ... Google on comp.programming.threads... ... in .cpp file ...
    (comp.programming.threads)