From owner-freebsd-arch@FreeBSD.ORG Thu Dec 19 03:07:18 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D2CF1A for ; Thu, 19 Dec 2013 03:07:18 +0000 (UTC) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EE24B11B9 for ; Thu, 19 Dec 2013 03:07:17 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id to1so696496ieb.32 for ; Wed, 18 Dec 2013 19:07:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=RiHwS9Uy8GVqg/ovSkY+YgDWYyFhI0OsJHFGelxRiV8=; b=Z7p7OhAxAi8wAfoIY5f3q6eizf9czlxmEKgPRJQlovetLLV4uoqIWGrqPjwZbOPtY1 5zIUpLWr2LO7lhgMWFuuoxk3BmLaRWQ56VnyfOes7u3n/yQpPSbNPjE9qYF54ZDJKpmW /XXkbU8WBXZf/KBaof+nJXIWSYsk2/XVjGxbAs5dRmoYySRAOFjKh8W9i7tFOKgd5EIs N2SgDP1Rm81BH2WlTV3R4Z6L8PhTS2q8MmhET+eQEatxhwszt5kKITgV7xCee/du3jms Nv9YSoPuHQQXg2j0CyWAQQp+k4IhbmHWbmNUxWApseX5MtZBJ5erJDI6hnrRBuI3+0+X zuWg== X-Gm-Message-State: ALoCoQmJJ2mJQefdpSw5P9F791WEH1K9JxbL2vRYHLqMfl2l2a7E89WRmXn7XfznkMl96nXSYJWZ X-Received: by 10.50.143.10 with SMTP id sa10mr306925igb.8.1387422072031; Wed, 18 Dec 2013 19:01:12 -0800 (PST) Received: from [10.0.0.23] (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id f5sm3649920igc.4.2013.12.18.19.01.11 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 18 Dec 2013 19:01:11 -0800 (PST) Sender: Warner Losh Subject: Re: Using sys/types.h types in sys/socket.h Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 18 Dec 2013 20:01:10 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <9C1291B5-215B-440E-B8B0-6308840F755C@bsdimp.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1085) Cc: Bruce Evans , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Dec 2013 03:07:18 -0000 Hmmm, not quite. These need to be inside a __BSD_VISIBLE block, which = you can leverage from the immediately previous block. Warner On Dec 18, 2013, at 4:58 PM, Adrian Chadd wrote: > Ok, how about this: >=20 > Index: sys/sys/socket.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/sys/socket.h (revision 259475) > +++ sys/sys/socket.h (working copy) > @@ -84,6 +84,16 @@ > #endif > #endif >=20 > +#ifndef _UINT32_T_DECLARED > +#define _UINT32_T_DECLARED > +typedef __uint32_t uint32_t; > +#endif > + > +#ifndef _UINTPTR_T_DECLARED > +#define _UINTPTR_T_DECLARED > +typedef __uintptr_t uintptr_t; > +#endif > + > /* > * Types > */ > @@ -577,11 +587,27 @@ > }; >=20 > /* > + * sendfile(2) kqueue information > + */ > +struct sf_hdtr_kq { > + int kq_fd; /* kq fd to post completion events on = */ > + uint32_t kq_flags; /* extra flags to pass in */ > + void *kq_udata; /* user data pointer */ > + uintptr_t kq_ident; /* ident (from userland?) */ > +}; > + > +struct sf_hdtr_all { > + struct sf_hdtr hdtr; > + struct sf_hdtr_kq kq; > +}; > + > +/* > * Sendfile-specific flag(s) > */ > #define SF_NODISKIO 0x00000001 > #define SF_MNOWAIT 0x00000002 > #define SF_SYNC 0x00000004 > +#define SF_KQUEUE 0x00000008 >=20 > #ifdef _KERNEL > #define SFK_COMPAT 0x00000001