> > If you
> > simply write in the documentation "don't use that member", intellegient
> > programmers won't use it. And unintellegient programmers will make stupid
> > mistakes no matter how you try to protect them.
> 
> For example, one of the OSes I use defines jmp_buf as:
> 
> struct __jmp_buf {
>         int     jb_eip;
>         int     jb_ebx;
>         int     jb_esp;
>         int     jb_ebp;
>         int     jb_esi;
>         int     jb_edi;
>         int     jb_mask;
>         int     jb_pad[3];      /* preserve historical mistake */
> };
> 
> typedef struct __jmp_buf jmp_buf[1];
> 
> I haven't sene many programmers who go and fiddle with struct
> __jmp_buf instead of using setjmp/longjmp.  Another OS defines
> jmp_buf even better:

You don't have to look very far, actually.

http://www.cs.huji.ac.il/course/os/Ex3/demo.c

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to