From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ccd94c554b83ce47 X-Google-Attributes: gidfee84,public From: Jeff Denham Subject: Re: Problem with makecontext() Date: 1999/03/29 Message-ID: <36FFBD1A.ACFFD222@brighttiger.com>#1/1 X-Deja-AN: 460418715 Content-Transfer-Encoding: 7bit References: <7dgr3h$d61$1@nnrp1.dejanews.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@digex.net X-Trace: dca1-nnrp1.news.digex.net 922729822 207.86.119.34 (Mon, 29 Mar 1999 12:50:22 EDT) Organization: Bright Tiger Technologies MIME-Version: 1.0 NNTP-Posting-Date: Mon, 29 Mar 1999 12:50:22 EDT Newsgroups: comp.unix.osf.osf1 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 > #include > > 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