Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Nov 1995 18:18:57 +1100 (EST)
From:      John Birrell <cimaxp1!jb@werple.net.au>
To:        bde@zeta.org.au (Bruce Evans)
Cc:        hackers@FreeBSD.org, jb@cimlogic.com.au
Subject:   Re: int type in jmpbuf
Message-ID:  <199511190715.SAA27472@werple.net.au>
In-Reply-To: <199511190529.QAA20802@godzilla.zeta.org.au> from "Bruce Evans" at Nov 19, 95 04:29:36 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199511190715.SAA27472>