X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Date: Mon, 17 May 2004 14:29:51 +0200 (MEST) From: Gabriel Zoltan X-X-Sender: gz331 AT ural2 To: djgpp AT delorie DOT com Subject: Re: Task switch with SIGALRM In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk Hi! Thanks for the code you provided. I'm going to try to use setjmp/longjmp. The only thing I don't understand is how you set up the jmp_buf structure initially. How do I run a task for the first time? Could someone please explain it? (Sadly I'm quite in a rush for trial&error.) Thanks in advance. Zoltan On Mon, 17 May 2004, Lawrence Rust wrote: > It may prove useful to look at the source for setjmp and longjmp to see > what's needed. IMHO it's probably easier to use setjmp and longjmp to > switch between threads since these routines already handle the complexity.