[openbeosnetteam] Re: Fix in posix headers
- From: "Andrew Bachmann" <shatty@xxxxxxxxxxxxx>
- To: openbeosnetteam@xxxxxxxxxxxxx
- Date: Sun, 30 Nov 2003 19:29:36 -0800 PST
Hello all,
I'm concerned about this patch because it makes an assumption about the type of
sem_id and
thread_id that may be true now (and for the near future) but may change. Is it
possible for us to
put sem_id and thread_id in some place where they can be included without us
being forced to
include all of OS.h ? (presumably OS.h would include the same to get the same
definitions) It
also affects code readability I think. On the other hand we could postpone
fixing this until we
change sem_id and/or thread_id and things start mysteriously breaking in
networking. :-)
Andrew
"Niels Reedijk" <n.reedijk@xxxxxxxxx> wrote:
> Hi,
>
> There's a mistake in the net/if.net posix header file, it includes
> socketvars.h (which is now private) and it uses thread_id and sem_id
> (which are unknown in posix namespace). I'd like to merge the following
> patch (with your permission).
>
> patch-1
> Rename thread_id and sem_id to fix codycam (and others) compile
> prob
>
> The diff is attached below. May I merge the patch to CVS?
>
> Niels Reedijk
>
> --- orig/net/if.h
> +++ mod/net/if.h
> @@ -6,7 +6,6 @@
> #define _NET_IF_H
>
> #include <Drivers.h>
> -#include <sys/socketvar.h>
> #include <net/if_types.h>
> #include <netinet/in.h>
> #include <net/route.h>
> @@ -50,8 +49,8 @@
> struct mbuf *tail;
> int maxlen;
> int len;
> - sem_id lock;
> - sem_id pop;
> + int32 lock; //sem_id but is unknown in posixland
> + int32 pop; //sem_id but is unknown in posixland
> };
>
> #define IFQ_FULL(ifq) (ifq->len >= ifq->maxlen)
> @@ -139,9 +138,9 @@
> int if_index; /* our index in ifnet_addrs and
> interfaces */
>
> struct ifq *rxq;
> - thread_id rx_thread;
> + int32 rx_thread; /* thread_id is unknown in
> posixland */
> struct ifq *txq;
> - thread_id tx_thread;
> + int32 tx_thread; /* thread_id is unknown in
> posixland */
> struct ifq *devq;
>
> int (*start) (struct ifnet *);
>
- Follow-Ups:
- [openbeosnetteam] Re: Fix in posix headers
- From: Niels Reedijk
- References:
- [openbeosnetteam] Fix in posix headers
- From: Niels Reedijk
Other related posts:
- » [openbeosnetteam] Fix in posix headers
- » [openbeosnetteam] Re: Fix in posix headers
- » [openbeosnetteam] Re: Fix in posix headers
- » [openbeosnetteam] Re: Fix in posix headers
- » [openbeosnetteam] Re: Fix in posix headers
- » [openbeosnetteam] Re: Fix in posix headers
- [openbeosnetteam] Re: Fix in posix headers
- From: Niels Reedijk
- [openbeosnetteam] Fix in posix headers
- From: Niels Reedijk