From owner-freebsd-hackers Sat Nov 18 23:57:46 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id XAA18007 for hackers-outgoing; Sat, 18 Nov 1995 23:57:46 -0800 Received: from werple.net.au (0@werple.mira.net.au [203.9.190.18]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id XAA18002 for ; Sat, 18 Nov 1995 23:57:42 -0800 Received: from cimaxp1.UUCP (Ucimlogi@localhost) by werple.net.au (8.7/8.7.1) with UUCP id SAA27472 for hackers@FreeBSD.org; Sun, 19 Nov 1995 18:15:07 +1100 (EST) Message-Id: <199511190715.SAA27472@werple.net.au> X-Authentication-Warning: werple.net.au: Ucimlogi set sender to cimaxp1!jb using -f Received: by cimaxp1.cimlogic.com.au; (5.65/1.1.8.2/10Sep95-0953AM) id AA14824; Sun, 19 Nov 1995 18:18:58 +1100 From: John Birrell Subject: Re: int type in jmpbuf To: bde@zeta.org.au (Bruce Evans) Date: Sun, 19 Nov 1995 18:18:57 +1100 (EST) Cc: hackers@FreeBSD.org, jb@cimlogic.com.au In-Reply-To: <199511190529.QAA20802@godzilla.zeta.org.au> from "Bruce Evans" at Nov 19, 95 04:29:36 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.org Precedence: bulk > The whole struct should probably be delcared in a machine dependent file > as something like > > typedef struct { > __type_whose_alignment_requirement_i_maximal_t _jb0; > char _jb1[_NOT_QUITE_THE_FULL_SIZEOF_JMP_BUF]; > } jmp_buf[1]; I don't understand the significance of the type (__type_whose..imal_t) for _jb0 vs char for _jb1. How is this different to typedef struct { char _jb0[_THE_FULL_SIZEOF_JMP_BUF]; } jmp_buf[1]; And if the whole struct should be declared in a machine dependent file, what would prevent us from defining the structure from what it contains typedef struct { long reg_edx; long reg_ebx; long reg_esp; : : } jmp_buf[1]; I guess the answer to this is that it is supposed to be opaque, but in my case I have to manually setup a jmp_buf for each user-space thread and I'd like a clean way of accessing the structure. Any ideas? > > longs just happen to be right for a few more machine than ints. Agreed. > > Bruce > -- John Birrell CIMlogic Pty Ltd jb@cimlogic.com.au 119 Cecil Street Ph +61 3 9690 9600 South Melbourne Vic 3205 Fax +61 3 9690 6650 Australia Mob +61 18 353 137