Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Sep 1999 10:08:21 -0400 (EDT)
From:      Peter Dufault <dufault@hda.com>
To:        marcel@scc.nl (Marcel Moolenaar)
Cc:        current@FreeBSD.ORG
Subject:   Re: (P)review: sigset_t for more than 32 signals
Message-ID:  <199909061408.KAA07292@hda.hda.com>
In-Reply-To: <37D3C7A5.1B8A4935@scc.nl> from Marcel Moolenaar at "Sep 6, 99 03:54:45 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
> Peter Dufault wrote:
> 
> > Firstly, you should get rid of any explicit 32, 31, etc and anything
> > else tied to the assumed number of bits in an int.
> 
> You first need to get rid of any code that assumes that siget_t is an
> (unsigned) integer. Use macros to abstract the access to the new sigset_t
> so that you don't replace one assumption with the other...

But you want that code to break.

> 
> > typedef struct {
> >         unsigned int n;
> >         uint64_t v;
> > } sigset_t;
> 
> You can't use any BSD or FreeBSD specific types (such as u_int32)t) in
> publicly visible types (such as sigset_t). It breaks programs because it's
> not ANSI and/or Posix.

Further on you'll see I don't support this (this was a "dramatization"
of the structure), however, because the typedef ends in "_t" it is
reserved by POSIX for the implementation.

This is a particularly safe implementation typedef,
since I don't anticipate uint64_t ever being used in a future specification
as a different data type.

I don't know about ANSI.

Peter

-- 
Peter Dufault (dufault@hda.com)   Realtime development, Machine control,
HD Associates, Inc.               Safety critical systems, Agency approval


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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