From owner-freebsd-arch@FreeBSD.ORG Wed Dec 18 23:58:53 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC699407; Wed, 18 Dec 2013 23:58:53 +0000 (UTC) Received: from mail-qe0-x231.google.com (mail-qe0-x231.google.com [IPv6:2607:f8b0:400d:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 899BD13D3; Wed, 18 Dec 2013 23:58:53 +0000 (UTC) Received: by mail-qe0-f49.google.com with SMTP id w7so372986qeb.8 for ; Wed, 18 Dec 2013 15:58:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Umm5I5P/0FAtIP3tF7U765mlqSQEz0r9oQhbwzzRLsc=; b=jdCP2TQC2RFvcAYDokJC8/jA/22EnfGNrhd2qQY2ATg+HodtRFGzH943Nh6zkRIWnv AlRWHhzTV+YQWKOAPCCfdzBnxorzFgoC7deeRmYBvM8qu/hmsrfByZUx8B5REovJViMZ JHGJS4BywrP4OKQzbeu4aIi+Xj+0V03wjJDcqBp4bgW4nOlE7G19OBhhL9RYRf136cW0 vRV3LCCZUSBnhlUhLs+Ds9ZR6URhlpnAwJ5wzQ2wDQ7zI0z+6Q+d7KZ79e/qzy11rXML HuTdGg2KFZmTAP1Pma33lhJoKZlUtFXPEK0+k5/Xn7048AYUv1he1xm21/Tm+FoZB1P+ iQTw== MIME-Version: 1.0 X-Received: by 10.49.17.232 with SMTP id r8mr59024896qed.74.1387411132719; Wed, 18 Dec 2013 15:58:52 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Wed, 18 Dec 2013 15:58:52 -0800 (PST) In-Reply-To: References: <9C1291B5-215B-440E-B8B0-6308840F755C@bsdimp.com> Date: Wed, 18 Dec 2013 15:58:52 -0800 X-Google-Sender-Auth: MJF648XMA1mLJqpH_t58KzQsqFk Message-ID: Subject: Re: Using sys/types.h types in sys/socket.h From: Adrian Chadd To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 18 Dec 2013 23:58:53 -0000 Ok, how about this: Index: sys/sys/socket.h =================================================================== --- sys/sys/socket.h (revision 259475) +++ sys/sys/socket.h (working copy) @@ -84,6 +84,16 @@ #endif #endif +#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 @@ }; /* + * 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 #ifdef _KERNEL #define SFK_COMPAT 0x00000001