Date: Wed, 18 Dec 2013 15:58:52 -0800 From: Adrian Chadd <adrian@freebsd.org> To: Warner Losh <imp@bsdimp.com> Cc: Bruce Evans <bde@freebsd.org>, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: Using sys/types.h types in sys/socket.h Message-ID: <CAJ-Vmom%2BXMZgdKds88id9vhQar=P-bF3UpUFzk4E3KWUw%2BQacQ@mail.gmail.com> In-Reply-To: <CAJ-Vmokb-gcO%2BrEOn-uc42%2BPHzMMQsqBe0NcVtuNRKk7vuM5Qw@mail.gmail.com> References: <CAJ-Vmo=MWPQWfP9duWPPwaKee5Zp9Gemj3GKqE8=bxkjn_1YYA@mail.gmail.com> <9C1291B5-215B-440E-B8B0-6308840F755C@bsdimp.com> <CAJ-Vmokb-gcO%2BrEOn-uc42%2BPHzMMQsqBe0NcVtuNRKk7vuM5Qw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmom%2BXMZgdKds88id9vhQar=P-bF3UpUFzk4E3KWUw%2BQacQ>