Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Jeff Denham <jdenham@brighttiger.com>
Subject: Re: Problem with makecontext()
Date: 1999/03/29	[thread overview]
Message-ID: <36FFBD1A.ACFFD222@brighttiger.com> (raw)
In-Reply-To: 7dgr3h$d61$1@nnrp1.dejanews.com

jtensin@my-dejanews.com wrote:

> Greetings, all.
>
> I have trouble calling makecontext() using Alpha/OSF1. For example,
> the following "minimum" code just gives me a core dump on Alpha while
> runs fine on Sparc/SunOs. Could someone help me out here? Many thanks
> in advance.
>
> -Jeff
>
> /* cc min.c */
> #include <stdlib.h>
> #include <ucontext.h>
>
> void *
> do_nothing (void *arg)
> {
>    return NULL;
> }
>
> int
> main ()
> {
>    ucontext_t *t;
>
>    if ( !(t=(ucontext_t *)malloc(sizeof(ucontext_t))) ) {
>       printf("error: malloc failed!\n");
>       return -1;
>    }
>
>    if ( getcontext(t) != 0 ) {
>       printf("error: getcontext failed!\n");
>       return -1;
>    }
>    makecontext(t, (void (*)())do_nothing, 2, 1);
>    return 1;
>
> }
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own

What version of the OS? IIRC, I put a number of fixes for makecontext()/
swapcontext() into V4.0D. I don't know if they were ever turned
into patches for earlier releases. If you're running V4.0D, then I
can't help you, because I no longer have access to a DU system :^)

-- Jeff
__________________________________________________
Jeff Denham (jdenham@brighttiger.com)

Bright Tiger Technologies:  Resource-management software
for building and managing fast, reliable web sites
See us at http://www.brighttiger.com

125 Nagog Park
Acton, MA 01720
Phone: (978) 263-5455 x177
Fax:   (978) 263-5547





  reply	other threads:[~1999-03-29  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-26  5:00 Problem with makecontext() jtensin
1999-03-29  5:00 ` Jeff Denham [this message]
1999-03-29  5:00   ` jtensin
1999-03-29  5:00     ` Jeff Denham
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox