Synchronize on NetBSD-CVS (2013/12/1 12:00:00 UTC)
- Fix for possible unset uid/gid in toproto
- Fix for default mtree style
- Update libelf
- Importing libexecinfo
- Resynchronize GCC, mpc, gmp, mpfr
- build.sh: Replace params with show-params.
This has been done as the make target has been renamed in the same
way, while a new target named params has been added. This new
target generates a file containing all the parameters, instead of
printing it on the console.
- Update test48 with new etc/services (Fix by Ben Gras <ben@minix3.org)
get getservbyport() out of the inner loop
Change-Id: Ie6ad5226fa2621ff9f0dee8782ea48f9443d2091
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.143 2012/02/19 21:06:57 rmind Exp $
|
||||
# $NetBSD: Makefile,v 1.144 2013/10/27 08:35:40 mbalmer Exp $
|
||||
|
||||
.include <bsd.sys.mk>
|
||||
|
||||
@@ -20,7 +20,7 @@ INCS= acct.h agpio.h aio.h ansi.h aout_mids.h ataio.h atomic.h audioio.h \
|
||||
ieee754.h inttypes.h ioccom.h ioctl.h ioctl_compat.h iostat.h ipc.h \
|
||||
joystick.h \
|
||||
kcore.h kcpuset.h kgdb.h kmem.h ksem.h ksyms.h ktrace.h \
|
||||
localedef.h lock.h lockf.h lwp.h lwpctl.h \
|
||||
localedef.h lock.h lockf.h lua.h lwp.h lwpctl.h \
|
||||
malloc.h mallocvar.h mbuf.h md4.h md5.h midiio.h \
|
||||
mman.h module.h mount.h mqueue.h msg.h msgbuf.h mtio.h mutex.h \
|
||||
namei.h null.h \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: aout_mids.h,v 1.1 2009/08/20 22:07:49 he Exp $ */
|
||||
/* $NetBSD: aout_mids.h,v 1.2 2012/12/27 06:55:49 martin Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009, The NetBSD Foundation, Inc.
|
||||
@@ -60,6 +60,7 @@
|
||||
#define MID_SPARC64 156 /* LP64 sparc */
|
||||
#define MID_X86_64 157 /* AMD x86-64 */
|
||||
#define MID_SH5_32 158 /* ILP32 SH5 */
|
||||
#define MID_IA64 159 /* Itanium */
|
||||
#define MID_HP200 200 /* hp200 (68010) BSD binary */
|
||||
#define MID_HP300 300 /* hp300 (68020+68881) BSD binary */
|
||||
#define MID_HPUX 0x20C /* hp200/300 HP-UX binary */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bitops.h,v 1.9 2011/07/30 16:35:58 christos Exp $ */
|
||||
/* $NetBSD: bitops.h,v 1.11 2012/12/07 02:27:58 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007, 2010 The NetBSD Foundation, Inc.
|
||||
@@ -188,9 +188,7 @@ fls64(uint64_t _n)
|
||||
* version written by David Howells.
|
||||
*/
|
||||
#define _ilog2_helper(_n, _x) ((_n) & (1ULL << (_x))) ? _x :
|
||||
#define ilog2(_n) \
|
||||
( \
|
||||
__builtin_constant_p(_n) ? ( \
|
||||
#define _ilog2_const(_n) ( \
|
||||
_ilog2_helper(_n, 63) \
|
||||
_ilog2_helper(_n, 62) \
|
||||
_ilog2_helper(_n, 61) \
|
||||
@@ -255,7 +253,12 @@ fls64(uint64_t _n)
|
||||
_ilog2_helper(_n, 2) \
|
||||
_ilog2_helper(_n, 1) \
|
||||
_ilog2_helper(_n, 0) \
|
||||
-1) : ((sizeof(_n) > 4 ? fls64(_n) : fls32(_n)) - 1) \
|
||||
-1)
|
||||
|
||||
#define ilog2(_n) \
|
||||
( \
|
||||
__builtin_constant_p(_n) ? _ilog2_const(_n) : \
|
||||
((sizeof(_n) > 4 ? fls64(_n) : fls32(_n)) - 1) \
|
||||
)
|
||||
|
||||
static __inline void
|
||||
@@ -291,4 +294,36 @@ fast_remainder32(uint32_t _v, uint32_t _div, uint32_t _m, uint8_t _s1,
|
||||
return _v - _div * fast_divide32(_v, _div, _m, _s1, _s2);
|
||||
}
|
||||
|
||||
#define __BITMAP_TYPE(__s, __t, __n) struct __s { \
|
||||
__t _b[__BITMAP_SIZE(__t, __n)]; \
|
||||
}
|
||||
|
||||
#define __BITMAP_BITS(__t) (sizeof(__t) * NBBY)
|
||||
#define __BITMAP_SHIFT(__t) (ilog2(__BITMAP_BITS(__t)))
|
||||
#define __BITMAP_MASK(__t) (__BITMAP_BITS(__t) - 1)
|
||||
#define __BITMAP_SIZE(__t, __n) \
|
||||
(((__n) + (__BITMAP_BITS(__t) - 1)) / __BITMAP_BITS(__t))
|
||||
#define __BITMAP_BIT(__n, __v) \
|
||||
(1 << ((__n) & __BITMAP_MASK(*(__v)->_b)))
|
||||
#define __BITMAP_WORD(__n, __v) \
|
||||
((__n) >> __BITMAP_SHIFT(*(__v)->_b))
|
||||
|
||||
#define __BITMAP_SET(__n, __v) \
|
||||
((__v)->_b[__BITMAP_WORD(__n, __v)] |= __BITMAP_BIT(__n, __v))
|
||||
#define __BITMAP_CLR(__n, __v) \
|
||||
((__v)->_b[__BITMAP_WORD(__n, __v)] &= ~__BITMAP_BIT(__n, __v))
|
||||
#define __BITMAP_ISSET(__n, __v) \
|
||||
((__v)->_b[__BITMAP_WORD(__n, __v)] & __BITMAP_BIT(__n, __v))
|
||||
|
||||
#if __GNUC_PREREQ__(2, 95)
|
||||
#define __BITMAP_ZERO(__v) \
|
||||
(void)__builtin_memset((__v), 0, sizeof(*__v))
|
||||
#else
|
||||
#define __BITMAP_ZERO(__v) do { \
|
||||
size_t __i; \
|
||||
for (__i = 0; __i < __arraycount(__v->_b); __i++) \
|
||||
(__v)->_b[__i] = 0; \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
#endif /* GCC 2.95 */
|
||||
|
||||
#endif /* _SYS_BITOPS_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bootblock.h,v 1.54 2012/07/02 22:42:18 abs Exp $ */
|
||||
/* $NetBSD: bootblock.h,v 1.55 2013/04/04 12:53:00 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002-2004 The NetBSD Foundation, Inc.
|
||||
@@ -1409,7 +1409,7 @@ struct vax_boot_block {
|
||||
uint8_t bb_mbone; /* must be one */
|
||||
uint16_t bb_lbn_hi; /* lbn (hi word) of bootstrap */
|
||||
uint16_t bb_lbn_low; /* lbn (low word) of bootstrap */
|
||||
uint8_t pad1[460];
|
||||
uint8_t pad1[406];
|
||||
/* disklabel offset is 64 from base, or 56 from start of pad1 */
|
||||
|
||||
/* The rest of these fields are identification area and describe
|
||||
@@ -1432,7 +1432,7 @@ struct vax_boot_block {
|
||||
|
||||
/* The rest is unused.
|
||||
*/
|
||||
uint8_t pad2[20];
|
||||
uint8_t pad2[74];
|
||||
} __packed;
|
||||
|
||||
#define VAX_BOOT_MAGIC1 0x18 /* size of BB info? */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: bus_proto.h,v 1.6 2011/08/17 10:46:38 martin Exp $ */
|
||||
/* $NetBSD: bus_proto.h,v 1.7 2013/02/04 13:18:35 macallan Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2001, 2007 The NetBSD Foundation, Inc.
|
||||
@@ -319,6 +319,8 @@ bool bus_space_handle_is_equal(bus_space_tag_t, bus_space_handle_t,
|
||||
#define BUS_DMA_READ 0x100 /* mapping is device -> memory only */
|
||||
#define BUS_DMA_WRITE 0x200 /* mapping is memory -> device only */
|
||||
#define BUS_DMA_NOCACHE 0x400 /* hint: map non-cached memory */
|
||||
#define BUS_DMA_PREFETCHABLE 0x800 /* hint: map non-cached but allow
|
||||
* things like write combining */
|
||||
|
||||
/* Operations performed by bus_dmamap_sync(). */
|
||||
#define BUS_DMASYNC_PREREAD 0x01 /* pre-read synchronization */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cdefs.h,v 1.100 2012/08/24 05:47:51 dholland Exp $ */
|
||||
/* $NetBSD: cdefs.h,v 1.116 2013/10/25 14:54:25 apb Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -148,8 +148,8 @@
|
||||
#else
|
||||
#define __CTASSERT(x) __CTASSERT0(x, __ctassert, __LINE__)
|
||||
#endif
|
||||
#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z)
|
||||
#define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1]
|
||||
#define __CTASSERT0(x, y, z) __CTASSERT1(x, y, z)
|
||||
#define __CTASSERT1(x, y, z) typedef char y ## z[/*CONSTCOND*/(x) ? 1 : -1] __unused
|
||||
|
||||
/*
|
||||
* The following macro is used to remove const cast-away warnings
|
||||
@@ -250,18 +250,45 @@
|
||||
#define __noclone /* nothing */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __unused: Note that item or function might be unused.
|
||||
*/
|
||||
#if __GNUC_PREREQ__(2, 7)
|
||||
#define __unused __attribute__((__unused__))
|
||||
#else
|
||||
#define __unused /* delete */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __used: Note that item is needed, even if it appears to be unused.
|
||||
*/
|
||||
#if __GNUC_PREREQ__(3, 1)
|
||||
#define __used __attribute__((__used__))
|
||||
#else
|
||||
#define __used __unused
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __diagused: Note that item is used in diagnostic code, but may be
|
||||
* unused in non-diagnostic code.
|
||||
*/
|
||||
#if (defined(_KERNEL) && defined(DIAGNOSTIC)) \
|
||||
|| (!defined(_KERNEL) && !defined(NDEBUG))
|
||||
#define __diagused /* empty */
|
||||
#else
|
||||
#define __diagused __unused
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __debugused: Note that item is used in debug code, but may be
|
||||
* unused in non-debug code.
|
||||
*/
|
||||
#if defined(DEBUG)
|
||||
#define __debugused /* empty */
|
||||
#else
|
||||
#define __debugused __unused
|
||||
#endif
|
||||
|
||||
#if __GNUC_PREREQ__(3, 1)
|
||||
#define __noprofile __attribute__((__no_instrument_function__))
|
||||
#else
|
||||
@@ -279,7 +306,7 @@
|
||||
#endif
|
||||
|
||||
/* LSC: Clang/llvm also defines GNUC_PREREQ, but it actually does not
|
||||
* Support those pragma. Make sure it is not used then.*/
|
||||
* Support those pragma. Make sure it is not used then. (MINIX) */
|
||||
#if __GNUC_PREREQ__(4, 0) && !defined(__clang__)
|
||||
# define __dso_public __attribute__((__visibility__("default")))
|
||||
# define __dso_hidden __attribute__((__visibility__("hidden")))
|
||||
@@ -297,6 +324,11 @@
|
||||
# define __BEGIN_HIDDEN_DECLS __BEGIN_EXTERN_C
|
||||
# define __END_HIDDEN_DECLS __END_EXTERN_C
|
||||
#endif
|
||||
#if __GNUC_PREREQ__(4, 2)
|
||||
# define __dso_protected __attribute__((__visibility__("protected")))
|
||||
#else
|
||||
# define __dso_protected
|
||||
#endif
|
||||
|
||||
#define __BEGIN_DECLS __BEGIN_PUBLIC_DECLS
|
||||
#define __END_DECLS __END_PUBLIC_DECLS
|
||||
@@ -470,7 +502,7 @@
|
||||
*
|
||||
* __link_set_decl(set, ptype)
|
||||
* Provide an extern declaration of the set `set', which
|
||||
* contains an array of the pointer type `ptype'. This
|
||||
* contains an array of pointers to type `ptype'. This
|
||||
* macro must be used by any code which wishes to reference
|
||||
* the elements of a link set.
|
||||
*
|
||||
@@ -499,12 +531,22 @@
|
||||
|
||||
#define __link_set_entry(set, idx) (__link_set_start(set)[idx])
|
||||
|
||||
/*
|
||||
* Return the natural alignment in bytes for the given type
|
||||
*/
|
||||
#if __GNUC_PREREQ__(4, 1)
|
||||
#define __alignof(__t) __alignof__(__t)
|
||||
#else
|
||||
#define __alignof(__t) (sizeof(struct { char __x; __t __y; }) - sizeof(__t))
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Return the number of elements in a statically-allocated array,
|
||||
* __x.
|
||||
*/
|
||||
#define __arraycount(__x) (sizeof(__x) / sizeof(__x[0]))
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
/* __BIT(n): nth bit, where __BIT(0) == 0x1. */
|
||||
#define __BIT(__n) \
|
||||
(((uintmax_t)(__n) >= NBBY * sizeof(uintmax_t)) ? 0 : ((uintmax_t)1 << (uintmax_t)(__n)))
|
||||
@@ -512,6 +554,7 @@
|
||||
/* __BITS(m, n): bits m through n, m < n. */
|
||||
#define __BITS(__m, __n) \
|
||||
((__BIT(MAX((__m), (__n)) + 1) - 1) ^ (__BIT(MIN((__m), (__n))) - 1))
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
/* find least significant bit that is set */
|
||||
#define __LOWEST_SET_BIT(__mask) ((((__mask) - 1) & (__mask)) ^ (__mask))
|
||||
@@ -536,17 +579,21 @@
|
||||
#define __CAST(__dt, __st) ((__dt)(__st))
|
||||
#endif
|
||||
|
||||
#define __USE(a) ((void)(a))
|
||||
|
||||
#define __type_mask(t) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
|
||||
(~((1ULL << (sizeof(t) * NBBY)) - 1)) : 0ULL)
|
||||
|
||||
#ifndef __ASSEMBLER__
|
||||
static __inline long long __zeroll(void) { return 0; }
|
||||
static __inline int __negative_p(double x) { return x < 0; }
|
||||
static __inline unsigned long long __zeroull(void) { return 0; }
|
||||
#else
|
||||
#define __zeroll() (0LL)
|
||||
#define __negative_p(x) ((x) < 0)
|
||||
#define __zeroull() (0ULL)
|
||||
#endif
|
||||
|
||||
#define __negative_p(x) (!((x) > 0) && ((x) != 0))
|
||||
|
||||
#define __type_min_s(t) ((t)((1ULL << (sizeof(t) * NBBY - 1))))
|
||||
#define __type_max_s(t) ((t)~((1ULL << (sizeof(t) * NBBY - 1))))
|
||||
#define __type_min_u(t) ((t)0ULL)
|
||||
@@ -556,12 +603,13 @@ static __inline int __negative_p(double x) { return x < 0; }
|
||||
#define __type_max(t) (__type_is_signed(t) ? __type_max_s(t) : __type_max_u(t))
|
||||
|
||||
|
||||
#define __type_fit_u(t, a) (/*LINTED*/sizeof(t) < sizeof(intmax_t) ? \
|
||||
(((a) & __type_mask(t)) == 0) : !__negative_p(a))
|
||||
#define __type_fit_u(t, a) (/*LINTED*/!__negative_p(a) && \
|
||||
(uintmax_t)((a) + __zeroull()) <= (uintmax_t)__type_max_u(t))
|
||||
|
||||
#define __type_fit_s(t, a) (/*LINTED*/__negative_p(a) ? \
|
||||
((intmax_t)((a) + __zeroll()) >= (intmax_t)__type_min_s(t)) : \
|
||||
((intmax_t)((a) + __zeroll()) <= (intmax_t)__type_max_s(t)))
|
||||
((intmax_t)((a) + __zeroll()) >= (intmax_t)0 && \
|
||||
(intmax_t)((a) + __zeroll()) <= (intmax_t)__type_max_s(t)))
|
||||
|
||||
/*
|
||||
* return true if value 'a' fits in type 't'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cdefs_elf.h,v 1.40 2012/03/04 16:14:48 tron Exp $ */
|
||||
/* $NetBSD: cdefs_elf.h,v 1.43 2013/02/07 18:53:34 gdt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
@@ -134,10 +134,10 @@
|
||||
#ifndef __lint__
|
||||
#define __link_set_make_entry(set, sym) \
|
||||
static void const * const __link_set_##set##_sym_##sym \
|
||||
__section("link_set_" #set) __used = &sym
|
||||
__section("link_set_" #set) __used = (const void *)&sym
|
||||
#define __link_set_make_entry2(set, sym, n) \
|
||||
static void const * const __link_set_##set##_sym_##sym##_##n \
|
||||
__section("link_set_" #set) __used = &sym[n]
|
||||
__section("link_set_" #set) __used = (const void *)&sym[n]
|
||||
#else
|
||||
#define __link_set_make_entry(set, sym) \
|
||||
extern void const * const __link_set_##set##_sym_##sym
|
||||
@@ -156,7 +156,7 @@
|
||||
|
||||
#define __link_set_decl(set, ptype) \
|
||||
extern ptype * const __start_link_set_##set[] __dso_hidden; \
|
||||
extern ptype * const __stop_link_set_##set[] __dso_hidden \
|
||||
extern ptype * const __stop_link_set_##set[] __dso_hidden
|
||||
|
||||
#define __link_set_start(set) (__start_link_set_##set)
|
||||
#define __link_set_end(set) (__stop_link_set_##set)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: conf.h,v 1.143 2012/07/29 18:05:48 mlelstv Exp $ */
|
||||
/* $NetBSD: conf.h,v 1.144 2012/10/27 17:18:40 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -44,6 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/queue.h>
|
||||
#include <sys/device_if.h>
|
||||
|
||||
struct buf;
|
||||
struct knote;
|
||||
@@ -264,8 +265,7 @@ void mm_init(void);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef _KERNEL
|
||||
struct device;
|
||||
void setroot(struct device *, int);
|
||||
void setroot(device_t, int);
|
||||
void rootconf(void);
|
||||
void swapconf(void);
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* $NetBSD: cprng.h,v 1.5 2012/04/17 02:50:39 tls Exp $ */
|
||||
/* $NetBSD: cprng.h,v 1.8 2013/07/01 15:22:00 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Thor Lancelot Simon.
|
||||
* by Thor Lancelot Simon and Taylor R. Campbell.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -28,16 +28,19 @@
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* XXX Don't change this to _SYS_CPRNG_H or anything -- code outside
|
||||
* this file relies on its name... (I'm looking at you, ipf!)
|
||||
*/
|
||||
#ifndef _CPRNG_H
|
||||
#define _CPRNG_H
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/fcntl.h>
|
||||
#include <lib/libkern/libkern.h>
|
||||
#include <sys/rnd.h>
|
||||
#include <sys/fcntl.h> /* XXX users bogusly transitively need this */
|
||||
#include <sys/rnd.h> /* XXX users bogusly transitively need this */
|
||||
|
||||
#include <crypto/nist_ctr_drbg/nist_ctr_drbg.h>
|
||||
#include <sys/condvar.h>
|
||||
#include <sys/select.h>
|
||||
|
||||
/*
|
||||
* NIST SP800-90 says 2^19 bytes per request for the CTR_DRBG.
|
||||
@@ -77,75 +80,51 @@ uint32_t cprng_fast32(void);
|
||||
uint64_t cprng_fast64(void);
|
||||
#endif
|
||||
|
||||
typedef struct _cprng_strong {
|
||||
kmutex_t mtx;
|
||||
kcondvar_t cv;
|
||||
struct selinfo selq;
|
||||
NIST_CTR_DRBG drbg;
|
||||
int flags;
|
||||
char name[16];
|
||||
int reseed_pending;
|
||||
int entropy_serial;
|
||||
rndsink_t reseed;
|
||||
} cprng_strong_t;
|
||||
typedef struct cprng_strong cprng_strong_t;
|
||||
|
||||
void cprng_init(void);
|
||||
|
||||
#define CPRNG_INIT_ANY 0x00000001
|
||||
#define CPRNG_REKEY_ANY 0x00000002
|
||||
#define CPRNG_USE_CV 0x00000004
|
||||
#define CPRNG_HARD 0x00000008
|
||||
#define CPRNG_FMT "\177\020\
|
||||
b\0INIT_ANY\0\
|
||||
b\1REKEY_ANY\0\
|
||||
b\2USE_CV\0\
|
||||
b\3HARD\0"
|
||||
|
||||
cprng_strong_t *cprng_strong_create(const char *const, int, int);
|
||||
cprng_strong_t *
|
||||
cprng_strong_create(const char *, int, int);
|
||||
void cprng_strong_destroy(cprng_strong_t *);
|
||||
size_t cprng_strong(cprng_strong_t *, void *, size_t, int);
|
||||
|
||||
size_t cprng_strong(cprng_strong_t *const, void *const, size_t, int);
|
||||
struct knote; /* XXX temp, for /dev/random */
|
||||
int cprng_strong_kqfilter(cprng_strong_t *, struct knote *); /* XXX " */
|
||||
int cprng_strong_poll(cprng_strong_t *, int); /* XXX " */
|
||||
|
||||
void cprng_strong_destroy(cprng_strong_t *);
|
||||
|
||||
extern cprng_strong_t * kern_cprng;
|
||||
extern cprng_strong_t *kern_cprng;
|
||||
|
||||
static inline uint32_t
|
||||
cprng_strong32(void)
|
||||
{
|
||||
uint32_t r;
|
||||
cprng_strong(kern_cprng, &r, sizeof(r), 0);
|
||||
return r;
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline uint64_t
|
||||
cprng_strong64(void)
|
||||
{
|
||||
uint64_t r;
|
||||
uint64_t r;
|
||||
cprng_strong(kern_cprng, &r, sizeof(r), 0);
|
||||
return r;
|
||||
return r;
|
||||
}
|
||||
|
||||
static inline int
|
||||
cprng_strong_ready(cprng_strong_t *c)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
mutex_enter(&c->mtx);
|
||||
if (c->drbg.reseed_counter < NIST_CTR_DRBG_RESEED_INTERVAL) {
|
||||
ret = 1;
|
||||
}
|
||||
mutex_exit(&c->mtx);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static inline void
|
||||
cprng_strong_deplete(cprng_strong_t *c)
|
||||
{
|
||||
mutex_enter(&c->mtx);
|
||||
c->drbg.reseed_counter = NIST_CTR_DRBG_RESEED_INTERVAL + 1;
|
||||
mutex_exit(&c->mtx);
|
||||
}
|
||||
|
||||
static inline int
|
||||
static inline unsigned int
|
||||
cprng_strong_strength(cprng_strong_t *c)
|
||||
{
|
||||
return NIST_BLOCK_KEYLEN_BYTES;
|
||||
}
|
||||
|
||||
void cprng_init(void);
|
||||
int cprng_strong_getflags(cprng_strong_t *const);
|
||||
void cprng_strong_setflags(cprng_strong_t *const, int);
|
||||
|
||||
#endif
|
||||
#endif /* _CPRNG_H */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.h,v 1.36 2012/08/29 17:13:22 drochner Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.39 2013/11/25 03:06:08 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 YAMAMOTO Takashi,
|
||||
@@ -45,10 +45,10 @@ void cpu_idle(void);
|
||||
#ifdef CPU_UCODE
|
||||
#include <sys/cpuio.h>
|
||||
#include <dev/firmload.h>
|
||||
|
||||
/* XXX ifdef COMPAT */
|
||||
#ifdef COMPAT_60
|
||||
#include <compat/sys/cpuio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* cpu_need_resched() must always be called with the target CPU
|
||||
@@ -91,12 +91,10 @@ void cpu_intr_redistribute(void);
|
||||
u_int cpu_intr_count(struct cpu_info *);
|
||||
#endif
|
||||
|
||||
CIRCLEQ_HEAD(cpuqueue, cpu_info);
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern kmutex_t cpu_lock;
|
||||
extern u_int maxcpus;
|
||||
extern struct cpuqueue cpu_queue;
|
||||
extern struct cpu_info **cpu_infos;
|
||||
extern kcpuset_t *kcpuset_attached;
|
||||
extern kcpuset_t *kcpuset_running;
|
||||
|
||||
@@ -120,11 +118,11 @@ struct cpu_ucode_softc {
|
||||
};
|
||||
|
||||
int cpu_ucode_get_version(struct cpu_ucode_version *);
|
||||
/* XXX ifdef COMPAT */
|
||||
int compat6_cpu_ucode_get_version(struct compat6_cpu_ucode *);
|
||||
int cpu_ucode_apply(const struct cpu_ucode *);
|
||||
/* XXX ifdef COMPAT */
|
||||
#ifdef COMPAT_60
|
||||
int compat6_cpu_ucode_get_version(struct compat6_cpu_ucode *);
|
||||
int compat6_cpu_ucode_apply(const struct compat6_cpu_ucode *);
|
||||
#endif
|
||||
int cpu_ucode_load(struct cpu_ucode_softc *, const char *);
|
||||
int cpu_ucode_md_open(firmware_handle_t *, int, const char *);
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu_data.h,v 1.35 2012/09/01 00:24:44 matt Exp $ */
|
||||
/* $NetBSD: cpu_data.h,v 1.36 2013/11/25 03:02:30 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@@ -71,7 +71,6 @@ struct cpu_data {
|
||||
kcondvar_t cpu_xcall; /* cross-call support */
|
||||
int cpu_xcall_pending; /* cross-call support */
|
||||
lwp_t *cpu_onproc; /* bottom level LWP */
|
||||
CIRCLEQ_ENTRY(cpu_info) cpu_qchain; /* circleq of all CPUs */
|
||||
|
||||
cpuid_t cpu_package_id;
|
||||
cpuid_t cpu_core_id;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpuio.h,v 1.8 2012/08/29 17:13:22 drochner Exp $ */
|
||||
/* $NetBSD: cpuio.h,v 1.9 2013/01/05 16:36:38 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007, 2009, 2012 The NetBSD Foundation, Inc.
|
||||
@@ -69,6 +69,19 @@ struct cpu_ucode_version {
|
||||
void *data; /* OUT: CPU ID data */
|
||||
};
|
||||
|
||||
#define IOC_CPU_UCODE_GET_VERSION _IOWR('c', 6, struct cpu_ucode_version)
|
||||
|
||||
#ifdef __i386__
|
||||
/* In order to read the info from an amd64 kernel we need ... */
|
||||
struct cpu_ucode_version_64 {
|
||||
int loader_version; /* IN: md version number */
|
||||
int pad1;
|
||||
void *data; /* OUT: CPU ID data */
|
||||
int must_be_zero;
|
||||
};
|
||||
#define IOC_CPU_UCODE_GET_VERSION_64 _IOWR('c', 6, struct cpu_ucode_version_64)
|
||||
#endif
|
||||
|
||||
struct cpu_ucode {
|
||||
int loader_version; /* md version number */
|
||||
int cpu_nr; /* CPU index or special value below */
|
||||
@@ -77,7 +90,6 @@ struct cpu_ucode {
|
||||
char fwname[PATH_MAX];
|
||||
};
|
||||
|
||||
#define IOC_CPU_UCODE_GET_VERSION _IOWR('c', 6, struct cpu_ucode_version)
|
||||
#define IOC_CPU_UCODE_APPLY _IOW('c', 7, struct cpu_ucode)
|
||||
|
||||
#endif /* !_SYS_CPUIO_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ctype_bits.h,v 1.2 2010/12/14 02:28:57 joerg Exp $ */
|
||||
/* $NetBSD: ctype_bits.h,v 1.5 2013/04/30 00:42:31 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@@ -40,17 +40,29 @@
|
||||
#ifndef _SYS_CTYPE_BITS_H_
|
||||
#define _SYS_CTYPE_BITS_H_
|
||||
|
||||
#define _CTYPE_U 0x01
|
||||
#define _CTYPE_L 0x02
|
||||
#define _CTYPE_N 0x04
|
||||
#define _CTYPE_S 0x08
|
||||
#define _CTYPE_P 0x10
|
||||
#define _CTYPE_C 0x20
|
||||
#define _CTYPE_X 0x40
|
||||
#define _CTYPE_B 0x80
|
||||
#define _CTYPE_A 0x0001 /* Alpha */
|
||||
#define _CTYPE_C 0x0002 /* Control */
|
||||
#define _CTYPE_D 0x0004 /* Digit */
|
||||
#define _CTYPE_G 0x0008 /* Graph */
|
||||
#define _CTYPE_L 0x0010 /* Lower */
|
||||
#define _CTYPE_P 0x0020 /* Punct */
|
||||
#define _CTYPE_S 0x0040 /* Space */
|
||||
#define _CTYPE_U 0x0080 /* Upper */
|
||||
#define _CTYPE_X 0x0100 /* X digit */
|
||||
#define _CTYPE_BL 0x0200 /* Blank */
|
||||
#define _CTYPE_R 0x0400 /* Print */
|
||||
#define _CTYPE_I 0x0800 /* Ideogram */
|
||||
#define _CTYPE_T 0x1000 /* Special */
|
||||
#define _CTYPE_Q 0x2000 /* Phonogram */
|
||||
|
||||
extern const unsigned char *_ctype_;
|
||||
__BEGIN_DECLS
|
||||
extern const unsigned short *_ctype_tab_;
|
||||
extern const short *_tolower_tab_;
|
||||
extern const short *_toupper_tab_;
|
||||
|
||||
extern const unsigned short _C_ctype_tab_[];
|
||||
extern const short _C_toupper_tab_[];
|
||||
extern const short _C_tolower_tab_[];
|
||||
__END_DECLS
|
||||
|
||||
#endif /* !_SYS_CTYPE_BITS_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ctype_inline.h,v 1.2 2010/12/14 02:28:57 joerg Exp $ */
|
||||
/* $NetBSD: ctype_inline.h,v 1.3 2013/04/13 10:21:21 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989 The Regents of the University of California.
|
||||
@@ -45,17 +45,17 @@
|
||||
|
||||
#include <sys/ctype_bits.h>
|
||||
|
||||
#define isdigit(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_N))
|
||||
#define islower(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_L))
|
||||
#define isspace(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_S))
|
||||
#define ispunct(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_P))
|
||||
#define isupper(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_U))
|
||||
#define isalpha(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_U|_CTYPE_L)))
|
||||
#define isxdigit(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_N|_CTYPE_X)))
|
||||
#define isalnum(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define isprint(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N|_CTYPE_B)))
|
||||
#define isgraph(c) ((int)((_ctype_ + 1)[(c)] & (_CTYPE_P|_CTYPE_U|_CTYPE_L|_CTYPE_N)))
|
||||
#define iscntrl(c) ((int)((_ctype_ + 1)[(c)] & _CTYPE_C))
|
||||
#define isalnum(c) ((int)((_ctype_tab_ + 1)[(c)] & (_CTYPE_A|_CTYPE_D)))
|
||||
#define isalpha(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_A))
|
||||
#define iscntrl(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_C))
|
||||
#define isdigit(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_D))
|
||||
#define isgraph(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_G))
|
||||
#define islower(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_L))
|
||||
#define isprint(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_R))
|
||||
#define ispunct(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_P))
|
||||
#define isspace(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_S))
|
||||
#define isupper(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_U))
|
||||
#define isxdigit(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_X))
|
||||
#define tolower(c) ((int)((_tolower_tab_ + 1)[(c)]))
|
||||
#define toupper(c) ((int)((_toupper_tab_ + 1)[(c)]))
|
||||
|
||||
@@ -68,15 +68,7 @@
|
||||
|
||||
#if defined(_ISO_C99_SOURCE) || (_POSIX_C_SOURCE - 0) > 200112L || \
|
||||
(_XOPEN_SOURCE - 0) > 600 || defined(_NETBSD_SOURCE)
|
||||
|
||||
/*
|
||||
* isblank() is implemented as C function, due to insufficient bitwidth in
|
||||
* _ctype_. Note that _B does not mean isblank - it means isprint && !isgraph.
|
||||
*/
|
||||
#if 0
|
||||
#define isblank(c) ((int)((_ctype_ + 1)[(c)] & _B))
|
||||
#endif
|
||||
|
||||
#define isblank(c) ((int)((_ctype_tab_ + 1)[(c)] & _CTYPE_BL))
|
||||
#endif
|
||||
|
||||
#endif /* !_CTYPE_INLINE_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: device.h,v 1.142 2012/07/07 16:15:21 tsutsui Exp $ */
|
||||
/* $NetBSD: device.h,v 1.144 2013/10/12 16:49:01 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996, 2000 Christopher G. Demetriou
|
||||
@@ -321,19 +321,6 @@ struct cfattach {
|
||||
};
|
||||
LIST_HEAD(cfattachlist, cfattach);
|
||||
|
||||
#define CFATTACH_DECL(name, ddsize, matfn, attfn, detfn, actfn) \
|
||||
struct cfattach __CONCAT(name,_ca) = { \
|
||||
.ca_name = ___STRING(name), \
|
||||
.ca_devsize = ddsize, \
|
||||
.ca_flags = 0, \
|
||||
.ca_match = matfn, \
|
||||
.ca_attach = attfn, \
|
||||
.ca_detach = detfn, \
|
||||
.ca_activate = actfn, \
|
||||
.ca_rescan = NULL, \
|
||||
.ca_childdetached = NULL, \
|
||||
}
|
||||
|
||||
#define CFATTACH_DECL3_NEW(name, ddsize, matfn, attfn, detfn, actfn, \
|
||||
rescanfn, chdetfn, __flags) \
|
||||
struct cfattach __CONCAT(name,_ca) = { \
|
||||
@@ -427,7 +414,7 @@ extern int booted_partition; /* the partition on that device */
|
||||
extern daddr_t booted_startblk; /* or the start of a wedge */
|
||||
extern uint64_t booted_nblks; /* and the size of that wedge */
|
||||
|
||||
struct vnode *opendisk(struct device *);
|
||||
struct vnode *opendisk(device_t);
|
||||
int getdisksize(struct vnode *, uint64_t *, unsigned int *);
|
||||
struct dkwedge_info;
|
||||
int getdiskinfo(struct vnode *, struct dkwedge_info *);
|
||||
@@ -482,8 +469,8 @@ void config_defer(device_t, void (*)(device_t));
|
||||
void config_deferred(device_t);
|
||||
void config_interrupts(device_t, void (*)(device_t));
|
||||
void config_mountroot(device_t, void (*)(device_t));
|
||||
void config_pending_incr(void);
|
||||
void config_pending_decr(void);
|
||||
void config_pending_incr(device_t);
|
||||
void config_pending_decr(device_t);
|
||||
void config_create_interruptthreads(void);
|
||||
void config_create_mountrootthreads(void);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dirhash.h,v 1.5 2009/09/27 21:50:48 reinoud Exp $ */
|
||||
/* $NetBSD: dirhash.h,v 1.6 2013/07/07 19:31:26 reinoud Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 Reinoud Zandijk
|
||||
@@ -52,6 +52,7 @@ struct dirhash {
|
||||
uint32_t flags;
|
||||
uint32_t size; /* in bytes */
|
||||
uint32_t refcnt;
|
||||
uint32_t num_files;
|
||||
LIST_HEAD(, dirhash_entry) entries[DIRHASH_HASHSIZE];
|
||||
LIST_HEAD(, dirhash_entry) free_entries;
|
||||
TAILQ_ENTRY(dirhash) next;
|
||||
@@ -79,5 +80,6 @@ int dirhash_lookup(struct dirhash *, const char *, int,
|
||||
struct dirhash_entry **);
|
||||
int dirhash_lookup_freed(struct dirhash *, uint32_t,
|
||||
struct dirhash_entry **);
|
||||
bool dirhash_dir_isempty(struct dirhash *dirh);
|
||||
|
||||
#endif /* _SYS_DIRHASH_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disk.h,v 1.57 2012/06/10 17:05:18 mlelstv Exp $ */
|
||||
/* $NetBSD: disk.h,v 1.59 2013/05/29 15:22:19 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 2004 The NetBSD Foundation, Inc.
|
||||
@@ -421,6 +421,7 @@ struct disk {
|
||||
TAILQ_ENTRY(disk) dk_link; /* link in global disklist */
|
||||
const char *dk_name; /* disk name */
|
||||
prop_dictionary_t dk_info; /* reference to disk-info dictionary */
|
||||
struct disk_geom dk_geom; /* cooked version of dk_info */
|
||||
int dk_bopenmask; /* block devices open */
|
||||
int dk_copenmask; /* character devices open */
|
||||
int dk_openmask; /* composite (bopen|copen) */
|
||||
@@ -523,6 +524,7 @@ bool disk_isbusy(struct disk *);
|
||||
void disk_blocksize(struct disk *, int);
|
||||
struct disk *disk_find(const char *);
|
||||
int disk_ioctl(struct disk *, u_long, void *, int, struct lwp *);
|
||||
void disk_set_info(device_t, struct disk *, const char *);
|
||||
|
||||
void dkwedge_init(void);
|
||||
int dkwedge_add(struct dkwedge_info *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disklabel.h,v 1.112 2012/01/16 18:47:58 christos Exp $ */
|
||||
/* $NetBSD: disklabel.h,v 1.116 2013/11/05 00:36:02 msaitoh Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1988, 1993
|
||||
@@ -46,10 +46,11 @@
|
||||
* disk geometry, filesystem partitions, and drive specific information.
|
||||
* The location of the label, as well as the number of partitions the
|
||||
* label can describe and the number of the "whole disk" (raw)
|
||||
* paritition are machine dependent.
|
||||
* partition are machine dependent.
|
||||
*/
|
||||
#if HAVE_NBTOOL_CONFIG_H
|
||||
#include <nbinclude/machine/disklabel.h>
|
||||
#undef MAXPARTITIONS
|
||||
#define MAXPARTITIONS MAXMAXPARTITIONS
|
||||
#else
|
||||
#include <machine/disklabel.h>
|
||||
#endif /* HAVE_NBTOOL_CONFIG_H */
|
||||
@@ -267,7 +268,7 @@ struct olddisklabel {
|
||||
.set d_ncylinders,52
|
||||
.set d_secpercyl,56
|
||||
.set d_secperunit,60
|
||||
.set d_end_,276 /* size of disk label */
|
||||
.set d_end_,148+(MAXPARTITIONS*16)
|
||||
#endif /* _LOCORE */
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: disklabel_gpt.h,v 1.9 2011/08/16 14:04:26 jakllsch Exp $ */
|
||||
/* $NetBSD: disklabel_gpt.h,v 1.12 2013/11/24 08:17:50 jnemeth Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Marcel Moolenaar
|
||||
@@ -88,6 +88,13 @@ struct gpt_ent {
|
||||
/* UEFI won't recognize file system */
|
||||
#define GPT_ENT_ATTR_LEGACY_BIOS_BOOTABLE (1ULL << 2)
|
||||
/* legacy BIOS boot partition */
|
||||
/* The following three entries are from FreeBSD. */
|
||||
#define GPT_ENT_ATTR_BOOTME (1ULL << 59)
|
||||
/* indicates a bootable partition */
|
||||
#define GPT_ENT_ATTR_BOOTONCE (1ULL << 58)
|
||||
/* attempt to boot this partition only once */
|
||||
#define GPT_ENT_ATTR_BOOTFAILED (1ULL << 57)
|
||||
/* partition that was marked bootonce but failed to boot */
|
||||
|
||||
/*
|
||||
* Partition types defined by the EFI specification:
|
||||
@@ -127,6 +134,8 @@ struct gpt_ent {
|
||||
{0x516e7cb6,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
|
||||
#define GPT_ENT_TYPE_FREEBSD_VINUM \
|
||||
{0x516e7cb8,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
|
||||
#define GPT_ENT_TYPE_FREEBSD_ZFS \
|
||||
{0x516e7cba,0x6ecf,0x11d6,0x8f,0xf8,{0x00,0x02,0x2d,0x09,0x71,0x2b}}
|
||||
/*
|
||||
* The following are unused but documented here to avoid reuse.
|
||||
*
|
||||
@@ -143,7 +152,12 @@ struct gpt_ent {
|
||||
#define GPT_ENT_TYPE_MS_LDM_DATA \
|
||||
{0xaf9b60a0,0x1431,0x4f62,0xbc,0x68,{0x33,0x11,0x71,0x4a,0x69,0xad}}
|
||||
|
||||
#define GPT_ENT_TYPE_LINUX_DATA GPT_ENT_TYPE_MS_BASIC_DATA
|
||||
/*
|
||||
* Linux originally used GPT_ENT_TYPE_MS_BASIC_DATA in place of
|
||||
* GPT_ENT_TYPE_LINUX_DATA.
|
||||
*/
|
||||
#define GPT_ENT_TYPE_LINUX_DATA \
|
||||
{0x0fc63daf,0x8483,0x4772,0x8e,0x79,{0x3d,0x69,0xd8,0x47,0x7d,0xe4}}
|
||||
#define GPT_ENT_TYPE_LINUX_RAID \
|
||||
{0xa19d880f,0x05fc,0x4d3b,0xa0,0x06,{0x74,0x3f,0x0f,0x84,0x91,0x1e}}
|
||||
#define GPT_ENT_TYPE_LINUX_SWAP \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dkio.h,v 1.17 2011/01/18 19:52:24 matt Exp $ */
|
||||
/* $NetBSD: dkio.h,v 1.18 2012/10/19 17:09:07 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1987, 1988, 1993
|
||||
@@ -109,4 +109,15 @@
|
||||
|
||||
#define DIOCTUR _IOR('d', 128, int) /* test unit ready */
|
||||
|
||||
struct disk_discard_params {
|
||||
long maxsize; /* in DEV_BSIZE units */
|
||||
};
|
||||
#define DIOCGDISCARDPARAMS _IOR('d', 129, struct disk_discard_params)
|
||||
|
||||
struct disk_discard_range {
|
||||
daddr_t bno;
|
||||
long size;
|
||||
};
|
||||
#define DIOCDISCARD _IOW('d', 130, struct disk_discard_range)
|
||||
|
||||
#endif /* _SYS_DKIO_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dtrace_bsd.h,v 1.5 2012/01/30 23:31:27 matt Exp $ */
|
||||
/* $NetBSD: dtrace_bsd.h,v 1.7 2012/12/02 01:05:16 chs Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007-2008 John Birrell (jb@freebsd.org)
|
||||
@@ -55,15 +55,8 @@ struct ucred;
|
||||
* Cyclic clock function type definition used to hook the cyclic
|
||||
* subsystem into the appropriate timer interrupt.
|
||||
*/
|
||||
typedef void (*cyclic_clock_func_t)(struct trapframe *);
|
||||
|
||||
/*
|
||||
* These external variables are actually machine-dependent, so
|
||||
* they might not actually exist.
|
||||
*
|
||||
* Defining them here avoids a proliferation of header files.
|
||||
*/
|
||||
extern cyclic_clock_func_t lapic_cyclic_clock_func[];
|
||||
typedef void (*cyclic_clock_func_t)(struct clockframe *);
|
||||
extern cyclic_clock_func_t cyclic_clock_func[];
|
||||
|
||||
/*
|
||||
* The dtrace module handles traps that occur during a DTrace probe.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: envsys.h,v 1.32 2012/08/27 21:07:33 pgoyette Exp $ */
|
||||
/* $NetBSD: envsys.h,v 1.33 2012/12/05 04:21:30 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2007 The NetBSD Foundation, Inc.
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
/* sensor units */
|
||||
enum envsys_units {
|
||||
ENVSYS_STEMP = 0, /* Temperature */
|
||||
ENVSYS_STEMP = 0, /* Temperature (microkelvins) */
|
||||
ENVSYS_SFANRPM, /* Fan RPM */
|
||||
ENVSYS_SVOLTS_AC, /* AC Volts */
|
||||
ENVSYS_SVOLTS_DC, /* DC Volts */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: errno.h,v 1.39 2006/10/31 00:38:07 cbiere Exp $ */
|
||||
/* $NetBSD: errno.h,v 1.40 2013/01/02 18:51:53 dsl Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@@ -174,7 +174,7 @@
|
||||
|
||||
#define ELAST (_SIGN 96 ) /* Must equal largest errno */
|
||||
|
||||
#ifdef _KERNEL
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
/* pseudo-errors returned inside kernel to modify return to process */
|
||||
#define EJUSTRETURN -2 /* don't modify regs, just return */
|
||||
#define ERESTART -3 /* restart syscall */
|
||||
@@ -183,7 +183,7 @@
|
||||
#define EMOVEFD -6 /* Move given fd */
|
||||
#endif
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* Now define _SIGN as "" or "-" depending on _SYSTEM. */
|
||||
#ifdef _SYSTEM
|
||||
# define _SIGN -
|
||||
@@ -212,6 +212,6 @@
|
||||
#define EBADEPT (_SIGN 216 ) /* specified endpoint is bad */
|
||||
#define EBADCPU (_SIGN 217 ) /* requested CPU does not work */
|
||||
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_ERRNO_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec.h,v 1.139 2012/08/05 01:43:59 matt Exp $ */
|
||||
/* $NetBSD: exec.h,v 1.142 2013/11/14 12:07:11 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -216,6 +216,8 @@ struct exec_package {
|
||||
char *ep_path; /* absolute path of executable */
|
||||
void (*ep_emul_arg_free)(void *);
|
||||
/* free ep_emul_arg */
|
||||
uint32_t ep_osversion; /* OS version */
|
||||
char ep_machine_arch[12]; /* from MARCH note */
|
||||
};
|
||||
#define EXEC_INDIR 0x0001 /* script handling already done */
|
||||
#define EXEC_HASFD 0x0002 /* holding a shell script */
|
||||
@@ -224,6 +226,7 @@ struct exec_package {
|
||||
#define EXEC_DESTR 0x0010 /* destructive ops performed */
|
||||
#define EXEC_32 0x0020 /* 32-bit binary emulation */
|
||||
#define EXEC_FORCEAUX 0x0040 /* always use ELF AUX vector */
|
||||
#define EXEC_TOPDOWN_VM 0x0080 /* may use top-down VM layout */
|
||||
|
||||
struct exec_vmcmd {
|
||||
int (*ev_proc)(struct lwp *, struct exec_vmcmd *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: exec_elf.h,v 1.126 2012/08/05 01:43:59 matt Exp $ */
|
||||
/* $NetBSD: exec_elf.h,v 1.132 2013/11/05 14:26:19 martin Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994 The NetBSD Foundation, Inc.
|
||||
@@ -301,6 +301,7 @@ typedef struct {
|
||||
#define EM_SEP 108 /* Sharp embedded microprocessor */
|
||||
#define EM_ARCA 109 /* Arca RISC microprocessor */
|
||||
#define EM_UNICORE 110 /* UNICORE from PKU-Unity Ltd. and MPRC Peking University */
|
||||
#define EM_AARCH64 183 /* AArch64 64-bit ARM microprocessor */
|
||||
|
||||
/* Unofficial machine types follow */
|
||||
#define EM_AVR32 6317 /* used by NetBSD/avr32 */
|
||||
@@ -429,6 +430,13 @@ typedef struct {
|
||||
#define SHT_HIOS 0x6fffffff
|
||||
#define SHT_LOPROC 0x70000000 /* Processor-specific range */
|
||||
#define SHT_AMD64_UNWIND 0x70000001 /* unwind information */
|
||||
#define SHT_ARM_EXIDX 0x70000001 /* exception index table */
|
||||
#define SHT_ARM_PREEMPTMAP 0x70000002 /* BPABI DLL dynamic linking
|
||||
* pre-emption map */
|
||||
#define SHT_ARM_ATTRIBUTES 0x70000003 /* Object file compatibility
|
||||
* attributes */
|
||||
#define SHT_ARM_DEBUGOVERLAY 0x70000004 /* See DBGOVL for details */
|
||||
#define SHT_ARM_OVERLAYSECTION 0x70000005
|
||||
#define SHT_HIPROC 0x7fffffff
|
||||
#define SHT_LOUSER 0x80000000 /* Application-specific range */
|
||||
#define SHT_HIUSER 0xffffffff
|
||||
@@ -668,7 +676,12 @@ typedef struct {
|
||||
#define DT_FINI_ARRAY 26 /* Size, in bytes, of DT_INIT_ARRAY array */
|
||||
#define DT_INIT_ARRAYSZ 27 /* Address of termination function array */
|
||||
#define DT_FINI_ARRAYSZ 28 /* Size, in bytes, of DT_FINI_ARRAY array*/
|
||||
#define DT_NUM 29
|
||||
#define DT_RUNPATH 29 /* overrides DT_RPATH */
|
||||
#define DT_FLAGS 30 /* Encodes ORIGIN, SYMBOLIC, TEXTREL, BIND_NOW, STATIC_TLS */
|
||||
#define DT_ENCODING 31 /* ??? */
|
||||
#define DT_PREINIT_ARRAY 32 /* Address of pre-init function array */
|
||||
#define DT_PREINIT_ARRAYSZ 33 /* Size, in bytes, of DT_PREINIT_ARRAY array */
|
||||
#define DT_NUM 34
|
||||
|
||||
#define DT_LOOS 0x60000000 /* Operating system specific range */
|
||||
#define DT_VERSYM 0x6ffffff0 /* Symbol versions */
|
||||
@@ -681,6 +694,13 @@ typedef struct {
|
||||
#define DT_LOPROC 0x70000000 /* Processor-specific range */
|
||||
#define DT_HIPROC 0x7fffffff
|
||||
|
||||
/* Flag values for DT_FLAGS */
|
||||
#define DF_ORIGIN 0x00000001 /* uses $ORIGIN */
|
||||
#define DF_SYMBOLIC 0x00000002 /* */
|
||||
#define DF_TEXTREL 0x00000004 /* */
|
||||
#define DF_BIND_NOW 0x00000008 /* */
|
||||
#define DF_STATICT_LS 0x00000010 /* */
|
||||
|
||||
/* Flag values for DT_FLAGS_1 (incomplete) */
|
||||
#define DF_1_BIND_NOW 0x00000001 /* Same as DF_BIND_NOW */
|
||||
#define DF_1_NODELETE 0x00000008 /* Set the RTLD_NODELETE for object */
|
||||
@@ -860,6 +880,14 @@ typedef struct {
|
||||
/* NetBSD-specific note name */
|
||||
#define ELF_NOTE_NETBSD_NAME "NetBSD\0\0"
|
||||
|
||||
#if defined(__minix)
|
||||
#define ELF_NOTE_TYPE_MINIX_TAG 1
|
||||
/* MINIX3-specific note name and description sizes */
|
||||
#define ELF_NOTE_MINIX_NAMESZ 6
|
||||
#define ELF_NOTE_MINIX_DESCSZ 4
|
||||
#define ELF_NOTE_MINIX_NAME "Minix\0\0\0"
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
/* NetBSD-specific note type: Checksum.
|
||||
* There should be 1 NOTE per PT_LOAD section.
|
||||
* name: ???
|
||||
@@ -949,6 +977,35 @@ struct netbsd_elfcore_procinfo {
|
||||
int32_t cpi_siglwp; /* LWP target of killing signal */
|
||||
};
|
||||
|
||||
/*
|
||||
* NetBSD-specific note type: MACHINE_ARCH.
|
||||
* There should be 1 NOTE per executable.
|
||||
* name: NetBSD\0
|
||||
* namesz: 7
|
||||
* desc: string
|
||||
* descsz: variable
|
||||
*/
|
||||
#define ELF_NOTE_TYPE_MARCH_TAG 5
|
||||
/* NetBSD-specific note name and description sizes */
|
||||
#define ELF_NOTE_MARCH_NAMESZ ELF_NOTE_NETBSD_NAMESZ
|
||||
/* NetBSD-specific note name */
|
||||
#define ELF_NOTE_MARCH_NAME ELF_NOTE_NETBSD_NAME
|
||||
|
||||
/*
|
||||
* NetBSD-specific note type: MCMODEL
|
||||
* There should be 1 NOTE per executable.
|
||||
* name: NetBSD\0
|
||||
* namesz: 7
|
||||
* code model: string
|
||||
*/
|
||||
|
||||
#define ELF_NOTE_TYPE_MCMODEL_TAG 6
|
||||
/* NetBSD-specific note name and description sizes */
|
||||
#define ELF_NOTE_MCMODEL_NAMESZ ELF_NOTE_NETBSD_NAMESZ
|
||||
/* NetBSD-specific note name */
|
||||
#define ELF_NOTE_MCMODEL_NAME ELF_NOTE_NETBSD_NAME
|
||||
|
||||
|
||||
#if !defined(ELFSIZE) && defined(ARCH_ELFSIZE)
|
||||
#define ELFSIZE ARCH_ELFSIZE
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fcntl.h,v 1.42 2012/01/25 00:28:35 christos Exp $ */
|
||||
/* $NetBSD: fcntl.h,v 1.46 2013/09/15 10:41:20 njoly Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1983, 1990, 1993
|
||||
@@ -82,7 +82,9 @@
|
||||
#define O_APPEND 0x00000008 /* set append mode */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define O_SHLOCK 0x00000010 /* open with shared file lock */
|
||||
#if !defined(__minix) || 1
|
||||
#define O_EXLOCK 0x00000020 /* open with exclusive file lock */
|
||||
#endif /* !defined(__minix) */
|
||||
#define O_ASYNC 0x00000040 /* signal pgrp when data ready */
|
||||
#endif
|
||||
#if (_POSIX_C_SOURCE - 0) >= 199309L || \
|
||||
@@ -114,7 +116,8 @@
|
||||
|
||||
#define O_DIRECTORY 0x00200000 /* fail if not a directory */
|
||||
#define O_CLOEXEC 0x00400000 /* set close on exec */
|
||||
#if defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL)
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \
|
||||
defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE)
|
||||
#define O_SEARCH 0x00800000 /* skip search permission checks */
|
||||
#endif
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
@@ -289,7 +292,8 @@ struct flock {
|
||||
/*
|
||||
* Constants for X/Open Extended API set 2 (a.k.a. C063)
|
||||
*/
|
||||
#if defined(_INCOMPLETE_XOPEN_C063) || defined(_KERNEL) || defined(__minix)
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \
|
||||
defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE)
|
||||
#define AT_FDCWD -100 /* Use cwd for relative link target */
|
||||
#define AT_EACCESS 0x100 /* Use euig/egid for access checks */
|
||||
#define AT_SYMLINK_NOFOLLOW 0x200 /* Do not follow symlinks */
|
||||
@@ -313,14 +317,15 @@ int posix_fadvise(int, off_t, off_t, int);
|
||||
/*
|
||||
* X/Open Extended API set 2 (a.k.a. C063)
|
||||
*/
|
||||
#if defined(_INCOMPLETE_XOPEN_C063)
|
||||
int openat(int, const char *, int oflags, ...);
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0 >= 700) || \
|
||||
defined(_INCOMPLETE_XOPEN_C063) || defined(_NETBSD_SOURCE)
|
||||
int openat(int, const char *, int, ...);
|
||||
#endif
|
||||
__END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define F_FREESP 100
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_FCNTL_H_ */
|
||||
|
||||
@@ -56,12 +56,11 @@ typedef __uint32_t __fd_mask;
|
||||
*/
|
||||
|
||||
#ifndef FD_SETSIZE
|
||||
#ifdef __minix
|
||||
#include <sys/syslimits.h>
|
||||
#define FD_SETSIZE OPEN_MAX
|
||||
#if defined(__minix)
|
||||
#define FD_SETSIZE 255
|
||||
#else
|
||||
#define FD_SETSIZE 256
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
#endif
|
||||
|
||||
#define __NFD_SIZE (((FD_SETSIZE) + (__NFDBITS - 1)) / __NFDBITS)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: featuretest.h,v 1.9 2009/05/04 16:44:14 ginsbach Exp $ */
|
||||
/* $NetBSD: featuretest.h,v 1.10 2013/04/26 18:29:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Klaus Klein <kleink@NetBSD.org>, February 2, 1998.
|
||||
@@ -56,6 +56,7 @@
|
||||
*
|
||||
* _REENTRANT
|
||||
* _ISOC99_SOURCE
|
||||
* _ISOC11_SOURCE
|
||||
* _LARGEFILE_SOURCE Large File Support
|
||||
* <http://ftp.sas.com/standards/large.file/x_open.20Mar96.html>
|
||||
*/
|
||||
@@ -73,15 +74,12 @@
|
||||
#if defined(_MINIX)
|
||||
#undef _MINIX
|
||||
#define _NETBSD_SOURCE 1
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
/* Never define _REENTRANT on Minix */
|
||||
|
||||
#ifndef __minix
|
||||
|
||||
#if !defined(__minix)
|
||||
#if ((_POSIX_C_SOURCE - 0) >= 199506L || (_XOPEN_SOURCE - 0) >= 500) && \
|
||||
!defined(_REENTRANT)
|
||||
#define _REENTRANT
|
||||
#endif /* !defined(__minix) */
|
||||
#endif
|
||||
|
||||
#endif /* __minix */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: file.h,v 1.74 2011/04/24 18:46:24 rmind Exp $ */
|
||||
/* $NetBSD: file.h,v 1.75 2013/01/02 19:35:43 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 The NetBSD Foundation, Inc.
|
||||
@@ -116,6 +116,8 @@ struct file {
|
||||
SLIST_ENTRY(file) f_unplist; /* deferred close: see uipc_usrreq.c */
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Descriptor types.
|
||||
*/
|
||||
@@ -133,6 +135,8 @@ struct file {
|
||||
"0", "file", "socket", "pipe", "kqueue", "misc", "crypto", "mqueue", \
|
||||
"semaphore"
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
/*
|
||||
* Flags for fo_read and fo_write and do_fileread/write/v
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: float_ieee754.h,v 1.10 2011/10/01 17:39:14 christos Exp $ */
|
||||
/* $NetBSD: float_ieee754.h,v 1.11 2013/06/18 20:17:19 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -47,7 +47,7 @@
|
||||
*/
|
||||
#define _FLOAT_IEEE754 1
|
||||
|
||||
#ifndef FLT_ROUNDS
|
||||
#if !defined(__ASSEMBLER__) && !defined(FLT_ROUNDS)
|
||||
__BEGIN_DECLS
|
||||
extern int __flt_rounds(void);
|
||||
__END_DECLS
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fstypes.h,v 1.30 2011/11/18 21:17:45 christos Exp $ */
|
||||
/* $NetBSD: fstypes.h,v 1.32 2012/11/26 16:22:21 drochner Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
@@ -84,7 +84,6 @@ typedef struct fhandle fhandle_t;
|
||||
*/
|
||||
|
||||
#define __MNT_UNUSED1 0x00200000
|
||||
#define __MNT_UNUSED2 0x00800000
|
||||
|
||||
#define MNT_RDONLY 0x00000001 /* read only filesystem */
|
||||
#define MNT_SYNCHRONOUS 0x00000002 /* file system written synchronously */
|
||||
@@ -96,6 +95,7 @@ typedef struct fhandle fhandle_t;
|
||||
#define MNT_NOCOREDUMP 0x00008000 /* don't write core dumps to this FS */
|
||||
#define MNT_RELATIME 0x00020000 /* only update access time if mod/ch */
|
||||
#define MNT_IGNORE 0x00100000 /* don't show entry in df */
|
||||
#define MNT_DISCARD 0x00800000 /* use DISCARD/TRIM if supported */
|
||||
#define MNT_EXTATTR 0x01000000 /* enable extended attributes */
|
||||
#define MNT_LOG 0x02000000 /* Use logging */
|
||||
#define MNT_NOATIME 0x04000000 /* Never update access times in fs */
|
||||
@@ -105,6 +105,7 @@ typedef struct fhandle fhandle_t;
|
||||
|
||||
#define __MNT_BASIC_FLAGS \
|
||||
{ MNT_ASYNC, 0, "asynchronous" }, \
|
||||
{ MNT_DISCARD, 0, "discard" }, \
|
||||
{ MNT_EXTATTR, 0, "extattr" }, \
|
||||
{ MNT_IGNORE, 0, "hidden" }, \
|
||||
{ MNT_LOG, 0, "log" }, \
|
||||
@@ -121,9 +122,9 @@ typedef struct fhandle fhandle_t;
|
||||
{ MNT_SYNCHRONOUS, 0, "synchronous" }, \
|
||||
{ MNT_UNION, 0, "union" }, \
|
||||
|
||||
#define MNT_BASIC_FLAGS (MNT_ASYNC | MNT_EXTATTR | MNT_LOG | MNT_NOATIME | \
|
||||
MNT_NOCOREDUMP | MNT_NODEV | MNT_NODEVMTIME | MNT_NOEXEC | MNT_NOSUID | \
|
||||
MNT_RDONLY | MNT_RELATIME | MNT_SOFTDEP | MNT_SYMPERM | \
|
||||
#define MNT_BASIC_FLAGS (MNT_ASYNC | MNT_DISCARD | MNT_EXTATTR | MNT_LOG | \
|
||||
MNT_NOATIME | MNT_NOCOREDUMP | MNT_NODEV | MNT_NODEVMTIME | MNT_NOEXEC | \
|
||||
MNT_NOSUID | MNT_RDONLY | MNT_RELATIME | MNT_SOFTDEP | MNT_SYMPERM | \
|
||||
MNT_SYNCHRONOUS | MNT_UNION)
|
||||
/*
|
||||
* exported mount flags.
|
||||
@@ -170,6 +171,7 @@ typedef struct fhandle fhandle_t;
|
||||
MNT_ASYNC | \
|
||||
MNT_NOCOREDUMP | \
|
||||
MNT_IGNORE | \
|
||||
MNT_DISCARD | \
|
||||
MNT_NOATIME | \
|
||||
MNT_SYMPERM | \
|
||||
MNT_NODEVMTIME | \
|
||||
@@ -235,7 +237,7 @@ typedef struct fhandle fhandle_t;
|
||||
"\33MNT_NOATIME" \
|
||||
"\32MNT_LOG" \
|
||||
"\31MNT_EXTATTR" \
|
||||
"\30MNT_UNUSED" \
|
||||
"\30MNT_DISCARD" \
|
||||
"\27MNT_GETARGS" \
|
||||
"\26MNT_UNUSED" \
|
||||
"\25MNT_IGNORE" \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ieee754.h,v 1.8 2012/08/08 16:56:53 matt Exp $ */
|
||||
/* $NetBSD: ieee754.h,v 1.9 2013/05/08 05:27:01 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@@ -148,6 +148,7 @@ union ieee_single_u {
|
||||
#define sngu_sign sngu_sng.sng_sign
|
||||
#define sngu_exp sngu_sng.sng_exp
|
||||
#define sngu_frac sngu_sng.sng_frac
|
||||
#define SNGU_ZEROFRAC_P(u) ((u).sngu_frac != 0)
|
||||
|
||||
union ieee_double_u {
|
||||
double dblu_d;
|
||||
@@ -158,4 +159,6 @@ union ieee_double_u {
|
||||
#define dblu_exp dblu_dbl.dbl_exp
|
||||
#define dblu_frach dblu_dbl.dbl_frach
|
||||
#define dblu_fracl dblu_dbl.dbl_fracl
|
||||
#define DBLU_ZEROFRAC_P(u) (((u).dblu_frach|(u).dblu_fracl) != 0)
|
||||
|
||||
#endif /* _SYS_IEEE754_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: intr.h,v 1.12 2012/07/27 14:05:08 matt Exp $ */
|
||||
/* $NetBSD: intr.h,v 1.16 2013/08/25 03:08:56 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 The NetBSD Foundation, Inc.
|
||||
@@ -32,10 +32,10 @@
|
||||
#ifndef _SYS_INTR_H_
|
||||
#define _SYS_INTR_H_
|
||||
|
||||
#include <machine/intr.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
struct cpu_info;
|
||||
|
||||
/* Public interface. */
|
||||
@@ -51,7 +51,9 @@ void softint_block(lwp_t *);
|
||||
|
||||
/* MD-MI interface. */
|
||||
void softint_init_md(lwp_t *, u_int, uintptr_t *);
|
||||
#ifndef __HAVE_MD_SOFTINT_TRIGGER
|
||||
void softint_trigger(uintptr_t);
|
||||
#endif
|
||||
void softint_dispatch(lwp_t *, int);
|
||||
|
||||
/* Flags for softint_establish(). */
|
||||
@@ -88,6 +90,10 @@ extern u_int softint_timing;
|
||||
#define splclock() splsched()
|
||||
#define splserial() splhigh()
|
||||
|
||||
#include <machine/intr.h>
|
||||
|
||||
#elif defined(_KMEMUSER)
|
||||
#define SOFTINT_COUNT 0x0004
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _SYS_INTR_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: inttypes.h,v 1.5 2008/04/28 20:24:10 martin Exp $ */
|
||||
/* $NetBSD: inttypes.h,v 1.6 2013/04/22 21:26:48 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@@ -38,7 +38,8 @@
|
||||
|
||||
#include <sys/stdint.h>
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS)
|
||||
#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) || \
|
||||
(__cplusplus >= 201103L)
|
||||
#include <machine/int_fmtio.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#ifndef _SYS_IOCCOM_H_
|
||||
#define _SYS_IOCCOM_H_
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
/*
|
||||
* Ioctl's have the command encoded in the lower word, and the size of
|
||||
* any in or out parameters in the upper word. The high 3 bits of the
|
||||
@@ -59,7 +59,7 @@
|
||||
#define IOCPARM_MASK 0xfff /* parameter length, at most 12 bits */
|
||||
#define IOCPARM_MASK_BIG 0xFFFFF /* or 20 bits, if IOC_BIG is set */
|
||||
#define IOCPARM_SHIFT_BIG 8
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#define IOCPARM_SHIFT 16
|
||||
#define IOCGROUP_SHIFT 8
|
||||
@@ -75,7 +75,6 @@
|
||||
/* copy parameters in */
|
||||
#define IOC_IN (unsigned long)0x80000000
|
||||
/* copy parameters in and out */
|
||||
|
||||
#define IOC_INOUT (IOC_IN|IOC_OUT)
|
||||
/* mask for IN/OUT/VOID */
|
||||
#define IOC_DIRMASK (unsigned long)0xe0000000
|
||||
@@ -89,7 +88,7 @@
|
||||
/* this should be _IORW, but stdio got there first */
|
||||
#define _IOWR(g,n,t) _IOC(IOC_INOUT, (g), (n), sizeof(t))
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define _IOW_BIG(y,t) (y | ((sizeof(t) & IOCPARM_MASK_BIG) << IOCPARM_SHIFT_BIG) \
|
||||
| IOC_IN | IOC_BIG)
|
||||
#define _IOR_BIG(y,t) (y | ((sizeof(t) & IOCPARM_MASK_BIG) << IOCPARM_SHIFT_BIG) \
|
||||
@@ -106,6 +105,6 @@
|
||||
/* Recognize and decode size of a 'big' ioctl call. */
|
||||
#define _MINIX_IOCTL_BIG(i) ((i) & IOC_BIG)
|
||||
#define _MINIX_IOCTL_SIZE_BIG(i) (((i) >> IOCPARM_SHIFT_BIG) & IOCPARM_MASK_BIG)
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_IOCCOM_H_ */
|
||||
|
||||
@@ -61,7 +61,7 @@ struct ttysize {
|
||||
#include <sys/filio.h>
|
||||
#include <sys/sockio.h>
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* ioctls */
|
||||
#include <sys/ioc_net.h> /* 'n' */
|
||||
#include <sys/ioc_disk.h> /* 'd' */
|
||||
@@ -74,7 +74,7 @@ struct ttysize {
|
||||
#include <sys/ioc_fb.h> /* 'V' */
|
||||
#include <dev/vndvar.h> /* 'F' */
|
||||
#include <dev/i2c/i2c_io.h>
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
/*
|
||||
* Passthrough ioctl commands. These are passed through to devices
|
||||
@@ -108,7 +108,7 @@ __END_DECLS
|
||||
#endif /* !_KERNEL */
|
||||
#endif /* !_SYS_IOCTL_H_ */
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
/*
|
||||
* Keep outside _SYS_IOCTL_H_
|
||||
* Compatibility with old terminal driver
|
||||
@@ -131,5 +131,5 @@ __END_DECLS
|
||||
defined(COMPAT_SVR4) || defined(COMPAT_FREEBSD) || defined(COMPAT_OSF1) || \
|
||||
defined(COMPAT_IBCS2) || defined(MODULAR)
|
||||
#include <sys/ioctl_compat.h>
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef __minix
|
||||
/* $NetBSD: ioctl_compat.h,v 1.15 2005/12/03 17:10:46 christos Exp $ */
|
||||
#if !defined(__minix)
|
||||
/* $NetBSD: ioctl_compat.h,v 1.16 2013/07/11 19:17:57 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -90,10 +90,14 @@ struct sgttyb {
|
||||
#define TIOCSETN _IOW('t',10,struct sgttyb)/* as above, but no flushtty*/
|
||||
#define TIOCSETC _IOW('t',17,struct tchars)/* set special characters */
|
||||
#define TIOCGETC _IOR('t',18,struct tchars)/* get special characters */
|
||||
/*
|
||||
* The entries marked as termios below, are common and should have the
|
||||
* same values.
|
||||
*/
|
||||
#define TANDEM 0x00000001 /* send stopc on out q full */
|
||||
#define CBREAK 0x00000002 /* half-cooked mode */
|
||||
#define LCASE 0x00000004 /* simulate lower case */
|
||||
#define ECHO 0x00000008 /* enable echoing */
|
||||
/* termios ECHO 0x00000008 enable echoing */
|
||||
#define CRMOD 0x00000010 /* map \r to \r\n on output */
|
||||
#define RAW 0x00000020 /* no i/o processing */
|
||||
#define ODDP 0x00000040 /* get/send odd parity */
|
||||
@@ -125,18 +129,18 @@ struct sgttyb {
|
||||
#define PRTERA 0x00020000 /* \ ... / erase */
|
||||
#define CRTERA 0x00040000 /* " \b " to wipe out char */
|
||||
#define TILDE 0x00080000 /* hazeltine tilde kludge */
|
||||
#define MDMBUF 0x00100000 /* DTR/DCD hardware flow control */
|
||||
/* termios MDMBUF 0x00100000 DTR/DCD hardware flow control */
|
||||
#define LITOUT 0x00200000 /* literal output */
|
||||
#define TOSTOP 0x00400000 /* stop background jobs on output */
|
||||
#define FLUSHO 0x00800000 /* output being flushed (state) */
|
||||
/* termios TOSTOP 0x00400000 stop background jobs on output */
|
||||
/* termios FLUSHO 0x00800000 output being flushed (state) */
|
||||
#define NOHANG 0x01000000 /* (no-op) was no SIGHUP on carrier drop */
|
||||
#define L001000 0x02000000
|
||||
#define CRTKIL 0x04000000 /* kill line with " \b " */
|
||||
#define PASS8 0x08000000
|
||||
#define CTLECH 0x10000000 /* echo control chars as ^X */
|
||||
#define PENDIN 0x20000000 /* re-echo input buffer at next read */
|
||||
/* termios PENDIN 0x20000000 re-echo input buffer at next read */
|
||||
#define DECCTQ 0x40000000 /* only ^Q starts after ^S */
|
||||
#define NOFLSH 0x80000000 /* don't flush output on signal */
|
||||
/* termios NOFLSH 0x80000000 don't flush output on signal */
|
||||
#define TIOCLBIS _IOW('t', 127, int) /* bis local mode bits */
|
||||
#define TIOCLBIC _IOW('t', 126, int) /* bic local mode bits */
|
||||
#define TIOCLSET _IOW('t', 125, int) /* set entire local mode word */
|
||||
@@ -164,4 +168,4 @@ struct sgttyb {
|
||||
#define NTTYDISC 2
|
||||
|
||||
#endif /* !_SYS_IOCTL_COMPAT_H_ */
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
@@ -97,9 +97,9 @@ struct ipc_perm_sysctl {
|
||||
#define IPC_SET 1 /* set options */
|
||||
#define IPC_STAT 2 /* get options */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define IPC_INFO 500 /* See ipcs. */
|
||||
#endif /* !__minix */
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
/*
|
||||
* Macros to convert between ipc ids and array indices or sequence ids.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kauth.h,v 1.70 2012/06/27 12:28:28 cheusov Exp $ */
|
||||
/* $NetBSD: kauth.h,v 1.71 2013/03/18 19:35:46 plunky Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2005, 2006 Elad Efrat <elad@NetBSD.org>
|
||||
@@ -45,7 +45,6 @@ struct proc;
|
||||
struct tty;
|
||||
struct vnode;
|
||||
struct cwdinfo;
|
||||
enum vtype;
|
||||
|
||||
/* Types. */
|
||||
typedef struct kauth_scope *kauth_scope_t;
|
||||
@@ -483,9 +482,12 @@ void kauth_cred_toucred(kauth_cred_t, struct ki_ucred *);
|
||||
void kauth_cred_topcred(kauth_cred_t, struct ki_pcred *);
|
||||
|
||||
kauth_action_t kauth_mode_to_action(mode_t);
|
||||
kauth_action_t kauth_access_action(mode_t, enum vtype, mode_t);
|
||||
kauth_action_t kauth_extattr_action(mode_t);
|
||||
|
||||
#define KAUTH_ACCESS_ACTION(access_mode, vn_vtype, file_mode) \
|
||||
(kauth_mode_to_action(access_mode) | \
|
||||
(FS_OBJECT_CAN_EXEC(vn_vtype, file_mode) ? KAUTH_VNODE_IS_EXEC : 0))
|
||||
|
||||
kauth_cred_t kauth_cred_get(void);
|
||||
|
||||
void kauth_proc_fork(struct proc *, struct proc *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kcpuset.h,v 1.8 2012/09/16 22:09:33 rmind Exp $ */
|
||||
/* $NetBSD: kcpuset.h,v 1.9 2013/07/17 22:36:26 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, 2011 The NetBSD Foundation, Inc.
|
||||
@@ -42,8 +42,9 @@ typedef struct kcpuset kcpuset_t;
|
||||
void kcpuset_sysinit(void);
|
||||
|
||||
void kcpuset_create(kcpuset_t **, bool);
|
||||
void kcpuset_clone(kcpuset_t **, const kcpuset_t *);
|
||||
void kcpuset_destroy(kcpuset_t *);
|
||||
void kcpuset_copy(kcpuset_t *, kcpuset_t *);
|
||||
void kcpuset_copy(kcpuset_t *, const kcpuset_t *);
|
||||
|
||||
void kcpuset_use(kcpuset_t *);
|
||||
void kcpuset_unuse(kcpuset_t *, kcpuset_t **);
|
||||
@@ -56,17 +57,27 @@ void kcpuset_fill(kcpuset_t *);
|
||||
void kcpuset_set(kcpuset_t *, cpuid_t);
|
||||
void kcpuset_clear(kcpuset_t *, cpuid_t);
|
||||
|
||||
bool kcpuset_isset(kcpuset_t *, cpuid_t);
|
||||
bool kcpuset_isotherset(kcpuset_t *, cpuid_t);
|
||||
bool kcpuset_iszero(kcpuset_t *);
|
||||
bool kcpuset_isset(const kcpuset_t *, cpuid_t);
|
||||
bool kcpuset_isotherset(const kcpuset_t *, cpuid_t);
|
||||
bool kcpuset_iszero(const kcpuset_t *);
|
||||
bool kcpuset_intersecting_p(const kcpuset_t *, const kcpuset_t *);
|
||||
bool kcpuset_match(const kcpuset_t *, const kcpuset_t *);
|
||||
void kcpuset_merge(kcpuset_t *, kcpuset_t *);
|
||||
void kcpuset_intersect(kcpuset_t *, kcpuset_t *);
|
||||
void kcpuset_intersect(kcpuset_t *, const kcpuset_t *);
|
||||
void kcpuset_merge(kcpuset_t *, const kcpuset_t *);
|
||||
void kcpuset_remove(kcpuset_t *, const kcpuset_t *);
|
||||
int kcpuset_countset(kcpuset_t *);
|
||||
|
||||
cpuid_t kcpuset_ffs(const kcpuset_t *);
|
||||
cpuid_t kcpuset_ffs_intersecting(const kcpuset_t *, const kcpuset_t *);
|
||||
|
||||
void kcpuset_atomic_set(kcpuset_t *, cpuid_t);
|
||||
void kcpuset_atomic_clear(kcpuset_t *, cpuid_t);
|
||||
|
||||
void kcpuset_atomicly_zero(kcpuset_t *);
|
||||
void kcpuset_atomicly_intersect(kcpuset_t *, const kcpuset_t *);
|
||||
void kcpuset_atomicly_merge(kcpuset_t *, const kcpuset_t *);
|
||||
void kcpuset_atomicly_remove(kcpuset_t *, const kcpuset_t *);
|
||||
|
||||
void kcpuset_export_u32(const kcpuset_t *, uint32_t *, size_t);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kernel.h,v 1.28 2009/01/11 02:45:55 christos Exp $ */
|
||||
/* $NetBSD: kernel.h,v 1.29 2013/07/30 13:14:30 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990, 1993
|
||||
@@ -61,6 +61,7 @@ extern int stathz; /* statistics clock's frequency */
|
||||
extern int profhz; /* profiling clock's frequency */
|
||||
|
||||
extern int profsrc; /* profiling source */
|
||||
extern int psratio; /* ratio: prof / stat */
|
||||
|
||||
#define PROFSRC_CLOCK 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kernhist.h,v 1.5 2012/07/30 23:56:48 matt Exp $ */
|
||||
/* $NetBSD: kernhist.h,v 1.7 2013/02/19 22:54:03 skrll Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@@ -97,6 +97,7 @@ LIST_HEAD(kern_history_head, kern_history);
|
||||
#define KERNHIST_INIT(NAME,N)
|
||||
#define KERNHIST_INIT_STATIC(NAME,BUF)
|
||||
#define KERNHIST_LOG(NAME,FMT,A,B,C,D)
|
||||
#define KERNHIST_CALLARGS(NAME,FMT,A,B,C,D)
|
||||
#define KERNHIST_CALLED(NAME)
|
||||
#define KERNHIST_FUNC(FNAME)
|
||||
#define kernhist_dump(NAME)
|
||||
@@ -132,13 +133,18 @@ do { \
|
||||
LIST_INSERT_HEAD(&kern_histories, &(NAME), list); \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
|
||||
#ifndef KERNHIST_DELAY
|
||||
#define KERNHIST_DELAY 100000
|
||||
#endif
|
||||
|
||||
#if defined(KERNHIST_PRINT)
|
||||
extern int kernhist_print_enabled;
|
||||
#define KERNHIST_PRINTNOW(E) \
|
||||
do { \
|
||||
if (kernhist_print_enabled) { \
|
||||
kernhist_entry_print(E); \
|
||||
DELAY(100000); \
|
||||
if (KERNHIST_DELAY != 0) \
|
||||
DELAY(KERNHIST_DELAY); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
#else
|
||||
@@ -174,10 +180,20 @@ do { \
|
||||
KERNHIST_LOG(NAME, "called!", 0, 0, 0, 0); \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
|
||||
/*
|
||||
* This extends kernhist to avoid wasting a separate "called!" entry on every
|
||||
* function.
|
||||
*/
|
||||
#define KERNHIST_CALLARGS(NAME, FMT, A, B, C, D) \
|
||||
do { \
|
||||
_kernhist_call = atomic_inc_uint_nv(&_kernhist_cnt); \
|
||||
KERNHIST_LOG(NAME, "called: "FMT, (A), (B), (C), (D)); \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
|
||||
#define KERNHIST_FUNC(FNAME) \
|
||||
static unsigned int _kernhist_cnt = 0; \
|
||||
static const char *const _kernhist_name = FNAME; \
|
||||
int _kernhist_call = 0;
|
||||
unsigned int _kernhist_call = 0;
|
||||
|
||||
static inline void kernhist_entry_print(const struct kern_history_ent *);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ksem.h,v 1.13 2012/03/10 21:52:00 joerg Exp $ */
|
||||
/* $NetBSD: ksem.h,v 1.14 2012/11/25 01:05:04 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Alfred Perlstein <alfred@FreeBSD.org>
|
||||
@@ -36,6 +36,21 @@ struct timespec;
|
||||
#ifdef _KERNEL
|
||||
#define KSEM_MAX 128
|
||||
|
||||
typedef struct ksem {
|
||||
LIST_ENTRY(ksem) ks_entry; /* global list entry */
|
||||
kmutex_t ks_lock; /* lock on this ksem */
|
||||
kcondvar_t ks_cv; /* condition variable */
|
||||
u_int ks_ref; /* number of references */
|
||||
u_int ks_value; /* current value */
|
||||
u_int ks_waiters; /* number of waiters */
|
||||
char * ks_name; /* name, if named */
|
||||
size_t ks_namelen; /* length of name */
|
||||
int ks_flags; /* for KS_UNLINKED */
|
||||
mode_t ks_mode; /* protection bits */
|
||||
uid_t ks_uid; /* creator uid */
|
||||
gid_t ks_gid; /* creator gid */
|
||||
} ksem_t;
|
||||
|
||||
int do_ksem_init(struct lwp *, unsigned int, intptr_t *, copyout_t);
|
||||
int do_ksem_open(struct lwp *, const char *, int, mode_t, unsigned int,
|
||||
intptr_t *, copyout_t);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ksyms.h,v 1.27 2010/03/15 02:28:59 darran Exp $ */
|
||||
/* $NetBSD: ksyms.h,v 1.28 2012/11/18 00:06:56 chs Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2003 Anders Magnusson (ragge@ludd.luth.se).
|
||||
@@ -32,10 +32,6 @@
|
||||
|
||||
#ifdef _KSYMS_PRIVATE
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_dtrace.h"
|
||||
#endif
|
||||
|
||||
#define ELFSIZE ARCH_ELFSIZE
|
||||
#include <sys/exec_elf.h>
|
||||
#include <sys/queue.h>
|
||||
@@ -52,12 +48,10 @@ struct ksyms_symtab {
|
||||
int sd_strsize; /* Size of string table */
|
||||
int sd_nglob; /* Number of global symbols */
|
||||
bool sd_gone; /* dead but around for open() */
|
||||
#ifdef KDTRACE_HOOKS
|
||||
void *sd_ctfstart; /* Address of CTF contents */
|
||||
int sd_ctfsize; /* Size in bytes of CTF contents */
|
||||
uint32_t *sd_nmap; /* Name map for sorted symbols */
|
||||
int sd_nmapsize; /* Total span of map */
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -68,12 +62,8 @@ struct ksyms_symtab {
|
||||
#define STRTAB 2
|
||||
#define SHSTRTAB 3
|
||||
#define SHBSS 4
|
||||
#ifdef KDTRACE_HOOKS
|
||||
#define SHCTF 5
|
||||
#define NSECHDR 6
|
||||
#else
|
||||
#define NSECHDR 5
|
||||
#endif
|
||||
|
||||
#define NPRGHDR 1
|
||||
#define SHSTRSIZ 42
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: localedef.h,v 1.9 2008/05/17 03:49:54 ginsbach Exp $ */
|
||||
/* $NetBSD: localedef.h,v 1.10 2013/08/18 20:03:48 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Winning Strategies, Inc.
|
||||
@@ -40,10 +40,6 @@ typedef struct {
|
||||
const char *nostr;
|
||||
} _MessagesLocale;
|
||||
|
||||
extern const _MessagesLocale *_CurrentMessagesLocale;
|
||||
extern const _MessagesLocale _DefaultMessagesLocale;
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *int_curr_symbol;
|
||||
const char *currency_symbol;
|
||||
@@ -68,20 +64,12 @@ typedef struct {
|
||||
char int_n_sign_posn;
|
||||
} _MonetaryLocale;
|
||||
|
||||
extern const _MonetaryLocale *_CurrentMonetaryLocale;
|
||||
extern const _MonetaryLocale _DefaultMonetaryLocale;
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *decimal_point;
|
||||
const char *thousands_sep;
|
||||
const char *grouping;
|
||||
} _NumericLocale;
|
||||
|
||||
extern const _NumericLocale *_CurrentNumericLocale;
|
||||
extern const _NumericLocale _DefaultNumericLocale;
|
||||
|
||||
|
||||
typedef struct {
|
||||
const char *abday[7];
|
||||
const char *day[7];
|
||||
@@ -94,7 +82,4 @@ typedef struct {
|
||||
const char *t_fmt_ampm;
|
||||
} _TimeLocale;
|
||||
|
||||
extern const _TimeLocale *_CurrentTimeLocale;
|
||||
extern const _TimeLocale _DefaultTimeLocale;
|
||||
|
||||
#endif /* !_SYS_LOCALEDEF_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lockdebug.h,v 1.13 2011/11/21 04:36:05 christos Exp $ */
|
||||
/* $NetBSD: lockdebug.h,v 1.14 2013/04/27 08:12:34 mlelstv Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@@ -62,7 +62,7 @@ void lockdebug_lock_print(void *, void (*)(const char *, ...)
|
||||
|
||||
bool lockdebug_alloc(volatile void *, lockops_t *, uintptr_t);
|
||||
void lockdebug_free(volatile void *);
|
||||
void lockdebug_wantlock(volatile void *, uintptr_t, bool, bool);
|
||||
void lockdebug_wantlock(volatile void *, uintptr_t, int);
|
||||
void lockdebug_locked(volatile void *, void *, uintptr_t, int);
|
||||
void lockdebug_unlocked(volatile void *, uintptr_t, int);
|
||||
void lockdebug_barrier(volatile void *, int);
|
||||
@@ -72,8 +72,8 @@ void lockdebug_wakeup(volatile void *, uintptr_t);
|
||||
#define LOCKDEBUG_ALLOC(lock, ops, addr) lockdebug_alloc(lock, ops, addr)
|
||||
#define LOCKDEBUG_FREE(dodebug, lock) \
|
||||
if (dodebug) lockdebug_free(lock)
|
||||
#define LOCKDEBUG_WANTLOCK(dodebug, lock, where, s, t) \
|
||||
if (dodebug) lockdebug_wantlock(lock, where, s, t)
|
||||
#define LOCKDEBUG_WANTLOCK(dodebug, lock, where, s) \
|
||||
if (dodebug) lockdebug_wantlock(lock, where, s)
|
||||
#define LOCKDEBUG_LOCKED(dodebug, lock, al, where, s) \
|
||||
if (dodebug) lockdebug_locked(lock, al, where, s)
|
||||
#define LOCKDEBUG_UNLOCKED(dodebug, lock, where, s) \
|
||||
@@ -88,7 +88,7 @@ void lockdebug_wakeup(volatile void *, uintptr_t);
|
||||
|
||||
#define LOCKDEBUG_ALLOC(lock, ops, addr) false
|
||||
#define LOCKDEBUG_FREE(dodebug, lock) /* nothing */
|
||||
#define LOCKDEBUG_WANTLOCK(dodebug, lock, where, s, t) /* nothing */
|
||||
#define LOCKDEBUG_WANTLOCK(dodebug, lock, where, s) /* nothing */
|
||||
#define LOCKDEBUG_LOCKED(dodebug, lock, al, where, s) /* nothing */
|
||||
#define LOCKDEBUG_UNLOCKED(dodebug, lock, where, s) /* nothing */
|
||||
#define LOCKDEBUG_BARRIER(lock, slp) /* nothing */
|
||||
|
||||
103
sys/sys/lua.h
Normal file
103
sys/sys/lua.h
Normal file
@@ -0,0 +1,103 @@
|
||||
/* $NetBSD: lua.h,v 1.3 2013/10/29 17:35:40 mbalmer Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2011, 2013 Marc Balmer <mbalmer@NetBSD.org>.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the Author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_LUA_H_
|
||||
#define _SYS_LUA_H_
|
||||
|
||||
#include <lua.h> /* for lua_State */
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/condvar.h>
|
||||
#endif
|
||||
|
||||
#define MAX_LUA_NAME 16
|
||||
#define MAX_LUA_DESC 64
|
||||
#define LUA_MAX_MODNAME 32
|
||||
|
||||
struct lua_state_info {
|
||||
char name[MAX_LUA_NAME];
|
||||
char desc[MAX_LUA_DESC];
|
||||
bool user;
|
||||
};
|
||||
|
||||
struct lua_info {
|
||||
int num_states; /* total number of created Lua states */
|
||||
struct lua_state_info *states;
|
||||
};
|
||||
|
||||
struct lua_create {
|
||||
char name[MAX_LUA_NAME];
|
||||
char desc[MAX_LUA_DESC];
|
||||
};
|
||||
|
||||
struct lua_require {
|
||||
char state[MAX_LUA_NAME];
|
||||
char module[LUA_MAX_MODNAME];
|
||||
};
|
||||
|
||||
struct lua_load {
|
||||
char state[MAX_LUA_NAME];
|
||||
char path[MAXPATHLEN];
|
||||
};
|
||||
|
||||
#define LUAINFO _IOWR('l', 0, struct lua_info)
|
||||
|
||||
#define LUACREATE _IOWR('l', 1, struct lua_create)
|
||||
#define LUADESTROY _IOWR('l', 2, struct lua_create)
|
||||
|
||||
/* 'require' a module in a state */
|
||||
#define LUAREQUIRE _IOWR('l', 3, struct lua_require)
|
||||
|
||||
/* loading Lua code into a Lua state */
|
||||
#define LUALOAD _IOWR('l', 4, struct lua_load)
|
||||
|
||||
#ifdef _KERNEL
|
||||
extern int lua_mod_register(const char *, int (*)(void *));
|
||||
extern int lua_mod_unregister(const char *);
|
||||
|
||||
typedef struct _klua_State {
|
||||
lua_State *L;
|
||||
kmutex_t ks_lock;
|
||||
kcondvar_t ks_inuse_cv;
|
||||
int ks_inuse;
|
||||
bool ks_user; /* state created by user (ioctl) */
|
||||
} klua_State;
|
||||
|
||||
extern int klua_lock(klua_State *);
|
||||
extern void klua_unlock(klua_State *);
|
||||
|
||||
extern void klua_close(klua_State *);
|
||||
extern klua_State *klua_newstate(lua_Alloc, void *, const char *, const char *);
|
||||
|
||||
extern void *lua_alloc(void *, void *, size_t, size_t);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _SYS_LUA_H_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lwp.h,v 1.165 2012/10/07 20:43:18 matt Exp $ */
|
||||
/* $NetBSD: lwp.h,v 1.168 2013/03/29 01:09:45 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
|
||||
@@ -33,6 +33,8 @@
|
||||
#ifndef _SYS_LWP_H_
|
||||
#define _SYS_LWP_H_
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/queue.h>
|
||||
@@ -67,7 +69,6 @@
|
||||
* Fields are clustered together by usage (to increase the likelyhood
|
||||
* of cache hits) and by size (to reduce dead space in the structure).
|
||||
*/
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
|
||||
#include <sys/pcu.h>
|
||||
|
||||
@@ -128,7 +129,7 @@ struct lwp {
|
||||
|
||||
#if PCU_UNIT_COUNT > 0
|
||||
struct cpu_info * volatile l_pcu_cpu[PCU_UNIT_COUNT];
|
||||
uint32_t l_pcu_used;
|
||||
uint16_t l_pcu_used[2];
|
||||
#endif
|
||||
|
||||
/* Process level and global state, misc. */
|
||||
@@ -196,7 +197,6 @@ struct lwp {
|
||||
|
||||
struct kdtrace_thread *l_dtrace; /* (: DTrace-specific data. */
|
||||
};
|
||||
#endif /* _KERNEL || _KMEMUSER */
|
||||
|
||||
/*
|
||||
* UAREA_PCB_OFFSET: an offset of PCB structure in the uarea. MD code may
|
||||
@@ -220,6 +220,8 @@ extern int maxlwp __read_mostly; /* max number of lwps */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* _KERNEL || _KMEMUSER */
|
||||
|
||||
/* These flags are kept in l_flag. */
|
||||
#define LW_IDLE 0x00000001 /* Idle lwp. */
|
||||
#define LW_LWPCTL 0x00000002 /* Adjust lwpctl in userret */
|
||||
@@ -346,7 +348,7 @@ void *_lwp_getspecific_by_lwp(lwp_t *, specificdata_key_t);
|
||||
void lwp_setspecific(specificdata_key_t, void *);
|
||||
|
||||
/* Syscalls. */
|
||||
int lwp_park(struct timespec *, const void *);
|
||||
int lwp_park(clockid_t, int, struct timespec *, const void *);
|
||||
int lwp_unpark(lwpid_t, const void *);
|
||||
|
||||
/* DDB. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mbuf.h,v 1.149 2012/04/29 16:36:54 dsl Exp $ */
|
||||
/* $NetBSD: mbuf.h,v 1.153 2013/11/14 00:50:36 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
|
||||
@@ -508,7 +508,7 @@ do { \
|
||||
#define MEXTMALLOC(m, size, how) \
|
||||
do { \
|
||||
(m)->m_ext_storage.ext_buf = \
|
||||
(void *)malloc((size), mbtypes[(m)->m_type], (how)); \
|
||||
malloc((size), mbtypes[(m)->m_type], (how)); \
|
||||
if ((m)->m_ext_storage.ext_buf != NULL) { \
|
||||
MCLINITREFERENCE(m); \
|
||||
(m)->m_data = (m)->m_ext.ext_buf; \
|
||||
@@ -559,10 +559,10 @@ do { \
|
||||
m_tag_delete_chain((m), NULL); \
|
||||
(n) = (m)->m_next; \
|
||||
if ((m)->m_flags & M_EXT) { \
|
||||
m_ext_free(m); \
|
||||
m_ext_free((m)); \
|
||||
} else { \
|
||||
KASSERT(m->m_type != MT_FREE); \
|
||||
m->m_type = MT_FREE; \
|
||||
KASSERT((m)->m_type != MT_FREE); \
|
||||
(m)->m_type = MT_FREE; \
|
||||
pool_cache_put(mb_cache, (m)); \
|
||||
} \
|
||||
|
||||
@@ -686,7 +686,7 @@ do { \
|
||||
} while (/* CONSTCOND */ 0)
|
||||
|
||||
/* length to m_copy to copy all */
|
||||
#define M_COPYALL 1000000000
|
||||
#define M_COPYALL -1
|
||||
|
||||
/* compatibility with 4.3 */
|
||||
#define m_copy(m, o, l) m_copym((m), (o), (l), M_DONTWAIT)
|
||||
@@ -852,7 +852,12 @@ void m_reclaim(void *, int);
|
||||
void mbinit(void);
|
||||
void m_ext_free(struct mbuf *);
|
||||
char * m_mapin(struct mbuf *);
|
||||
void m_move_pkthdr(struct mbuf *to, struct mbuf *from);
|
||||
void m_move_pkthdr(struct mbuf *, struct mbuf *);
|
||||
|
||||
bool m_ensure_contig(struct mbuf **, int);
|
||||
struct mbuf *m_add(struct mbuf *, struct mbuf *);
|
||||
void m_align(struct mbuf *, int);
|
||||
int m_append(struct mbuf *, int, const void *);
|
||||
|
||||
/* Inline routines. */
|
||||
static __inline u_int m_length(const struct mbuf *) __unused;
|
||||
|
||||
@@ -68,9 +68,9 @@ typedef __off_t off_t; /* file offset */
|
||||
* Flags contain sharing type and options.
|
||||
* Sharing types; choose one.
|
||||
*/
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
#define MAP_SHARED 0x0001 /* share changes */
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
#define MAP_PRIVATE 0x0002 /* changes are private */
|
||||
|
||||
#ifdef _KERNEL
|
||||
@@ -113,7 +113,7 @@ typedef __off_t off_t; /* file offset */
|
||||
#define MAP_ALIGNMENT_256TB MAP_ALIGNED(48) /* 2^48 */
|
||||
#define MAP_ALIGNMENT_64PB MAP_ALIGNED(56) /* 2^56 */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/*
|
||||
* Minix-specific flags
|
||||
*/
|
||||
@@ -123,7 +123,7 @@ typedef __off_t off_t; /* file offset */
|
||||
#define MAP_LOWER16M 0x200000 /* physically below 16MB */
|
||||
#define MAP_LOWER1M 0x400000 /* physically below 16MB */
|
||||
#define MAP_THIRDPARTY 0x800000 /* perform on behalf of any process */
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
/*
|
||||
* Error indicator returned by mmap(2)
|
||||
@@ -200,14 +200,14 @@ void * mremap(void *, size_t, void *, size_t, int);
|
||||
#endif
|
||||
int posix_madvise(void *, size_t, int);
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#include <minix/endpoint.h>
|
||||
void * vm_remap(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
|
||||
void * vm_remap_ro(endpoint_t d, endpoint_t s, void *da, void *sa, size_t si);
|
||||
int vm_unmap(endpoint_t endpt, void *addr);
|
||||
unsigned long vm_getphys(endpoint_t endpt, void *addr);
|
||||
u8_t vm_getrefcount(endpoint_t endpt, void *addr);
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: module.h,v 1.31 2012/08/07 01:19:06 jnemeth Exp $ */
|
||||
/* $NetBSD: module.h,v 1.34 2013/10/23 18:57:40 mbalmer Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@@ -89,7 +89,7 @@ typedef struct module {
|
||||
modsrc_t mod_source;
|
||||
time_t mod_autotime;
|
||||
void *mod_ctf;
|
||||
u_int mod_fbtentries; /* DTrace FBT entrie count */
|
||||
u_int mod_fbtentries; /* DTrace FBT entry count */
|
||||
int mod_flags;
|
||||
#define MODFLG_MUST_FORCE 0x01
|
||||
#define MODFLG_AUTO_LOADED 0x02
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mount.h,v 1.207 2012/02/01 05:34:42 dholland Exp $ */
|
||||
/* $NetBSD: mount.h,v 1.210 2013/11/23 13:35:36 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
@@ -107,17 +107,17 @@ struct vnode;
|
||||
* put on a doubly linked list.
|
||||
*/
|
||||
struct mount {
|
||||
CIRCLEQ_ENTRY(mount) mnt_list; /* mount list */
|
||||
TAILQ_ENTRY(mount) mnt_list; /* mount list */
|
||||
TAILQ_HEAD(, vnode) mnt_vnodelist; /* list of vnodes this mount */
|
||||
struct vfsops *mnt_op; /* operations on fs */
|
||||
struct vnode *mnt_vnodecovered; /* vnode we mounted on */
|
||||
struct vnode *mnt_syncer; /* syncer vnode */
|
||||
void *mnt_transinfo; /* for FS-internal use */
|
||||
void *mnt_data; /* private data */
|
||||
krwlock_t mnt_unmounting; /* to prevent new activity */
|
||||
kmutex_t mnt_unmounting; /* to prevent new activity */
|
||||
kmutex_t mnt_renamelock; /* per-fs rename lock */
|
||||
int mnt_refcnt; /* ref count on this structure */
|
||||
int mnt_recursecnt; /* count of write locks */
|
||||
unsigned int mnt_busynest; /* vfs_busy nestings */
|
||||
int mnt_flag; /* flags */
|
||||
int mnt_iflag; /* internal flags */
|
||||
int mnt_fs_bshift; /* offset shift for lblkno */
|
||||
@@ -277,7 +277,7 @@ int fsname##_mount(struct mount *, const char *, void *, \
|
||||
int fsname##_start(struct mount *, int); \
|
||||
int fsname##_unmount(struct mount *, int); \
|
||||
int fsname##_root(struct mount *, struct vnode **); \
|
||||
int fsname##_quotactl(struct mount *, int, struct quotactl_args *); \
|
||||
int fsname##_quotactl(struct mount *, struct quotactl_args *); \
|
||||
int fsname##_statvfs(struct mount *, struct statvfs *); \
|
||||
int fsname##_sync(struct mount *, int, struct kauth_cred *); \
|
||||
int fsname##_vget(struct mount *, ino_t, struct vnode **); \
|
||||
@@ -434,7 +434,7 @@ int vfs_quotactl_cursorrewind(struct mount *, struct quotakcursor *);
|
||||
int vfs_quotactl_quotaon(struct mount *, int, const char *);
|
||||
int vfs_quotactl_quotaoff(struct mount *, int);
|
||||
|
||||
extern CIRCLEQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
|
||||
extern TAILQ_HEAD(mntlist, mount) mountlist; /* mounted filesystem list */
|
||||
extern struct vfsops *vfssw[]; /* filesystem type table */
|
||||
extern int nvfssw;
|
||||
extern kmutex_t mountlist_lock;
|
||||
@@ -462,6 +462,7 @@ void * mount_getspecific(struct mount *, specificdata_key_t);
|
||||
void mount_setspecific(struct mount *, specificdata_key_t, void *);
|
||||
|
||||
int usermount_common_policy(struct mount *, u_long);
|
||||
void mountlist_append(struct mount *);
|
||||
|
||||
LIST_HEAD(vfs_list_head, vfsops);
|
||||
extern struct vfs_list_head vfs_list;
|
||||
@@ -476,15 +477,20 @@ int getfh(const char *, void *, size_t *)
|
||||
__RENAME(__getfh30);
|
||||
#endif
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
int unmount(const char *, int);
|
||||
#endif
|
||||
#else
|
||||
int umount(const char *_name, int srvflags);
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
int mount(const char *, const char *, int, void *, size_t) __RENAME(__mount50);
|
||||
#endif
|
||||
#else
|
||||
int mount(char *_spec, char *_name, int _mountflags, int srvflags, char *type,
|
||||
char *args);
|
||||
#endif /* !defined(__minix) */
|
||||
int fhopen(const void *, size_t, int) __RENAME(__fhopen40);
|
||||
int fhstat(const void *, size_t, struct stat *) __RENAME(__fhstat50);
|
||||
#endif
|
||||
@@ -495,8 +501,15 @@ __END_DECLS
|
||||
#endif /* !_STANDALONE */
|
||||
|
||||
#if defined(__minix) && !defined(_STANDALONE)
|
||||
#include <sys/statvfs.h>
|
||||
#include <minix/mount.h>
|
||||
/* Service flags. These are not passed to VFS. */
|
||||
#define MS_REUSE 0x001 /* Tell RS to try reusing binary from memory */
|
||||
#define MS_EXISTING 0x002 /* Tell mount to use already running server */
|
||||
|
||||
#define MNT_LABEL_LEN 16 /* Length of fs label including nul */
|
||||
|
||||
/* Legacy definitions. */
|
||||
#define MNTNAMELEN 16 /* Length of fs type name including nul */
|
||||
#define MNTFLAGLEN 64 /* Length of flags string including nul */
|
||||
#endif /* defined(__minix) && !defined(_STANDALONE) */
|
||||
|
||||
#endif /* !_SYS_MOUNT_H_ */
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* $NetBSD: namei.h,v 1.82 2012/10/13 17:47:11 dholland Exp $ */
|
||||
/* $NetBSD: namei.h,v 1.87 2012/11/18 18:25:50 dholland Exp $ */
|
||||
|
||||
|
||||
/*
|
||||
* WARNING: GENERATED FILE. DO NOT EDIT
|
||||
* (edit namei.src and run make namei in src/sys/sys)
|
||||
* by: NetBSD: gennameih.awk,v 1.5 2009/12/23 14:17:19 pooka Exp
|
||||
* from: NetBSD: namei.src,v 1.27 2012/10/13 17:46:50 dholland Exp
|
||||
* from: NetBSD: namei.src,v 1.31 2012/11/18 18:25:08 dholland Exp
|
||||
*/
|
||||
|
||||
/*
|
||||
@@ -91,7 +91,7 @@ struct nameidata {
|
||||
/*
|
||||
* Arguments to namei/lookup.
|
||||
*/
|
||||
struct vnode *ni_startdir; /* starting dir, cwd if null */
|
||||
struct vnode *ni_atdir; /* startup dir, cwd if null */
|
||||
struct pathbuf *ni_pathbuf; /* pathname container */
|
||||
char *ni_pnbuf; /* extra pathname buffer ref (XXX) */
|
||||
/*
|
||||
@@ -127,7 +127,6 @@ struct nameidata {
|
||||
*/
|
||||
const char *cn_nameptr; /* pointer to looked up name */
|
||||
size_t cn_namelen; /* length of looked up comp */
|
||||
u_long cn_hash; /* hash val of looked up name */
|
||||
size_t cn_consume; /* chars to consume in lookup */
|
||||
} ni_cnd;
|
||||
};
|
||||
@@ -177,7 +176,7 @@ struct nameidata {
|
||||
#define NDINIT(ndp, op, flags, pathbuf) { \
|
||||
(ndp)->ni_cnd.cn_nameiop = op; \
|
||||
(ndp)->ni_cnd.cn_flags = flags; \
|
||||
(ndp)->ni_startdir = NULL; \
|
||||
(ndp)->ni_atdir = NULL; \
|
||||
(ndp)->ni_pathbuf = pathbuf; \
|
||||
(ndp)->ni_cnd.cn_cred = kauth_cred_get(); \
|
||||
}
|
||||
@@ -186,7 +185,7 @@ struct nameidata {
|
||||
* Use this to set the start directory for openat()-type operations.
|
||||
*/
|
||||
#define NDAT(ndp, dir) { \
|
||||
(ndp)->ni_startdir = (dir); \
|
||||
(ndp)->ni_atdir = (dir); \
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -234,7 +233,7 @@ extern pool_cache_t pnbuf_cache; /* pathname buffer cache */
|
||||
#define PNBUF_PUT(pnb) pool_cache_put(pnbuf_cache, (pnb))
|
||||
|
||||
/*
|
||||
* Typesafe flags for namei_simple.
|
||||
* Typesafe flags for namei_simple/nameiat_simple.
|
||||
*
|
||||
* This encoding is not optimal but serves the important purpose of
|
||||
* not being type-compatible with the regular namei flags.
|
||||
@@ -248,11 +247,13 @@ extern const namei_simple_flags_t
|
||||
NSM_FOLLOW_TRYEMULROOT;
|
||||
|
||||
/*
|
||||
* namei_simple_* - the simple cases of namei, with no struct
|
||||
* nameidata involved.
|
||||
* namei(at)?_simple_* - the simple cases of namei, with no struct
|
||||
* nameidata involved.
|
||||
*
|
||||
* namei_simple_kernel takes a kernel-space path as the first argument.
|
||||
* namei_simple_user takes a user-space path as the first argument.
|
||||
* The nameiat_simple_* variants handle relative path using the given
|
||||
* directory vnode instead of current directory.
|
||||
*
|
||||
* A namei call can be converted to namei_simple_* if:
|
||||
* - the second arg to NDINIT is LOOKUP;
|
||||
@@ -262,21 +263,27 @@ extern const namei_simple_flags_t
|
||||
*/
|
||||
int namei_simple_kernel(const char *, namei_simple_flags_t, struct vnode **);
|
||||
int namei_simple_user(const char *, namei_simple_flags_t, struct vnode **);
|
||||
int nameiat_simple_kernel(struct vnode *, const char *, namei_simple_flags_t,
|
||||
struct vnode **);
|
||||
int nameiat_simple_user(struct vnode *, const char *, namei_simple_flags_t,
|
||||
struct vnode **);
|
||||
|
||||
int namei(struct nameidata *);
|
||||
uint32_t namei_hash(const char *, const char **);
|
||||
int lookup_for_nfsd(struct nameidata *, struct vnode *, int neverfollow);
|
||||
int lookup_for_nfsd_index(struct nameidata *, struct vnode *);
|
||||
int relookup(struct vnode *, struct vnode **, struct componentname *, int);
|
||||
void cache_purge1(struct vnode *, const struct componentname *, int);
|
||||
void cache_purge1(struct vnode *, const char *, size_t, int);
|
||||
#define PURGE_PARENTS 1
|
||||
#define PURGE_CHILDREN 2
|
||||
#define cache_purge(vp) cache_purge1((vp), NULL, PURGE_PARENTS|PURGE_CHILDREN)
|
||||
int cache_lookup(struct vnode *, struct vnode **, struct componentname *);
|
||||
int cache_lookup_raw(struct vnode *, struct vnode **,
|
||||
struct componentname *);
|
||||
#define cache_purge(vp) cache_purge1((vp),NULL,0,PURGE_PARENTS|PURGE_CHILDREN)
|
||||
int cache_lookup(struct vnode *, const char *, size_t, uint32_t, uint32_t,
|
||||
int *, struct vnode **);
|
||||
int cache_lookup_raw(struct vnode *, const char *, size_t, uint32_t,
|
||||
int *, struct vnode **);
|
||||
int cache_revlookup(struct vnode *, struct vnode **, char **, char *);
|
||||
void cache_enter(struct vnode *, struct vnode *, struct componentname *);
|
||||
void cache_enter(struct vnode *, struct vnode *,
|
||||
const char *, size_t, uint32_t);
|
||||
void nchinit(void);
|
||||
void nchreinit(void);
|
||||
void cache_cpu_init(struct cpu_info *);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: param.h,v 1.421 2012/10/13 17:54:40 dholland Exp $ */
|
||||
/* $NetBSD: param.h,v 1.437 2013/11/25 03:03:41 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@@ -63,7 +63,7 @@
|
||||
* 2.99.9 (299000900)
|
||||
*/
|
||||
|
||||
#define __NetBSD_Version__ 699001300 /* NetBSD 6.99.13 */
|
||||
#define __NetBSD_Version__ 699002800 /* NetBSD 6.99.28 */
|
||||
|
||||
#define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
|
||||
(m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
|
||||
@@ -149,8 +149,8 @@
|
||||
#define NVNODE (NPROC + NTEXT + 100)
|
||||
#define NVNODE_IMPLICIT
|
||||
#endif
|
||||
#ifndef VNODE_VA_MAXPCT
|
||||
#define VNODE_VA_MAXPCT 20
|
||||
#ifndef VNODE_KMEM_MAXPCT
|
||||
#define VNODE_KMEM_MAXPCT 60
|
||||
#endif
|
||||
#ifndef BUFCACHE_VA_MAXPCT
|
||||
#define BUFCACHE_VA_MAXPCT 20
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pcu.h,v 1.9 2012/04/18 13:42:11 yamt Exp $ */
|
||||
/* $NetBSD: pcu.h,v 1.11 2013/08/22 19:50:55 drochner Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
@@ -50,33 +50,42 @@
|
||||
#if PCU_UNIT_COUNT > 0
|
||||
|
||||
/*
|
||||
* pcu_state_save(lwp)
|
||||
* pcu_state_save(lwp, flags)
|
||||
* save the current CPU's state into the given LWP's MD storage.
|
||||
*
|
||||
* pcu_state_load(lwp, used)
|
||||
* pcu_state_load(lwp, flags)
|
||||
* load PCU state from the given LWP's MD storage to the current CPU.
|
||||
* the 'used' argument is true if it isn't the first time the LWP uses
|
||||
* the PCU.
|
||||
* the 'flags' argument contains PCU_LOADED if it isn't the first time
|
||||
* the LWP has used the PCU.
|
||||
*
|
||||
* pcu_state_release(lwp)
|
||||
* pcu_state_release(lwp, flags)
|
||||
* tell MD code detect the next use of the PCU on the LWP, and call
|
||||
* pcu_load().
|
||||
*/
|
||||
|
||||
typedef struct {
|
||||
u_int pcu_id;
|
||||
void (*pcu_state_save)(lwp_t *);
|
||||
void (*pcu_state_load)(lwp_t *, bool);
|
||||
void (*pcu_state_release)(lwp_t *);
|
||||
void (*pcu_state_save)(lwp_t *, u_int);
|
||||
void (*pcu_state_load)(lwp_t *, u_int);
|
||||
void (*pcu_state_release)(lwp_t *, u_int);
|
||||
} pcu_ops_t;
|
||||
|
||||
#define PCU_USER 0x00 /* PCU state is for the user */
|
||||
#define PCU_KERNEL 0x01 /* PCU state is for the kernel */
|
||||
#define PCU_RELOAD 0x02 /* Load registers into the PCU, */
|
||||
#define PCU_ENABLE 0x04 /* Enable the PCU, */
|
||||
#define PCU_LOADED 0x08 /* LWP has used the PCU before, */
|
||||
|
||||
void pcu_switchpoint(lwp_t *);
|
||||
void pcu_discard_all(lwp_t *);
|
||||
void pcu_save_all(lwp_t *);
|
||||
|
||||
void pcu_load(const pcu_ops_t *);
|
||||
void pcu_save(const pcu_ops_t *);
|
||||
void pcu_discard(const pcu_ops_t *);
|
||||
void pcu_save_all_on_cpu(void);
|
||||
void pcu_discard(const pcu_ops_t *, bool);
|
||||
void pcu_kernel_acquire(const pcu_ops_t *);
|
||||
void pcu_kernel_release(const pcu_ops_t *);
|
||||
bool pcu_used_p(const pcu_ops_t *);
|
||||
|
||||
#else
|
||||
|
||||
70
sys/sys/physmap.h
Normal file
70
sys/sys/physmap.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/* $NetBSD: physmap.h,v 1.4 2013/04/08 01:33:53 uebayasi Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Matt Thomas of 3am Software Foundry.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_PHYSMAP_H_
|
||||
#define _SYS_PHYSMAP_H_
|
||||
|
||||
#if !defined(_KERNEL) && !defined(_KMEMUSER)
|
||||
#error "not supposed to be exposed to userland"
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
typedef struct {
|
||||
paddr_t ps_addr;
|
||||
psize_t ps_len;
|
||||
} physmap_segment_t;
|
||||
|
||||
/* typedef is in <sys/types.h> */
|
||||
struct physmap {
|
||||
uint16_t pm_nsegs;
|
||||
uint16_t pm_maxsegs;
|
||||
physmap_segment_t pm_segs[0];
|
||||
};
|
||||
|
||||
int physmap_create_iov(physmap_t **, const struct vmspace *,
|
||||
struct iovec *, size_t);
|
||||
int physmap_create_linear(physmap_t **, const struct vmspace *,
|
||||
vaddr_t, vsize_t);
|
||||
physmap_t *
|
||||
physmap_create_pagelist(struct vm_page **, size_t);
|
||||
|
||||
void physmap_destroy(physmap_t *);
|
||||
|
||||
void * physmap_map_init(physmap_t *, size_t, vm_prot_t);
|
||||
size_t physmap_map(void *, vaddr_t *);
|
||||
void physmap_map_fini(void *);
|
||||
|
||||
void physmap_zero(physmap_t *, size_t, size_t);
|
||||
|
||||
#endif /* _SYS_PHYSMAP_H_ */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmf.h,v 1.18 2010/02/24 22:38:10 dyoung Exp $ */
|
||||
/* $NetBSD: pmf.h,v 1.21 2013/08/06 06:10:57 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
@@ -46,7 +46,12 @@ typedef enum {
|
||||
PMFE_AUDIO_VOLUME_DOWN,
|
||||
PMFE_AUDIO_VOLUME_TOGGLE,
|
||||
PMFE_CHASSIS_LID_CLOSE,
|
||||
PMFE_CHASSIS_LID_OPEN
|
||||
PMFE_CHASSIS_LID_OPEN,
|
||||
PMFE_RADIO_ON,
|
||||
PMFE_RADIO_OFF,
|
||||
PMFE_RADIO_TOGGLE,
|
||||
PMFE_POWER_CHANGED,
|
||||
PMFE_SPEED_CHANGED
|
||||
} pmf_generic_event_t;
|
||||
|
||||
struct pmf_qual {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: power.h,v 1.17 2012/07/15 18:31:35 pgoyette Exp $ */
|
||||
/* $NetBSD: power.h,v 1.19 2013/03/30 19:05:20 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2003 Wasabi Systems, Inc.
|
||||
@@ -97,6 +97,20 @@
|
||||
#define PSWITCH_HK_EJECT_BUTTON "eject-button"
|
||||
#define PSWITCH_HK_ZOOM_BUTTON "zoom-button"
|
||||
#define PSWITCH_HK_VENDOR_BUTTON "vendor-button"
|
||||
#ifndef THINKPAD_NORMAL_HOTKEYS
|
||||
#define PSWITCH_HK_FNF1_BUTTON "fnf1-button"
|
||||
#define PSWITCH_HK_WIRELESS_BUTTON "wireless-button"
|
||||
#define PSWITCH_HK_WWAN_BUTTON "wWAN-button"
|
||||
#define PSWITCH_HK_POINTER_BUTTON "pointer-button"
|
||||
#define PSWITCH_HK_FNF10_BUTTON "fnf10-button"
|
||||
#define PSWITCH_HK_FNF11_BUTTON "fnf11-button"
|
||||
#define PSWITCH_HK_BRIGHTNESS_UP "brightness-up"
|
||||
#define PSWITCH_HK_BRIGHTNESS_DOWN "brightness-down"
|
||||
#define PSWITCH_HK_THINKLIGHT "thinklight"
|
||||
#define PSWITCH_HK_VOLUME_UP "volume-up"
|
||||
#define PSWITCH_HK_VOLUME_DOWN "volume-down"
|
||||
#define PSWITCH_HK_VOLUME_MUTE "volume-mute"
|
||||
#endif /* THINKPAD_NORMAL_HOTKEYS */
|
||||
|
||||
#define PSWITCH_EVENT_PRESSED 0 /* button pressed, lid closed, AC off */
|
||||
#define PSWITCH_EVENT_RELEASED 1 /* button released, lid open, AC on */
|
||||
@@ -145,7 +159,7 @@ struct pswitch_state {
|
||||
#define PENVSYS_TYPE_INDICATOR 17
|
||||
|
||||
/*
|
||||
* The following events apply for temperatures, power, resistance,
|
||||
* The following events apply for temperatures, power, resistance,
|
||||
* voltages, battery and fan sensors:
|
||||
*
|
||||
* PENVSYS_EVENT_CRITICAL A critical limit.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: proc.h,v 1.317 2012/07/22 22:40:18 rmind Exp $ */
|
||||
/* $NetBSD: proc.h,v 1.319 2013/01/02 19:39:04 dsl Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@@ -68,6 +68,10 @@
|
||||
#ifndef _SYS_PROC_H_
|
||||
#define _SYS_PROC_H_
|
||||
|
||||
#include <sys/lwp.h>
|
||||
|
||||
#if defined(_KMEMUSER) || defined(_KERNEL)
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_multiprocessor.h"
|
||||
#include "opt_kstack.h"
|
||||
@@ -75,12 +79,12 @@
|
||||
#endif
|
||||
|
||||
#include <machine/proc.h> /* Machine-dependent proc substruct */
|
||||
#include <machine/pcb.h>
|
||||
#include <sys/aio.h>
|
||||
#include <sys/rwlock.h>
|
||||
#include <sys/mqueue.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/condvar.h>
|
||||
#include <sys/lwp.h>
|
||||
#include <sys/queue.h>
|
||||
#include <sys/signalvar.h>
|
||||
#include <sys/siginfo.h>
|
||||
@@ -323,6 +327,8 @@ struct proc {
|
||||
#define p_session p_pgrp->pg_session
|
||||
#define p_pgid p_pgrp->pg_id
|
||||
|
||||
#endif /* _KMEMUSER || _KERNEL */
|
||||
|
||||
/*
|
||||
* Status values.
|
||||
*/
|
||||
@@ -389,6 +395,8 @@ struct proc {
|
||||
#define PL_SIGCOMPAT 0x00000200 /* Has used compat signal trampoline */
|
||||
#define PL_ORPHANPG 0x20000000 /* Member of an orphaned pgrp */
|
||||
|
||||
#if defined(_KMEMUSER) || defined(_KERNEL)
|
||||
|
||||
/*
|
||||
* Macro to compute the exit signal to be delivered.
|
||||
*/
|
||||
@@ -537,8 +545,6 @@ extern struct emul emul_netbsd;
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#if defined(_KMEMUSER) || defined(_KERNEL)
|
||||
|
||||
/*
|
||||
* Kernel stack parameters.
|
||||
*
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pset.h,v 1.3 2008/05/26 17:45:51 rmind Exp $ */
|
||||
/* $NetBSD: pset.h,v 1.4 2013/04/27 21:35:24 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, Mindaugas Rasiukevicius <rmind at NetBSD org>
|
||||
@@ -30,6 +30,7 @@
|
||||
#define _SYS_PSET_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/featuretest.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
/* Types of processor-sets */
|
||||
|
||||
@@ -211,7 +211,7 @@ __END_DECLS
|
||||
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* Trace options. */
|
||||
#define TO_TRACEFORK 0x1 /* automatically attach to forked children */
|
||||
#define TO_ALTEXEC 0x2 /* send SIGSTOP on successful exec() */
|
||||
@@ -256,6 +256,6 @@ struct ptrace_range {
|
||||
#define T_GETRANGE 106 /* get range of values */
|
||||
#define T_SETRANGE 107 /* set range of values */
|
||||
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_PTRACE_H_ */
|
||||
|
||||
777
sys/sys/queue.h
777
sys/sys/queue.h
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: queue.h,v 1.53 2011/11/19 22:51:31 tls Exp $ */
|
||||
/* $NetBSD: queue.h,v 1.64 2013/11/27 12:24:56 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -34,8 +34,6 @@
|
||||
#ifndef _SYS_QUEUE_H_
|
||||
#define _SYS_QUEUE_H_
|
||||
|
||||
#include <sys/null.h>
|
||||
|
||||
/*
|
||||
* This file defines five types of data structures: singly-linked lists,
|
||||
* lists, simple queues, tail queues, and circular queues.
|
||||
@@ -82,6 +80,92 @@
|
||||
* For details on the use of these macros, see the queue(3) manual page.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include the definition of NULL only on NetBSD because sys/null.h
|
||||
* is not available elsewhere. This conditional makes the header
|
||||
* portable and it can simply be dropped verbatim into any system.
|
||||
* The caveat is that on other systems some other header
|
||||
* must provide NULL before the macros can be used.
|
||||
*/
|
||||
#if defined(__NetBSD__) || defined(__minix)
|
||||
#include <sys/null.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
*/
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_END(head) NULL
|
||||
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = (head)->slh_first; \
|
||||
(var) != SLIST_END(head); \
|
||||
(var) = (var)->field.sle_next)
|
||||
|
||||
#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = SLIST_FIRST((head)); \
|
||||
(var) != SLIST_END(head) && \
|
||||
((tvar) = SLIST_NEXT((var), field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
*/
|
||||
#define SLIST_INIT(head) do { \
|
||||
(head)->slh_first = SLIST_END(head); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_AFTER(slistelm, field) do { \
|
||||
(slistelm)->field.sle_next = \
|
||||
SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} \
|
||||
else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
while(curelm->field.sle_next != (elm)) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
|
||||
/*
|
||||
* List definitions.
|
||||
*/
|
||||
@@ -99,6 +183,25 @@ struct { \
|
||||
struct type **le_prev; /* address of previous next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* List access methods.
|
||||
*/
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_END(head) NULL
|
||||
#define LIST_EMPTY(head) ((head)->lh_first == LIST_END(head))
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->lh_first); \
|
||||
(var) != LIST_END(head); \
|
||||
(var) = ((var)->field.le_next))
|
||||
|
||||
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = LIST_FIRST((head)); \
|
||||
(var) != LIST_END(head) && \
|
||||
((tvar) = LIST_NEXT((var), field), 1); \
|
||||
(var) = (tvar))
|
||||
|
||||
/*
|
||||
* List functions.
|
||||
*/
|
||||
@@ -124,12 +227,13 @@ struct { \
|
||||
#endif
|
||||
|
||||
#define LIST_INIT(head) do { \
|
||||
(head)->lh_first = NULL; \
|
||||
(head)->lh_first = LIST_END(head); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_INSERT_AFTER(listelm, elm, field) do { \
|
||||
QUEUEDEBUG_LIST_OP((listelm), field) \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != NULL) \
|
||||
if (((elm)->field.le_next = (listelm)->field.le_next) != \
|
||||
LIST_END(head)) \
|
||||
(listelm)->field.le_next->field.le_prev = \
|
||||
&(elm)->field.le_next; \
|
||||
(listelm)->field.le_next = (elm); \
|
||||
@@ -146,7 +250,7 @@ struct { \
|
||||
|
||||
#define LIST_INSERT_HEAD(head, elm, field) do { \
|
||||
QUEUEDEBUG_LIST_INSERT_HEAD((head), (elm), field) \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != NULL) \
|
||||
if (((elm)->field.le_next = (head)->lh_first) != LIST_END(head))\
|
||||
(head)->lh_first->field.le_prev = &(elm)->field.le_next;\
|
||||
(head)->lh_first = (elm); \
|
||||
(elm)->field.le_prev = &(head)->lh_first; \
|
||||
@@ -161,101 +265,286 @@ struct { \
|
||||
QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define LIST_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->lh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.le_next))
|
||||
|
||||
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = LIST_FIRST((head)); \
|
||||
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
|
||||
(var) = (tvar))
|
||||
/*
|
||||
* List access methods.
|
||||
*/
|
||||
#define LIST_EMPTY(head) ((head)->lh_first == NULL)
|
||||
#define LIST_FIRST(head) ((head)->lh_first)
|
||||
#define LIST_NEXT(elm, field) ((elm)->field.le_next)
|
||||
|
||||
#define LIST_REPLACE(elm, elm2, field) do { \
|
||||
if (((elm2)->field.le_next = (elm)->field.le_next) != NULL) \
|
||||
(elm2)->field.le_next->field.le_prev = \
|
||||
&(elm2)->field.le_next; \
|
||||
(elm2)->field.le_prev = (elm)->field.le_prev; \
|
||||
*(elm2)->field.le_prev = (elm2); \
|
||||
QUEUEDEBUG_LIST_POSTREMOVE((elm), field) \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/*
|
||||
* Singly-linked List definitions.
|
||||
* Simple queue definitions.
|
||||
*/
|
||||
#define SLIST_HEAD(name, type) \
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *slh_first; /* first element */ \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define SLIST_HEAD_INITIALIZER(head) \
|
||||
{ NULL }
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SLIST_ENTRY(type) \
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sle_next; /* next element */ \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked List functions.
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SLIST_INIT(head) do { \
|
||||
(head)->slh_first = NULL; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_END(head) NULL
|
||||
#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == SIMPLEQ_END(head))
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
#define SLIST_INSERT_AFTER(slistelm, elm, field) do { \
|
||||
(elm)->field.sle_next = (slistelm)->field.sle_next; \
|
||||
(slistelm)->field.sle_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var) != SIMPLEQ_END(head); \
|
||||
(var) = ((var)->field.sqe_next))
|
||||
|
||||
#define SLIST_INSERT_HEAD(head, elm, field) do { \
|
||||
(elm)->field.sle_next = (head)->slh_first; \
|
||||
(head)->slh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_HEAD(head, field) do { \
|
||||
(head)->slh_first = (head)->slh_first->field.sle_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->slh_first == (elm)) { \
|
||||
SLIST_REMOVE_HEAD((head), field); \
|
||||
} \
|
||||
else { \
|
||||
struct type *curelm = (head)->slh_first; \
|
||||
while(curelm->field.sle_next != (elm)) \
|
||||
curelm = curelm->field.sle_next; \
|
||||
curelm->field.sle_next = \
|
||||
curelm->field.sle_next->field.sle_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_REMOVE_AFTER(slistelm, field) do { \
|
||||
(slistelm)->field.sle_next = \
|
||||
SLIST_NEXT(SLIST_NEXT((slistelm), field), field); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SLIST_FOREACH(var, head, field) \
|
||||
for((var) = (head)->slh_first; (var); (var) = (var)->field.sle_next)
|
||||
|
||||
#define SLIST_FOREACH_SAFE(var, head, field, tvar) \
|
||||
for ((var) = SLIST_FIRST((head)); \
|
||||
(var) && ((tvar) = SLIST_NEXT((var), field), 1); \
|
||||
(var) = (tvar))
|
||||
#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var) != SIMPLEQ_END(head) && \
|
||||
((next = ((var)->field.sqe_next)), 1); \
|
||||
(var) = (next))
|
||||
|
||||
/*
|
||||
* Singly-linked List access methods.
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SLIST_EMPTY(head) ((head)->slh_first == NULL)
|
||||
#define SLIST_FIRST(head) ((head)->slh_first)
|
||||
#define SLIST_NEXT(elm, field) ((elm)->field.sle_next)
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_AFTER(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (elm)->field.sqe_next->field.sqe_next) \
|
||||
== NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->sqh_first == (elm)) { \
|
||||
SIMPLEQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->sqh_first; \
|
||||
while (curelm->field.sqe_next != (elm)) \
|
||||
curelm = curelm->field.sqe_next; \
|
||||
if ((curelm->field.sqe_next = \
|
||||
curelm->field.sqe_next->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(curelm)->field.sqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_CONCAT(head1, head2) do { \
|
||||
if (!SIMPLEQ_EMPTY((head2))) { \
|
||||
*(head1)->sqh_last = (head2)->sqh_first; \
|
||||
(head1)->sqh_last = (head2)->sqh_last; \
|
||||
SIMPLEQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_LAST(head, type, field) \
|
||||
(SIMPLEQ_EMPTY((head)) ? \
|
||||
NULL : \
|
||||
((struct type *)(void *) \
|
||||
((char *)((head)->sqh_last) - offsetof(struct type, field))))
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define _TAILQ_HEAD(name, type, qual) \
|
||||
struct name { \
|
||||
qual type *tqh_first; /* first element */ \
|
||||
qual type *qual *tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ TAILQ_END(head), &(head).tqh_first }
|
||||
|
||||
#define _TAILQ_ENTRY(type, qual) \
|
||||
struct { \
|
||||
qual type *tqe_next; /* next element */ \
|
||||
qual type *qual *tqe_prev; /* address of previous next element */\
|
||||
}
|
||||
#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
|
||||
|
||||
/*
|
||||
* Tail queue access methods.
|
||||
*/
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_END(head) (NULL)
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
#define TAILQ_EMPTY(head) (TAILQ_FIRST(head) == TAILQ_END(head))
|
||||
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = ((var)->field.tqe_next))
|
||||
|
||||
#define TAILQ_FOREACH_SAFE(var, head, field, next) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var) != TAILQ_END(head) && \
|
||||
((next) = TAILQ_NEXT(var, field), 1); (var) = (next))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last));\
|
||||
(var) != TAILQ_END(head); \
|
||||
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \
|
||||
for ((var) = TAILQ_LAST((head), headname); \
|
||||
(var) != TAILQ_END(head) && \
|
||||
((prev) = TAILQ_PREV((var), headname, field), 1); (var) = (prev))
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#if defined(_KERNEL) && defined(QUEUEDEBUG)
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \
|
||||
if ((head)->tqh_first && \
|
||||
(head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \
|
||||
panic("TAILQ_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \
|
||||
if (*(head)->tqh_last != NULL) \
|
||||
panic("TAILQ_INSERT_TAIL %p %s:%d", (head), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_OP(elm, field) \
|
||||
if ((elm)->field.tqe_next && \
|
||||
(elm)->field.tqe_next->field.tqe_prev != \
|
||||
&(elm)->field.tqe_next) \
|
||||
panic("TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\
|
||||
if (*(elm)->field.tqe_prev != (elm)) \
|
||||
panic("TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \
|
||||
if ((elm)->field.tqe_next == NULL && \
|
||||
(head)->tqh_last != &(elm)->field.tqe_next) \
|
||||
panic("TAILQ_PREREMOVE head %p elm %p %s:%d", \
|
||||
(head), (elm), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \
|
||||
(elm)->field.tqe_next = (void *)1L; \
|
||||
(elm)->field.tqe_prev = (void *)1L;
|
||||
#else
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_OP(elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
|
||||
#endif
|
||||
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = TAILQ_END(head); \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != TAILQ_END(head))\
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \
|
||||
(elm)->field.tqe_next = TAILQ_END(head); \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_OP((listelm), field) \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != \
|
||||
TAILQ_END(head)) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_OP((listelm), field) \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \
|
||||
QUEUEDEBUG_TAILQ_OP((elm), field) \
|
||||
if (((elm)->field.tqe_next) != TAILQ_END(head)) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_REPLACE(head, elm, elm2, field) do { \
|
||||
if (((elm2)->field.tqe_next = (elm)->field.tqe_next) != \
|
||||
TAILQ_END(head)) \
|
||||
(elm2)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm2)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm2)->field.tqe_next; \
|
||||
(elm2)->field.tqe_prev = (elm)->field.tqe_prev; \
|
||||
*(elm2)->field.tqe_prev = (elm2); \
|
||||
QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_CONCAT(head1, head2, field) do { \
|
||||
if (!TAILQ_EMPTY(head2)) { \
|
||||
*(head1)->tqh_last = (head2)->tqh_first; \
|
||||
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
|
||||
(head1)->tqh_last = (head2)->tqh_last; \
|
||||
TAILQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue declarations.
|
||||
*/
|
||||
#define STAILQ_HEAD(name, type) \
|
||||
#define STAILQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *stqh_first; /* first element */ \
|
||||
struct type **stqh_last; /* addr of last next element */ \
|
||||
struct type *stqh_first; /* first element */ \
|
||||
struct type **stqh_last; /* addr of last next element */ \
|
||||
}
|
||||
|
||||
#define STAILQ_HEAD_INITIALIZER(head) \
|
||||
@@ -266,6 +555,14 @@ struct { \
|
||||
struct type *stqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue access methods.
|
||||
*/
|
||||
#define STAILQ_FIRST(head) ((head)->stqh_first)
|
||||
#define STAILQ_END(head) NULL
|
||||
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
|
||||
#define STAILQ_EMPTY(head) (STAILQ_FIRST(head) == STAILQ_END(head))
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue functions.
|
||||
*/
|
||||
@@ -334,273 +631,49 @@ struct { \
|
||||
((struct type *)(void *) \
|
||||
((char *)((head)->stqh_last) - offsetof(struct type, field))))
|
||||
|
||||
/*
|
||||
* Singly-linked Tail queue access methods.
|
||||
*/
|
||||
#define STAILQ_EMPTY(head) ((head)->stqh_first == NULL)
|
||||
#define STAILQ_FIRST(head) ((head)->stqh_first)
|
||||
#define STAILQ_NEXT(elm, field) ((elm)->field.stqe_next)
|
||||
|
||||
#ifndef _KERNEL
|
||||
/*
|
||||
* Circular queue definitions. Do not use. We still keep the macros
|
||||
* for compatibility but because of pointer aliasing issues their use
|
||||
* is discouraged!
|
||||
*/
|
||||
|
||||
/*
|
||||
* Simple queue definitions.
|
||||
* __launder_type(): We use this ugly hack to work around the the compiler
|
||||
* noticing that two types may not alias each other and elide tests in code.
|
||||
* We hit this in the CIRCLEQ macros when comparing 'struct name *' and
|
||||
* 'struct type *' (see CIRCLEQ_HEAD()). Modern compilers (such as GCC
|
||||
* 4.8) declare these comparisons as always false, causing the code to
|
||||
* not run as designed.
|
||||
*
|
||||
* This hack is only to be used for comparisons and thus can be fully const.
|
||||
* Do not use for assignment.
|
||||
*
|
||||
* If we ever choose to change the ABI of the CIRCLEQ macros, we could fix
|
||||
* this by changing the head/tail sentinal values, but see the note above
|
||||
* this one.
|
||||
*/
|
||||
#define SIMPLEQ_HEAD(name, type) \
|
||||
struct name { \
|
||||
struct type *sqh_first; /* first element */ \
|
||||
struct type **sqh_last; /* addr of last next element */ \
|
||||
static __inline const void * __launder_type(const void *);
|
||||
static __inline const void *
|
||||
__launder_type(const void *__x)
|
||||
{
|
||||
__asm __volatile("" : "+r" (__x));
|
||||
return __x;
|
||||
}
|
||||
|
||||
#define SIMPLEQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).sqh_first }
|
||||
|
||||
#define SIMPLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
struct type *sqe_next; /* next element */ \
|
||||
}
|
||||
|
||||
/*
|
||||
* Simple queue functions.
|
||||
*/
|
||||
#define SIMPLEQ_INIT(head) do { \
|
||||
(head)->sqh_first = NULL; \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (head)->sqh_first) == NULL) \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(head)->sqh_first = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
(elm)->field.sqe_next = NULL; \
|
||||
*(head)->sqh_last = (elm); \
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
if (((elm)->field.sqe_next = (listelm)->field.sqe_next) == NULL)\
|
||||
(head)->sqh_last = &(elm)->field.sqe_next; \
|
||||
(listelm)->field.sqe_next = (elm); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE_HEAD(head, field) do { \
|
||||
if (((head)->sqh_first = (head)->sqh_first->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(head)->sqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_REMOVE(head, elm, type, field) do { \
|
||||
if ((head)->sqh_first == (elm)) { \
|
||||
SIMPLEQ_REMOVE_HEAD((head), field); \
|
||||
} else { \
|
||||
struct type *curelm = (head)->sqh_first; \
|
||||
while (curelm->field.sqe_next != (elm)) \
|
||||
curelm = curelm->field.sqe_next; \
|
||||
if ((curelm->field.sqe_next = \
|
||||
curelm->field.sqe_next->field.sqe_next) == NULL) \
|
||||
(head)->sqh_last = &(curelm)->field.sqe_next; \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.sqe_next))
|
||||
|
||||
#define SIMPLEQ_FOREACH_SAFE(var, head, field, next) \
|
||||
for ((var) = ((head)->sqh_first); \
|
||||
(var) && ((next = ((var)->field.sqe_next)), 1); \
|
||||
(var) = (next))
|
||||
|
||||
#define SIMPLEQ_CONCAT(head1, head2) do { \
|
||||
if (!SIMPLEQ_EMPTY((head2))) { \
|
||||
*(head1)->sqh_last = (head2)->sqh_first; \
|
||||
(head1)->sqh_last = (head2)->sqh_last; \
|
||||
SIMPLEQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define SIMPLEQ_LAST(head, type, field) \
|
||||
(SIMPLEQ_EMPTY((head)) ? \
|
||||
NULL : \
|
||||
((struct type *)(void *) \
|
||||
((char *)((head)->sqh_last) - offsetof(struct type, field))))
|
||||
|
||||
/*
|
||||
* Simple queue access methods.
|
||||
*/
|
||||
#define SIMPLEQ_EMPTY(head) ((head)->sqh_first == NULL)
|
||||
#define SIMPLEQ_FIRST(head) ((head)->sqh_first)
|
||||
#define SIMPLEQ_NEXT(elm, field) ((elm)->field.sqe_next)
|
||||
|
||||
|
||||
/*
|
||||
* Tail queue definitions.
|
||||
*/
|
||||
#define _TAILQ_HEAD(name, type, qual) \
|
||||
struct name { \
|
||||
qual type *tqh_first; /* first element */ \
|
||||
qual type *qual *tqh_last; /* addr of last next element */ \
|
||||
}
|
||||
#define TAILQ_HEAD(name, type) _TAILQ_HEAD(name, struct type,)
|
||||
|
||||
#define TAILQ_HEAD_INITIALIZER(head) \
|
||||
{ NULL, &(head).tqh_first }
|
||||
|
||||
#define _TAILQ_ENTRY(type, qual) \
|
||||
struct { \
|
||||
qual type *tqe_next; /* next element */ \
|
||||
qual type *qual *tqe_prev; /* address of previous next element */\
|
||||
}
|
||||
#define TAILQ_ENTRY(type) _TAILQ_ENTRY(struct type,)
|
||||
|
||||
/*
|
||||
* Tail queue functions.
|
||||
*/
|
||||
#if defined(_KERNEL) && defined(QUEUEDEBUG)
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field) \
|
||||
if ((head)->tqh_first && \
|
||||
(head)->tqh_first->field.tqe_prev != &(head)->tqh_first) \
|
||||
panic("TAILQ_INSERT_HEAD %p %s:%d", (head), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field) \
|
||||
if (*(head)->tqh_last != NULL) \
|
||||
panic("TAILQ_INSERT_TAIL %p %s:%d", (head), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_OP(elm, field) \
|
||||
if ((elm)->field.tqe_next && \
|
||||
(elm)->field.tqe_next->field.tqe_prev != \
|
||||
&(elm)->field.tqe_next) \
|
||||
panic("TAILQ_* forw %p %s:%d", (elm), __FILE__, __LINE__);\
|
||||
if (*(elm)->field.tqe_prev != (elm)) \
|
||||
panic("TAILQ_* back %p %s:%d", (elm), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field) \
|
||||
if ((elm)->field.tqe_next == NULL && \
|
||||
(head)->tqh_last != &(elm)->field.tqe_next) \
|
||||
panic("TAILQ_PREREMOVE head %p elm %p %s:%d", \
|
||||
(head), (elm), __FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field) \
|
||||
(elm)->field.tqe_next = (void *)1L; \
|
||||
(elm)->field.tqe_prev = (void *)1L;
|
||||
#else
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_HEAD(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_INSERT_TAIL(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_OP(elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_PREREMOVE(head, elm, field)
|
||||
#define QUEUEDEBUG_TAILQ_POSTREMOVE(elm, field)
|
||||
#endif
|
||||
|
||||
#define TAILQ_INIT(head) do { \
|
||||
(head)->tqh_first = NULL; \
|
||||
(head)->tqh_last = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_HEAD(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_INSERT_HEAD((head), (elm), field) \
|
||||
if (((elm)->field.tqe_next = (head)->tqh_first) != NULL) \
|
||||
(head)->tqh_first->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(head)->tqh_first = (elm); \
|
||||
(elm)->field.tqe_prev = &(head)->tqh_first; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_TAIL(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_INSERT_TAIL((head), (elm), field) \
|
||||
(elm)->field.tqe_next = NULL; \
|
||||
(elm)->field.tqe_prev = (head)->tqh_last; \
|
||||
*(head)->tqh_last = (elm); \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_OP((listelm), field) \
|
||||
if (((elm)->field.tqe_next = (listelm)->field.tqe_next) != NULL)\
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
&(elm)->field.tqe_next; \
|
||||
else \
|
||||
(head)->tqh_last = &(elm)->field.tqe_next; \
|
||||
(listelm)->field.tqe_next = (elm); \
|
||||
(elm)->field.tqe_prev = &(listelm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_OP((listelm), field) \
|
||||
(elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
|
||||
(elm)->field.tqe_next = (listelm); \
|
||||
*(listelm)->field.tqe_prev = (elm); \
|
||||
(listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_REMOVE(head, elm, field) do { \
|
||||
QUEUEDEBUG_TAILQ_PREREMOVE((head), (elm), field) \
|
||||
QUEUEDEBUG_TAILQ_OP((elm), field) \
|
||||
if (((elm)->field.tqe_next) != NULL) \
|
||||
(elm)->field.tqe_next->field.tqe_prev = \
|
||||
(elm)->field.tqe_prev; \
|
||||
else \
|
||||
(head)->tqh_last = (elm)->field.tqe_prev; \
|
||||
*(elm)->field.tqe_prev = (elm)->field.tqe_next; \
|
||||
QUEUEDEBUG_TAILQ_POSTREMOVE((elm), field); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define TAILQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var); \
|
||||
(var) = ((var)->field.tqe_next))
|
||||
|
||||
#define TAILQ_FOREACH_SAFE(var, head, field, next) \
|
||||
for ((var) = ((head)->tqh_first); \
|
||||
(var) != NULL && ((next) = TAILQ_NEXT(var, field), 1); \
|
||||
(var) = (next))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE(var, head, headname, field) \
|
||||
for ((var) = (*(((struct headname *)((head)->tqh_last))->tqh_last)); \
|
||||
(var); \
|
||||
(var) = (*(((struct headname *)((var)->field.tqe_prev))->tqh_last)))
|
||||
|
||||
#define TAILQ_FOREACH_REVERSE_SAFE(var, head, headname, field, prev) \
|
||||
for ((var) = TAILQ_LAST((head), headname); \
|
||||
(var) && ((prev) = TAILQ_PREV((var), headname, field), 1);\
|
||||
(var) = (prev))
|
||||
|
||||
#define TAILQ_CONCAT(head1, head2, field) do { \
|
||||
if (!TAILQ_EMPTY(head2)) { \
|
||||
*(head1)->tqh_last = (head2)->tqh_first; \
|
||||
(head2)->tqh_first->field.tqe_prev = (head1)->tqh_last; \
|
||||
(head1)->tqh_last = (head2)->tqh_last; \
|
||||
TAILQ_INIT((head2)); \
|
||||
} \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
/*
|
||||
* Tail queue access methods.
|
||||
*/
|
||||
#define TAILQ_EMPTY(head) ((head)->tqh_first == NULL)
|
||||
#define TAILQ_FIRST(head) ((head)->tqh_first)
|
||||
#define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
|
||||
|
||||
#define TAILQ_LAST(head, headname) \
|
||||
(*(((struct headname *)((head)->tqh_last))->tqh_last))
|
||||
#define TAILQ_PREV(elm, headname, field) \
|
||||
(*(((struct headname *)((elm)->field.tqe_prev))->tqh_last))
|
||||
|
||||
|
||||
/*
|
||||
* Circular queue definitions.
|
||||
*/
|
||||
#if defined(_KERNEL) && defined(QUEUEDEBUG)
|
||||
#define QUEUEDEBUG_CIRCLEQ_HEAD(head, field) \
|
||||
if ((head)->cqh_first != (void *)(head) && \
|
||||
(head)->cqh_first->field.cqe_prev != (void *)(head)) \
|
||||
if ((head)->cqh_first != CIRCLEQ_ENDC(head) && \
|
||||
(head)->cqh_first->field.cqe_prev != CIRCLEQ_ENDC(head)) \
|
||||
panic("CIRCLEQ head forw %p %s:%d", (head), \
|
||||
__FILE__, __LINE__); \
|
||||
if ((head)->cqh_last != (void *)(head) && \
|
||||
(head)->cqh_last->field.cqe_next != (void *)(head)) \
|
||||
if ((head)->cqh_last != CIRCLEQ_ENDC(head) && \
|
||||
(head)->cqh_last->field.cqe_next != CIRCLEQ_ENDC(head)) \
|
||||
panic("CIRCLEQ head back %p %s:%d", (head), \
|
||||
__FILE__, __LINE__);
|
||||
#define QUEUEDEBUG_CIRCLEQ_ELM(head, elm, field) \
|
||||
if ((elm)->field.cqe_next == (void *)(head)) { \
|
||||
if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) { \
|
||||
if ((head)->cqh_last != (elm)) \
|
||||
panic("CIRCLEQ elm last %p %s:%d", (elm), \
|
||||
__FILE__, __LINE__); \
|
||||
@@ -609,7 +682,7 @@ struct { \
|
||||
panic("CIRCLEQ elm forw %p %s:%d", (elm), \
|
||||
__FILE__, __LINE__); \
|
||||
} \
|
||||
if ((elm)->field.cqe_prev == (void *)(head)) { \
|
||||
if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) { \
|
||||
if ((head)->cqh_first != (elm)) \
|
||||
panic("CIRCLEQ elm first %p %s:%d", (elm), \
|
||||
__FILE__, __LINE__); \
|
||||
@@ -634,7 +707,7 @@ struct name { \
|
||||
}
|
||||
|
||||
#define CIRCLEQ_HEAD_INITIALIZER(head) \
|
||||
{ (void *)&head, (void *)&head }
|
||||
{ CIRCLEQ_END(&head), CIRCLEQ_END(&head) }
|
||||
|
||||
#define CIRCLEQ_ENTRY(type) \
|
||||
struct { \
|
||||
@@ -646,8 +719,8 @@ struct { \
|
||||
* Circular queue functions.
|
||||
*/
|
||||
#define CIRCLEQ_INIT(head) do { \
|
||||
(head)->cqh_first = (void *)(head); \
|
||||
(head)->cqh_last = (void *)(head); \
|
||||
(head)->cqh_first = CIRCLEQ_END(head); \
|
||||
(head)->cqh_last = CIRCLEQ_END(head); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#define CIRCLEQ_INSERT_AFTER(head, listelm, elm, field) do { \
|
||||
@@ -655,7 +728,7 @@ struct { \
|
||||
QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
|
||||
(elm)->field.cqe_next = (listelm)->field.cqe_next; \
|
||||
(elm)->field.cqe_prev = (listelm); \
|
||||
if ((listelm)->field.cqe_next == (void *)(head)) \
|
||||
if ((listelm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_next->field.cqe_prev = (elm); \
|
||||
@@ -667,7 +740,7 @@ struct { \
|
||||
QUEUEDEBUG_CIRCLEQ_ELM((head), (listelm), field) \
|
||||
(elm)->field.cqe_next = (listelm); \
|
||||
(elm)->field.cqe_prev = (listelm)->field.cqe_prev; \
|
||||
if ((listelm)->field.cqe_prev == (void *)(head)) \
|
||||
if ((listelm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(listelm)->field.cqe_prev->field.cqe_next = (elm); \
|
||||
@@ -677,8 +750,8 @@ struct { \
|
||||
#define CIRCLEQ_INSERT_HEAD(head, elm, field) do { \
|
||||
QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
|
||||
(elm)->field.cqe_next = (head)->cqh_first; \
|
||||
(elm)->field.cqe_prev = (void *)(head); \
|
||||
if ((head)->cqh_last == (void *)(head)) \
|
||||
(elm)->field.cqe_prev = CIRCLEQ_END(head); \
|
||||
if ((head)->cqh_last == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_last = (elm); \
|
||||
else \
|
||||
(head)->cqh_first->field.cqe_prev = (elm); \
|
||||
@@ -687,9 +760,9 @@ struct { \
|
||||
|
||||
#define CIRCLEQ_INSERT_TAIL(head, elm, field) do { \
|
||||
QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
|
||||
(elm)->field.cqe_next = (void *)(head); \
|
||||
(elm)->field.cqe_next = CIRCLEQ_END(head); \
|
||||
(elm)->field.cqe_prev = (head)->cqh_last; \
|
||||
if ((head)->cqh_first == (void *)(head)) \
|
||||
if ((head)->cqh_first == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_first = (elm); \
|
||||
else \
|
||||
(head)->cqh_last->field.cqe_next = (elm); \
|
||||
@@ -699,12 +772,12 @@ struct { \
|
||||
#define CIRCLEQ_REMOVE(head, elm, field) do { \
|
||||
QUEUEDEBUG_CIRCLEQ_HEAD((head), field) \
|
||||
QUEUEDEBUG_CIRCLEQ_ELM((head), (elm), field) \
|
||||
if ((elm)->field.cqe_next == (void *)(head)) \
|
||||
if ((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_last = (elm)->field.cqe_prev; \
|
||||
else \
|
||||
(elm)->field.cqe_next->field.cqe_prev = \
|
||||
(elm)->field.cqe_prev; \
|
||||
if ((elm)->field.cqe_prev == (void *)(head)) \
|
||||
if ((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
|
||||
(head)->cqh_first = (elm)->field.cqe_next; \
|
||||
else \
|
||||
(elm)->field.cqe_prev->field.cqe_next = \
|
||||
@@ -714,30 +787,36 @@ struct { \
|
||||
|
||||
#define CIRCLEQ_FOREACH(var, head, field) \
|
||||
for ((var) = ((head)->cqh_first); \
|
||||
(var) != (const void *)(head); \
|
||||
(var) != CIRCLEQ_ENDC(head); \
|
||||
(var) = ((var)->field.cqe_next))
|
||||
|
||||
#define CIRCLEQ_FOREACH_REVERSE(var, head, field) \
|
||||
for ((var) = ((head)->cqh_last); \
|
||||
(var) != (const void *)(head); \
|
||||
(var) != CIRCLEQ_ENDC(head); \
|
||||
(var) = ((var)->field.cqe_prev))
|
||||
|
||||
/*
|
||||
* Circular queue access methods.
|
||||
*/
|
||||
#define CIRCLEQ_EMPTY(head) ((head)->cqh_first == (void *)(head))
|
||||
#define CIRCLEQ_FIRST(head) ((head)->cqh_first)
|
||||
#define CIRCLEQ_LAST(head) ((head)->cqh_last)
|
||||
/* For comparisons */
|
||||
#define CIRCLEQ_ENDC(head) (__launder_type(head))
|
||||
/* For assignments */
|
||||
#define CIRCLEQ_END(head) ((void *)(head))
|
||||
#define CIRCLEQ_NEXT(elm, field) ((elm)->field.cqe_next)
|
||||
#define CIRCLEQ_PREV(elm, field) ((elm)->field.cqe_prev)
|
||||
#define CIRCLEQ_EMPTY(head) \
|
||||
(CIRCLEQ_FIRST(head) == CIRCLEQ_ENDC(head))
|
||||
|
||||
#define CIRCLEQ_LOOP_NEXT(head, elm, field) \
|
||||
(((elm)->field.cqe_next == (void *)(head)) \
|
||||
(((elm)->field.cqe_next == CIRCLEQ_ENDC(head)) \
|
||||
? ((head)->cqh_first) \
|
||||
: (elm->field.cqe_next))
|
||||
#define CIRCLEQ_LOOP_PREV(head, elm, field) \
|
||||
(((elm)->field.cqe_prev == (void *)(head)) \
|
||||
(((elm)->field.cqe_prev == CIRCLEQ_ENDC(head)) \
|
||||
? ((head)->cqh_last) \
|
||||
: (elm->field.cqe_prev))
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#endif /* !_SYS_QUEUE_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: quotactl.h,v 1.35 2012/02/01 05:46:45 dholland Exp $ */
|
||||
/* $NetBSD: quotactl.h,v 1.36 2012/12/01 11:41:50 mbalmer Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 2011 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
@@ -66,7 +66,7 @@ struct quotaobjtypestat {
|
||||
/*
|
||||
* Semi-opaque structure for cursors. This holds the cursor state in
|
||||
* userland; the size is exposed only to libquota, not to client code,
|
||||
* and is meant to be large enough to accomodate all likely future
|
||||
* and is meant to be large enough to accommodate all likely future
|
||||
* expansion without being unduly bloated, as it will need to be
|
||||
* copied in and out for every call using it.
|
||||
*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: resourcevar.h,v 1.53 2011/06/03 17:58:18 rmind Exp $ */
|
||||
/* $NetBSD: resourcevar.h,v 1.54 2012/11/03 23:22:22 njoly Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -120,6 +120,8 @@ void pstatsfree(struct pstats *);
|
||||
extern rlim_t maxdmap;
|
||||
extern rlim_t maxsmap;
|
||||
|
||||
int getrusage1(struct proc *, int, struct rusage *);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !_SYS_RESOURCEVAR_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rnd.h,v 1.33 2012/09/05 18:57:33 tls Exp $ */
|
||||
/* $NetBSD: rnd.h,v 1.40 2013/08/29 01:04:49 tls Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@@ -41,7 +41,6 @@
|
||||
#include <sys/sha1.h>
|
||||
|
||||
#ifdef _KERNEL
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/queue.h>
|
||||
#endif
|
||||
|
||||
@@ -91,6 +90,8 @@ typedef struct {
|
||||
*/
|
||||
#define RND_FLAG_NO_ESTIMATE 0x00000100 /* don't estimate entropy */
|
||||
#define RND_FLAG_NO_COLLECT 0x00000200 /* don't collect entropy */
|
||||
#define RND_FLAG_FAST 0x00000400 /* process samples in bulk */
|
||||
#define RND_FLAG_HASCB 0x00000800 /* has get callback */
|
||||
|
||||
#define RND_TYPE_UNKNOWN 0 /* unknown source */
|
||||
#define RND_TYPE_DISK 1 /* source is physical disk */
|
||||
@@ -126,24 +127,16 @@ typedef struct krndsource {
|
||||
void *state; /* state information */
|
||||
size_t test_cnt; /* how much test data accumulated? */
|
||||
rngtest_t *test; /* test data for RNG type sources */
|
||||
void (*get)(size_t, void *); /* pool wants N bytes (badly) */
|
||||
void *getarg; /* argument to get-function */
|
||||
} krndsource_t;
|
||||
|
||||
enum rsink_st {
|
||||
RSTATE_IDLE = 0,
|
||||
RSTATE_PENDING,
|
||||
RSTATE_HASBITS
|
||||
};
|
||||
|
||||
typedef struct rndsink {
|
||||
TAILQ_ENTRY(rndsink) tailq; /* the queue */
|
||||
kmutex_t mtx; /* lock to seed or unregister */
|
||||
enum rsink_st state; /* in-use? filled? */
|
||||
void (*cb)(void *); /* callback function when ready */
|
||||
void *arg; /* callback function argument */
|
||||
char name[16]; /* sink name */
|
||||
size_t len; /* how many bytes wanted/supplied */
|
||||
uint8_t data[64]; /* random data returned here */
|
||||
} rndsink_t;
|
||||
static inline void
|
||||
rndsource_setcb(struct krndsource *const rs, void *const cb, void *const arg)
|
||||
{
|
||||
rs->get = cb;
|
||||
rs->getarg = arg;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
uint32_t cursor; /* current add point in the pool */
|
||||
@@ -162,9 +155,11 @@ void rndpool_get_stats(rndpool_t *, void *, int);
|
||||
void rndpool_increment_entropy_count(rndpool_t *, uint32_t);
|
||||
uint32_t *rndpool_get_pool(rndpool_t *);
|
||||
uint32_t rndpool_get_poolsize(void);
|
||||
void rndpool_add_data(rndpool_t *, void *, uint32_t, uint32_t);
|
||||
void rndpool_add_data(rndpool_t *,
|
||||
const void *const , uint32_t, uint32_t);
|
||||
uint32_t rndpool_extract_data(rndpool_t *, void *, uint32_t, uint32_t);
|
||||
void rnd_init(void);
|
||||
void rnd_init_softint(void);
|
||||
void _rnd_add_uint32(krndsource_t *, uint32_t);
|
||||
void rnd_add_data(krndsource_t *, const void *const, uint32_t,
|
||||
uint32_t);
|
||||
@@ -172,19 +167,21 @@ void rnd_attach_source(krndsource_t *, const char *,
|
||||
uint32_t, uint32_t);
|
||||
void rnd_detach_source(krndsource_t *);
|
||||
|
||||
void rndsink_attach(rndsink_t *);
|
||||
void rndsink_detach(rndsink_t *);
|
||||
void rnd_getmore(size_t);
|
||||
|
||||
void rnd_seed(void *, size_t);
|
||||
|
||||
static inline void
|
||||
rnd_add_uint32(krndsource_t *kr, uint32_t val)
|
||||
{
|
||||
if (RND_ENABLED(kr)) {
|
||||
if (__predict_true(kr) && RND_ENABLED(kr)) {
|
||||
_rnd_add_uint32(kr, val);
|
||||
} else {
|
||||
rnd_add_data(NULL, &val, sizeof(val), 0);
|
||||
}
|
||||
}
|
||||
|
||||
extern int rnd_empty;
|
||||
extern int rnd_full;
|
||||
extern int rnd_filled;
|
||||
extern int rnd_initial_entropy;
|
||||
|
||||
53
sys/sys/rndsink.h
Normal file
53
sys/sys/rndsink.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/* $NetBSD: rndsink.h,v 1.1 2013/06/23 02:35:24 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2013 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to The NetBSD Foundation
|
||||
* by Taylor R. Campbell.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef _SYS_RNDSINK_H
|
||||
#define _SYS_RNDSINK_H
|
||||
|
||||
#ifndef _KERNEL /* XXX */
|
||||
#error <sys/rndsink.h> is meant for kernel consumers only.
|
||||
#endif
|
||||
|
||||
#define RNDSINK_MAX_BYTES 32
|
||||
|
||||
struct rndsink;
|
||||
|
||||
typedef void rndsink_callback_t(void *, const void *, size_t);
|
||||
|
||||
void rndsinks_init(void);
|
||||
void rndsinks_distribute(void);
|
||||
struct rndsink *
|
||||
rndsink_create(size_t, rndsink_callback_t *, void *);
|
||||
void rndsink_destroy(struct rndsink *);
|
||||
bool rndsink_request(struct rndsink *, void *, size_t);
|
||||
void rndsink_schedule(struct rndsink *);
|
||||
|
||||
#endif /* _SYS_RNDSINK_H */
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sdt.h,v 1.2 2011/12/08 22:27:36 dholland Exp $ */
|
||||
/* $NetBSD: sdt.h,v 1.4 2013/10/07 07:11:40 dholland Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2010 The NetBSD Foundation, Inc.
|
||||
@@ -62,7 +62,7 @@ typedef struct {
|
||||
* This type definition must match that of dtrace_probe. It is defined this
|
||||
* way to avoid having to rely on CDDL code.
|
||||
*/
|
||||
typedef void (*sdt_probe_func_t)(u_int32_t, uintptr_t arg0, uintptr_t arg1,
|
||||
typedef void (*sdt_probe_func_t)(uint32_t, uintptr_t arg0, uintptr_t arg1,
|
||||
uintptr_t arg2, uintptr_t arg3, uintptr_t arg4);
|
||||
|
||||
/*
|
||||
@@ -78,7 +78,7 @@ extern sdt_probe_func_t sdt_probe_func;
|
||||
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/*
|
||||
* SDT_PROBE_DEFINE(prov, mod, func, name,
|
||||
* SDT_PROBE_DEFINE(prov, mod, func, name, sname,
|
||||
* arg0, argx0, arg1, argx1,
|
||||
* arg2, argx2, arg3, argx3, arg4, argx4)
|
||||
*
|
||||
@@ -86,6 +86,7 @@ extern sdt_probe_func_t sdt_probe_func;
|
||||
* mod - module name
|
||||
* func - function name
|
||||
* name - probe name
|
||||
* sname - probe name as exposed to userland
|
||||
* arg0 - arg4, argument types as strings, or NULL.
|
||||
* argx0 - argx4, translation types for arg0 - arg4
|
||||
*
|
||||
@@ -97,11 +98,11 @@ extern sdt_probe_func_t sdt_probe_func;
|
||||
* This is used in the target module to define probes to be used.
|
||||
* The translation type should be set to NULL if not used.
|
||||
*/
|
||||
#define SDT_PROBE_DEFINE(prov, mod, func, name, \
|
||||
#define SDT_PROBE_DEFINE(prov, mod, func, name, sname, \
|
||||
arg0, argx0, arg1, argx1, arg2, argx2, \
|
||||
arg3, argx3, arg4, argx4) \
|
||||
sdt_probe_t SDT_NAME(prov, mod, func, name) = { \
|
||||
0, 0, 0, #prov, #mod, #func, #name, \
|
||||
0, 0, 0, #prov, #mod, #func, #sname, \
|
||||
{ arg0, arg1, arg2, arg3, arg4 }, \
|
||||
{ NULL, NULL, NULL, NULL, NULL } \
|
||||
}
|
||||
@@ -118,7 +119,7 @@ extern sdt_probe_func_t sdt_probe_func;
|
||||
(uintptr_t)(arg3), (uintptr_t)(arg4)); \
|
||||
}
|
||||
#else
|
||||
#define SDT_PROBE_DEFINE(prov, mod, func, name, \
|
||||
#define SDT_PROBE_DEFINE(prov, mod, func, name, sname, \
|
||||
arg0, argx0, arg1, argx1, arg2, argx2, \
|
||||
arg3, argx3, arg4, argx4)
|
||||
#define SDT_PROBE_DECLARE(prov, mod, func, name)
|
||||
|
||||
@@ -64,11 +64,11 @@ int pollsock(struct socket *, const struct timespec *, int);
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
int pselect(int, fd_set * __restrict, fd_set * __restrict,
|
||||
fd_set * __restrict, const struct timespec * __restrict,
|
||||
const sigset_t * __restrict) __RENAME(__pselect50);
|
||||
#endif /* !__minix */
|
||||
#endif /* !defined(__minix) */
|
||||
int select(int, fd_set * __restrict, fd_set * __restrict,
|
||||
fd_set * __restrict, struct timeval * __restrict) __RENAME(__select50);
|
||||
#endif /* __LIBC12_SOURCE__ */
|
||||
|
||||
@@ -206,11 +206,11 @@ extern struct semid_ds *sema; /* semaphore id pool */
|
||||
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* ipcs ctl cmds */
|
||||
# define SEM_STAT 18
|
||||
# define SEM_INFO 19
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
@@ -199,13 +199,11 @@ __END_DECLS
|
||||
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* ipcs ctl commands */
|
||||
#define SHM_STAT 13
|
||||
#define SHM_INFO 14
|
||||
#endif
|
||||
|
||||
#ifdef __minix
|
||||
struct shm_info
|
||||
{
|
||||
int used_ids;
|
||||
@@ -223,6 +221,6 @@ struct shm_info
|
||||
#define SHM_DEST 01000 /* segment will be destroyed on last detach */
|
||||
#define SHM_LOCKED 02000 /* segment will not be swapped */
|
||||
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_SHM_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: siginfo.h,v 1.22 2011/04/10 14:37:20 christos Exp $ */
|
||||
/* $NetBSD: siginfo.h,v 1.25 2013/11/22 21:04:11 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
@@ -33,6 +33,7 @@
|
||||
#define _SYS_SIGINFO_H_
|
||||
|
||||
#include <machine/signal.h>
|
||||
#include <sys/featuretest.h>
|
||||
#ifdef _KERNEL
|
||||
#include <sys/queue.h>
|
||||
#endif
|
||||
@@ -68,6 +69,8 @@ struct _ksiginfo {
|
||||
struct {
|
||||
void *_addr;
|
||||
int _trap;
|
||||
int _trap2;
|
||||
int _trap3;
|
||||
} _fault;
|
||||
|
||||
struct {
|
||||
@@ -80,7 +83,7 @@ struct _ksiginfo {
|
||||
#ifdef _KERNEL
|
||||
typedef struct ksiginfo {
|
||||
u_long ksi_flags; /* 4 or 8 bytes (LP64) */
|
||||
CIRCLEQ_ENTRY(ksiginfo) ksi_list;
|
||||
TAILQ_ENTRY(ksiginfo) ksi_list;
|
||||
struct _ksiginfo ksi_info;
|
||||
lwpid_t ksi_lid; /* 0, or directed to LWP */
|
||||
} ksiginfo_t;
|
||||
@@ -146,6 +149,8 @@ typedef union siginfo {
|
||||
|
||||
#define si_addr _info._reason._fault._addr
|
||||
#define si_trap _info._reason._fault._trap
|
||||
#define si_trap2 _info._reason._fault._trap2
|
||||
#define si_trap3 _info._reason._fault._trap3
|
||||
|
||||
#define si_band _info._reason._poll._band
|
||||
#define si_fd _info._reason._poll._fd
|
||||
@@ -165,6 +170,8 @@ typedef union siginfo {
|
||||
|
||||
#define ksi_addr ksi_info._reason._fault._addr
|
||||
#define ksi_trap ksi_info._reason._fault._trap
|
||||
#define ksi_trap2 ksi_info._reason._fault._trap2
|
||||
#define ksi_trap3 ksi_info._reason._fault._trap3
|
||||
|
||||
#define ksi_band ksi_info._reason._poll._band
|
||||
#define ksi_fd ksi_info._reason._poll._fd
|
||||
|
||||
@@ -83,12 +83,12 @@
|
||||
#define SIGUSR2 31 /* user defined signal 2 */
|
||||
#define SIGPWR 32 /* power fail/restart (not reset when caught) */
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
#ifdef _KERNEL
|
||||
#define SIGRTMIN 33 /* Kernel only; not exposed to userland yet */
|
||||
#define SIGRTMAX 63 /* Kernel only; not exposed to userland yet */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#ifndef _KERNEL
|
||||
#include <sys/cdefs.h>
|
||||
@@ -102,7 +102,7 @@
|
||||
#if defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE) || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
|
||||
#if defined(_KERNEL)
|
||||
#ifdef _KERNEL
|
||||
#define sigaddset(s, n) __sigaddset(s, n)
|
||||
#define sigdelset(s, n) __sigdelset(s, n)
|
||||
#define sigismember(s, n) __sigismember(s, n)
|
||||
@@ -157,9 +157,9 @@ struct sigaction {
|
||||
#define SA_NOCLDWAIT 0x0020 /* do not generate zombies on unwaited child */
|
||||
#if (_POSIX_C_SOURCE - 0) >= 199309L || (_XOPEN_SOURCE - 0) >= 500 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
#define SA_SIGINFO 0x0040 /* take sa_sigaction handler */
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
#endif /* (_POSIX_C_SOURCE - 0) >= 199309L || ... */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define SA_NOKERNINFO 0x0080 /* siginfo does not print kernel info on tty */
|
||||
@@ -175,9 +175,9 @@ struct sigaction {
|
||||
#define SIG_UNBLOCK 2 /* unblock specified signal set */
|
||||
#define SIG_SETMASK 3 /* set specified signal set */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define SIG_INQUIRE 10 /* for internal use only */
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
typedef void (*sig_t)(int); /* type of signal function */
|
||||
@@ -285,6 +285,6 @@ __END_DECLS
|
||||
|| (sig == SIGKILL || sig == SIGPIPE))
|
||||
#define SIGS_IS_STACKTRACE(sig) (SIGS_IS_LETHAL(sig) && sig != SIGABRT)
|
||||
|
||||
#endif /* __minix && _NETBSD_SOURCE */
|
||||
#endif /* defined(__minix) && defined(_NETBSD_SOURCE) */
|
||||
|
||||
#endif /* !_SYS_SIGNAL_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: signalvar.h,v 1.83 2012/02/19 21:07:00 rmind Exp $ */
|
||||
/* $NetBSD: signalvar.h,v 1.84 2013/11/22 21:04:11 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@@ -46,7 +46,7 @@
|
||||
/*
|
||||
* Queue of signals.
|
||||
*/
|
||||
typedef CIRCLEQ_HEAD(ksiginfoq, ksiginfo) ksiginfoq_t;
|
||||
typedef TAILQ_HEAD(ksiginfoq, ksiginfo) ksiginfoq_t;
|
||||
|
||||
/*
|
||||
* Process signal actions, possibly shared between processes.
|
||||
@@ -82,10 +82,10 @@ struct sigctx {
|
||||
sigset_t ps_sigcatch; /* Signals being caught by user. */
|
||||
};
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
/* additional signal action values, used only temporarily/internally */
|
||||
#define SIG_CATCH (void (*)(int))2
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
/*
|
||||
* get signal action for process and signal; currently only for current process
|
||||
@@ -224,13 +224,13 @@ firstsig(const sigset_t *ss)
|
||||
static inline void
|
||||
ksiginfo_queue_init(ksiginfoq_t *kq)
|
||||
{
|
||||
CIRCLEQ_INIT(kq);
|
||||
TAILQ_INIT(kq);
|
||||
}
|
||||
|
||||
static inline void
|
||||
ksiginfo_queue_drain(ksiginfoq_t *kq)
|
||||
{
|
||||
if (!CIRCLEQ_EMPTY(kq))
|
||||
if (!TAILQ_EMPTY(kq))
|
||||
ksiginfo_queue_drain0(kq);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: socket.h,v 1.107 2012/06/22 18:26:35 christos Exp $ */
|
||||
/* $NetBSD: socket.h,v 1.108 2013/01/31 14:30:47 joerg Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
@@ -131,10 +131,10 @@ typedef _BSD_SSIZE_T_ ssize_t;
|
||||
#define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */
|
||||
#define SO_TIMESTAMP 0x2000 /* timestamp received dgram traffic */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define SO_PASSCRED 0x100000
|
||||
#define SO_PEERCRED 0x200000
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
|
||||
/*
|
||||
@@ -607,6 +607,7 @@ const struct sockaddr *sockaddr_any_by_family(int);
|
||||
const void *sockaddr_anyaddr(const struct sockaddr *, socklen_t *);
|
||||
int sockaddr_cmp(const struct sockaddr *, const struct sockaddr *);
|
||||
struct sockaddr *sockaddr_dup(const struct sockaddr *, int);
|
||||
void sockaddr_format(const struct sockaddr *, char *, size_t);
|
||||
void sockaddr_free(struct sockaddr *);
|
||||
__END_DECLS
|
||||
#endif /* _KERNEL */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: socketvar.h,v 1.129 2012/02/01 02:27:23 matt Exp $ */
|
||||
/* $NetBSD: socketvar.h,v 1.131 2013/08/29 17:49:21 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
|
||||
@@ -204,7 +204,6 @@ do { \
|
||||
#define SS_ISDISCONNECTED 0x800 /* socket disconnected from peer */
|
||||
|
||||
#define SS_ASYNC 0x100 /* async i/o notify */
|
||||
#define SS_ISCONFIRMING 0x200 /* deciding to accept connection req */
|
||||
#define SS_MORETOCOME 0x400 /*
|
||||
* hint from sosend to lower layer;
|
||||
* more data coming
|
||||
@@ -272,6 +271,8 @@ void sbcheck(struct sockbuf *);
|
||||
void sbcompress(struct sockbuf *, struct mbuf *, struct mbuf *);
|
||||
struct mbuf *
|
||||
sbcreatecontrol(void *, int, int, int);
|
||||
struct mbuf *
|
||||
sbcreatecontrol1(void **, int, int, int, int);
|
||||
void sbdrop(struct sockbuf *, int);
|
||||
void sbdroprecord(struct sockbuf *);
|
||||
void sbflush(struct sockbuf *);
|
||||
@@ -305,7 +306,7 @@ void soisdisconnected(struct socket *);
|
||||
void soisdisconnecting(struct socket *);
|
||||
int solisten(struct socket *, int, struct lwp *);
|
||||
struct socket *
|
||||
sonewconn(struct socket *, int);
|
||||
sonewconn(struct socket *, bool);
|
||||
void soqinsque(struct socket *, struct socket *, int);
|
||||
int soqremque(struct socket *, int);
|
||||
int soreceive(struct socket *, struct mbuf **, struct uio *,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sockio.h,v 1.30 2010/11/15 22:42:36 pooka Exp $ */
|
||||
/* $NetBSD: sockio.h,v 1.32 2013/10/05 23:16:54 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1993, 1994
|
||||
@@ -132,6 +132,12 @@
|
||||
#define SIOCGLINKSTR _IOWR('i', 135, struct ifdrv)
|
||||
#define SIOCSLINKSTR _IOW('i', 136, struct ifdrv)
|
||||
|
||||
/* 137 is SIOCGATHSTATS in athioctl.h */
|
||||
/* 138 is SIOCGATHDIAG in athioctl.h */
|
||||
|
||||
#define SIOCGETHERCAP _IOWR('i', 139, struct eccapreq) /* get ethercap */
|
||||
#define SIOCGIFINDEX _IOWR('i', 140, struct ifreq) /* get ifnet index */
|
||||
|
||||
#define SIOCSETPFSYNC _IOW('i', 247, struct ifreq)
|
||||
#define SIOCGETPFSYNC _IOWR('i', 248, struct ifreq)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: spawn.h,v 1.3 2012/04/30 21:19:58 rmind Exp $ */
|
||||
/* $NetBSD: spawn.h,v 1.4 2013/04/27 21:35:25 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 Ed Schouten <ed@FreeBSD.org>
|
||||
@@ -32,6 +32,7 @@
|
||||
#define _SYS_SPAWN_H_
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/featuretest.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/sigtypes.h>
|
||||
#include <sys/signal.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stat.h,v 1.63 2011/09/04 10:02:33 christos Exp $ */
|
||||
/* $NetBSD: stat.h,v 1.68 2013/10/17 18:01:11 njoly Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@@ -42,7 +42,17 @@
|
||||
#include <sys/featuretest.h>
|
||||
#include <sys/types.h> /* XXX */
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
/*
|
||||
* POSIX:2008 / XPG7 requires struct timespec to be declared in
|
||||
* this header, but does not provide the usual exemption
|
||||
* "inclusion of this header may make visible symbols defined in <time.h>".
|
||||
*
|
||||
* This is a Standard omission, acknowledged by the committee and
|
||||
* scheduled to be corrected in Technical Corrigendum 2, according to
|
||||
* http://austingroupbugs.net/view.php?id=531
|
||||
*/
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
@@ -54,11 +64,12 @@ struct stat {
|
||||
uid_t st_uid; /* user ID of the file's owner */
|
||||
gid_t st_gid; /* group ID of the file's group */
|
||||
dev_t st_rdev; /* device type */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
struct timespec st_atimespec;/* time of last access */
|
||||
struct timespec st_mtimespec;/* time of last data modification */
|
||||
struct timespec st_ctimespec;/* time of last file status change */
|
||||
struct timespec st_birthtimespec; /* time of creation */
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
struct timespec st_atim; /* time of last access */
|
||||
struct timespec st_mtim; /* time of last data modification */
|
||||
struct timespec st_ctim; /* time of last file status change */
|
||||
struct timespec st_birthtim; /* time of creation */
|
||||
#else
|
||||
time_t st_atime; /* time of last access */
|
||||
long st_atimensec; /* nsec of last access */
|
||||
@@ -77,14 +88,23 @@ struct stat {
|
||||
uint32_t st_spare[2];
|
||||
};
|
||||
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
/* Standard-mandated compatibility */
|
||||
#define st_atime st_atim.tv_sec
|
||||
#define st_mtime st_mtim.tv_sec
|
||||
#define st_ctime st_ctim.tv_sec
|
||||
#define st_birthtime st_birthtim.tv_sec
|
||||
#endif
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define st_atime st_atimespec.tv_sec
|
||||
#define st_atimensec st_atimespec.tv_nsec
|
||||
#define st_mtime st_mtimespec.tv_sec
|
||||
#define st_mtimensec st_mtimespec.tv_nsec
|
||||
#define st_ctime st_ctimespec.tv_sec
|
||||
#define st_ctimensec st_ctimespec.tv_nsec
|
||||
#define st_birthtime st_birthtimespec.tv_sec
|
||||
#define st_atimespec st_atim
|
||||
#define st_atimensec st_atim.tv_nsec
|
||||
#define st_mtimespec st_mtim
|
||||
#define st_mtimensec st_mtim.tv_nsec
|
||||
#define st_ctimespec st_ctim
|
||||
#define st_ctimensec st_ctim.tv_nsec
|
||||
#define st_birthtimespec st_birthtim
|
||||
#define st_birthtimensec st_birthtimespec.tv_nsec
|
||||
#endif
|
||||
|
||||
@@ -207,11 +227,14 @@ struct stat {
|
||||
#endif /* _KERNEL */
|
||||
#endif /* _NETBSD_SOURCE */
|
||||
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
/*
|
||||
* Special values for utimensat and futimens
|
||||
*/
|
||||
#define UTIME_NOW ((1 << 30) - 1)
|
||||
#define UTIME_OMIT ((1 << 30) - 2)
|
||||
#endif
|
||||
|
||||
#if !defined(_KERNEL) && !defined(_STANDALONE)
|
||||
#include <sys/cdefs.h>
|
||||
@@ -225,10 +248,15 @@ int stat(const char *, struct stat *) __RENAME(__stat50);
|
||||
int fstat(int, struct stat *) __RENAME(__fstat50);
|
||||
#endif
|
||||
mode_t umask(mode_t);
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200112L || defined(_XOPEN_SOURCE) || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
int lstat(const char *, struct stat *) __RENAME(__lstat50);
|
||||
#endif
|
||||
#endif /* _POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE || _NETBSD_SOURCE */
|
||||
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
int fchmod(int, mode_t);
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
int lstat(const char *, struct stat *) __RENAME(__lstat50);
|
||||
int mknod(const char *, mode_t, dev_t) __RENAME(__mknod50);
|
||||
#endif
|
||||
#endif /* defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) */
|
||||
@@ -244,13 +272,26 @@ int lchmod(const char *, mode_t);
|
||||
/*
|
||||
* X/Open Extended API set 2 (a.k.a. C063)
|
||||
*/
|
||||
#if defined(_INCOMPLETE_XOPEN_C063) || defined(__minix)
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE) || defined(_INCOMPLETE_XOPEN_C063)
|
||||
int fchmodat(int, const char *, mode_t, int);
|
||||
int fstatat(int, const char *, struct stat *, int);
|
||||
int mkdirat(int, const char *, mode_t);
|
||||
int mkfifoat(int, const char *, mode_t);
|
||||
int mknodat(int, const char *, mode_t, dev_t);
|
||||
int utimensat(int, const char *, const struct timespec *, int);
|
||||
#endif
|
||||
|
||||
#ifdef _NETBSD_SOURCE
|
||||
int utimens(const char *, const struct timespec *);
|
||||
int lutimens(const char *, const struct timespec *);
|
||||
#endif
|
||||
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200809L || (_XOPEN_SOURCE - 0) >= 700 || \
|
||||
defined(_NETBSD_SOURCE)
|
||||
int futimens(int, const struct timespec *);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
__END_DECLS
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: statvfs.h,v 1.17 2011/11/18 21:17:45 christos Exp $ */
|
||||
/* $NetBSD: statvfs.h,v 1.18 2013/04/05 17:34:27 christos Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2004 The NetBSD Foundation, Inc.
|
||||
@@ -69,8 +69,8 @@ struct statvfs {
|
||||
unsigned long f_frsize; /* fundamental file system block size */
|
||||
unsigned long f_iosize; /* optimal file system block size */
|
||||
|
||||
/* The following are in units of f_frsize */
|
||||
fsblkcnt_t f_blocks; /* number of blocks in file system, */
|
||||
/* (in units of f_frsize) */
|
||||
fsblkcnt_t f_bfree; /* free blocks avail in file system */
|
||||
fsblkcnt_t f_bavail; /* free blocks avail to non-root */
|
||||
fsblkcnt_t f_bresvd; /* blocks reserved for root */
|
||||
@@ -138,9 +138,9 @@ struct statvfs {
|
||||
#define ST_WAIT MNT_WAIT
|
||||
#define ST_NOWAIT MNT_NOWAIT
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define ST_NOTRUNC __MNT_UNUSED1
|
||||
#endif /* !__minix*/
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#if defined(_KERNEL) || defined(_STANDALONE)
|
||||
struct mount;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: stdint.h,v 1.6 2008/04/28 20:24:11 martin Exp $ */
|
||||
/* $NetBSD: stdint.h,v 1.7 2013/04/22 21:26:48 joerg Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2004 The NetBSD Foundation, Inc.
|
||||
@@ -87,11 +87,13 @@ typedef __uintptr_t uintptr_t;
|
||||
|
||||
#include <machine/int_mwgwtypes.h>
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
|
||||
#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) || \
|
||||
(__cplusplus >= 201103L)
|
||||
#include <machine/int_limits.h>
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
|
||||
#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) || \
|
||||
(__cplusplus >= 201103L)
|
||||
#include <machine/int_const.h>
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* $NetBSD: syscall.h,v 1.257 2012/10/02 01:46:20 christos Exp $ */
|
||||
/* $NetBSD: syscall.h,v 1.262 2013/10/17 18:04:40 njoly Exp $ */
|
||||
|
||||
/*
|
||||
* System call numbers.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
|
||||
* created from NetBSD: syscalls.master,v 1.264 2013/10/17 18:01:11 njoly Exp
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSCALL_H_
|
||||
@@ -1215,8 +1215,8 @@
|
||||
/* syscall: "__mq_timedreceive50" ret: "ssize_t" args: "mqd_t" "char *" "size_t" "unsigned *" "const struct timespec *" */
|
||||
#define SYS___mq_timedreceive50 433
|
||||
|
||||
/* syscall: "___lwp_park50" ret: "int" args: "const struct timespec *" "lwpid_t" "const void *" "const void *" */
|
||||
#define SYS____lwp_park50 434
|
||||
/* syscall: "compat_60__lwp_park" ret: "int" args: "const struct timespec *" "lwpid_t" "const void *" "const void *" */
|
||||
#define SYS_compat_60__lwp_park 434
|
||||
|
||||
/* syscall: "__kevent50" ret: "int" args: "int" "const struct kevent *" "size_t" "struct kevent *" "size_t" "const struct timespec *" */
|
||||
#define SYS___kevent50 435
|
||||
@@ -1307,7 +1307,7 @@
|
||||
/* syscall: "mkfifoat" ret: "int" args: "int" "const char *" "mode_t" */
|
||||
#define SYS_mkfifoat 459
|
||||
|
||||
/* syscall: "mknodat" ret: "int" args: "int" "const char *" "mode_t" "uint32_t" */
|
||||
/* syscall: "mknodat" ret: "int" args: "int" "const char *" "mode_t" "int" "dev_t" */
|
||||
#define SYS_mknodat 460
|
||||
|
||||
/* syscall: "mkdirat" ret: "int" args: "int" "const char *" "mode_t" */
|
||||
@@ -1361,6 +1361,9 @@
|
||||
/* syscall: "clock_nanosleep" ret: "int" args: "clockid_t" "int" "const struct timespec *" "struct timespec *" */
|
||||
#define SYS_clock_nanosleep 477
|
||||
|
||||
#define SYS_MAXSYSCALL 478
|
||||
/* syscall: "___lwp_park60" ret: "int" args: "clockid_t" "int" "const struct timespec *" "lwpid_t" "const void *" "const void *" */
|
||||
#define SYS____lwp_park60 478
|
||||
|
||||
#define SYS_MAXSYSCALL 479
|
||||
#define SYS_NSYSENT 512
|
||||
#endif /* _SYS_SYSCALL_H_ */
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/* $NetBSD: syscallargs.h,v 1.240 2012/10/02 01:46:20 christos Exp $ */
|
||||
/* $NetBSD: syscallargs.h,v 1.245 2013/10/17 18:04:40 njoly Exp $ */
|
||||
|
||||
/*
|
||||
* System call argument lists.
|
||||
*
|
||||
* DO NOT EDIT-- this file is automatically generated.
|
||||
* created from NetBSD: syscalls.master,v 1.261 2012/10/02 01:44:28 christos Exp
|
||||
* created from NetBSD: syscalls.master,v 1.264 2013/10/17 18:01:11 njoly Exp
|
||||
*/
|
||||
|
||||
#ifndef _SYS_SYSCALLARGS_H_
|
||||
@@ -2828,13 +2828,13 @@ check_syscall_args(sys___mq_timedreceive50)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys____lwp_park50_args {
|
||||
struct compat_60_sys__lwp_park_args {
|
||||
syscallarg(const struct timespec *) ts;
|
||||
syscallarg(lwpid_t) unpark;
|
||||
syscallarg(const void *) hint;
|
||||
syscallarg(const void *) unparkhint;
|
||||
};
|
||||
check_syscall_args(sys____lwp_park50)
|
||||
check_syscall_args(compat_60_sys__lwp_park)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
struct sys___kevent50_args {
|
||||
@@ -3044,7 +3044,8 @@ struct sys_mknodat_args {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(const char *) path;
|
||||
syscallarg(mode_t) mode;
|
||||
syscallarg(uint32_t) dev;
|
||||
syscallarg(int) PAD;
|
||||
syscallarg(dev_t) dev;
|
||||
};
|
||||
check_syscall_args(sys_mknodat)
|
||||
|
||||
@@ -3080,12 +3081,14 @@ struct sys_fchownat_args {
|
||||
};
|
||||
check_syscall_args(sys_fchownat)
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys_fexecve_args {
|
||||
syscallarg(int) fd;
|
||||
syscallarg(char *const *) argp;
|
||||
syscallarg(char *const *) envp;
|
||||
};
|
||||
check_syscall_args(sys_fexecve)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
struct sys_fstatat_args {
|
||||
syscallarg(int) fd;
|
||||
@@ -3157,7 +3160,6 @@ struct sys_posix_spawn_args {
|
||||
check_syscall_args(sys_posix_spawn)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys_recvmmsg_args {
|
||||
syscallarg(int) s;
|
||||
syscallarg(struct mmsghdr *) mmsg;
|
||||
@@ -3166,9 +3168,7 @@ struct sys_recvmmsg_args {
|
||||
syscallarg(struct timespec *) timeout;
|
||||
};
|
||||
check_syscall_args(sys_recvmmsg)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys_sendmmsg_args {
|
||||
syscallarg(int) s;
|
||||
syscallarg(struct mmsghdr *) mmsg;
|
||||
@@ -3176,7 +3176,6 @@ struct sys_sendmmsg_args {
|
||||
syscallarg(unsigned int) flags;
|
||||
};
|
||||
check_syscall_args(sys_sendmmsg)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys_clock_nanosleep_args {
|
||||
@@ -3188,6 +3187,18 @@ struct sys_clock_nanosleep_args {
|
||||
check_syscall_args(sys_clock_nanosleep)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
#ifndef RUMP_CLIENT
|
||||
struct sys____lwp_park60_args {
|
||||
syscallarg(clockid_t) clock_id;
|
||||
syscallarg(int) flags;
|
||||
syscallarg(const struct timespec *) ts;
|
||||
syscallarg(lwpid_t) unpark;
|
||||
syscallarg(const void *) hint;
|
||||
syscallarg(const void *) unparkhint;
|
||||
};
|
||||
check_syscall_args(sys____lwp_park60)
|
||||
#endif /* !RUMP_CLIENT */
|
||||
|
||||
/*
|
||||
* System call prototypes.
|
||||
*/
|
||||
@@ -3985,7 +3996,7 @@ int sys___mq_timedsend50(struct lwp *, const struct sys___mq_timedsend50_args *,
|
||||
|
||||
int sys___mq_timedreceive50(struct lwp *, const struct sys___mq_timedreceive50_args *, register_t *);
|
||||
|
||||
int sys____lwp_park50(struct lwp *, const struct sys____lwp_park50_args *, register_t *);
|
||||
int compat_60_sys__lwp_park(struct lwp *, const struct compat_60_sys__lwp_park_args *, register_t *);
|
||||
|
||||
int sys___kevent50(struct lwp *, const struct sys___kevent50_args *, register_t *);
|
||||
|
||||
@@ -4083,5 +4094,7 @@ int sys_sendmmsg(struct lwp *, const struct sys_sendmmsg_args *, register_t *);
|
||||
|
||||
int sys_clock_nanosleep(struct lwp *, const struct sys_clock_nanosleep_args *, register_t *);
|
||||
|
||||
int sys____lwp_park60(struct lwp *, const struct sys____lwp_park60_args *, register_t *);
|
||||
|
||||
#endif /* !RUMP_CLIENT */
|
||||
#endif /* _SYS_SYSCALLARGS_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: syscallvar.h,v 1.5 2009/06/02 23:21:38 pooka Exp $ */
|
||||
/* $NetBSD: syscallvar.h,v 1.8 2013/06/29 16:50:51 rmind Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@@ -64,6 +64,33 @@ sy_call(const struct sysent *sy, struct lwp *l, const void *uap,
|
||||
return error;
|
||||
}
|
||||
|
||||
static inline int
|
||||
sy_invoke(const struct sysent *sy, struct lwp *l, const void *uap,
|
||||
register_t *rval, int code)
|
||||
{
|
||||
const bool do_trace = l->l_proc->p_trace_enabled &&
|
||||
(sy->sy_flags & SYCALL_INDIRECT) == 0;
|
||||
int error;
|
||||
|
||||
if (__predict_true(!do_trace) || (error = trace_enter(code, uap,
|
||||
sy->sy_narg)) == 0) {
|
||||
rval[0] = 0;
|
||||
#if !defined(__mips__)
|
||||
/*
|
||||
* Due to the mips userland code for SYS_break needing v1 to be
|
||||
* preserved, we can't clear this on mips.
|
||||
*/
|
||||
rval[1] = 0;
|
||||
#endif
|
||||
error = sy_call(sy, l, uap, rval);
|
||||
}
|
||||
|
||||
if (__predict_false(do_trace)) {
|
||||
trace_exit(code, rval, error);
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
||||
/* inclusion in the kernel currently depends on SYSCALL_DEBUG */
|
||||
extern const char * const syscallnames[];
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sysctl.h,v 1.203 2012/10/14 20:56:55 christos Exp $ */
|
||||
/* $NetBSD: sysctl.h,v 1.209 2013/09/20 12:20:01 wiz Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -37,16 +37,20 @@
|
||||
#ifndef _SYS_SYSCTL_H_
|
||||
#define _SYS_SYSCTL_H_
|
||||
|
||||
#include <sys/param.h> /* precautionary upon removal from ucred.h */
|
||||
#include <sys/proc.h> /* Needed for things like P_ZOMBIE() and LW_SINTR */
|
||||
#include <uvm/uvm_param.h>
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
/*
|
||||
* These are for the eproc structure defined below.
|
||||
*/
|
||||
#include <sys/param.h> /* precautionary upon removal from ucred.h */
|
||||
#include <sys/time.h>
|
||||
#include <sys/ucred.h>
|
||||
#include <sys/ucontext.h>
|
||||
#include <sys/proc.h>
|
||||
#include <sys/mallocvar.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
#endif
|
||||
|
||||
|
||||
/* For offsetof() */
|
||||
@@ -57,7 +61,7 @@
|
||||
#include <stdbool.h>
|
||||
#endif
|
||||
|
||||
#ifdef _KERNEL
|
||||
#ifdef SYSCTL_PRIVATE
|
||||
#include <sys/cprng.h>
|
||||
#endif
|
||||
|
||||
@@ -70,6 +74,8 @@
|
||||
* respective subsystem header files.
|
||||
*/
|
||||
|
||||
struct sysctlnode;
|
||||
|
||||
#define CTL_MAXNAME 12 /* largest number of components supported */
|
||||
#define SYSCTL_NAMELEN 32 /* longest name allowed for a node */
|
||||
|
||||
@@ -153,13 +159,13 @@ struct ctlname {
|
||||
/*
|
||||
* Meta-identifiers
|
||||
*/
|
||||
#define CTL_EOL -1 /* end of createv/destroyv list */
|
||||
#define CTL_QUERY -2 /* enumerates children of a node */
|
||||
#define CTL_CREATE -3 /* node create request */
|
||||
#define CTL_CREATESYM -4 /* node create request with symbol */
|
||||
#define CTL_DESTROY -5 /* node destroy request */
|
||||
#define CTL_MMAP -6 /* mmap request */
|
||||
#define CTL_DESCRIBE -7 /* get node descriptions */
|
||||
#define CTL_EOL (-1) /* end of createv/destroyv list */
|
||||
#define CTL_QUERY (-2) /* enumerates children of a node */
|
||||
#define CTL_CREATE (-3) /* node create request */
|
||||
#define CTL_CREATESYM (-4) /* node create request with symbol */
|
||||
#define CTL_DESTROY (-5) /* node destroy request */
|
||||
#define CTL_MMAP (-6) /* mmap request */
|
||||
#define CTL_DESCRIBE (-7) /* get node descriptions */
|
||||
|
||||
/*
|
||||
* Top-level identifiers
|
||||
@@ -221,7 +227,7 @@ struct ctlname {
|
||||
#define KERN_ROOT_DEVICE 30 /* string: root device */
|
||||
#define KERN_MSGBUFSIZE 31 /* int: max # of chars in msg buffer */
|
||||
#define KERN_FSYNC 32 /* int: file synchronization support */
|
||||
#define KERN_OLDSYSVMSG 33 /* old: SysV message queue suppoprt */
|
||||
#define KERN_OLDSYSVMSG 33 /* old: SysV message queue support */
|
||||
#define KERN_OLDSYSVSEM 34 /* old: SysV semaphore support */
|
||||
#define KERN_OLDSYSVSHM 35 /* old: SysV shared memory support */
|
||||
#define KERN_OLDSHORTCORENAME 36 /* old, unimplemented */
|
||||
@@ -234,7 +240,7 @@ struct ctlname {
|
||||
#define KERN_MEMORY_PROTECTION 43 /* int: POSIX memory protections */
|
||||
#define KERN_LOGIN_NAME_MAX 44 /* int: max length login name + NUL */
|
||||
#define KERN_DEFCORENAME 45 /* old: sort core name format */
|
||||
#define KERN_LOGSIGEXIT 46 /* int: log signalled processes */
|
||||
#define KERN_LOGSIGEXIT 46 /* int: log signaled processes */
|
||||
#define KERN_PROC2 47 /* struct: process entries */
|
||||
#define KERN_PROC_ARGS 48 /* struct: process argv/env */
|
||||
#define KERN_FSCALE 49 /* int: fixpt FSCALE */
|
||||
@@ -411,6 +417,8 @@ struct ki_ucred {
|
||||
gid_t cr_groups[NGROUPS]; /* groups */
|
||||
};
|
||||
|
||||
#if defined(_KERNEL) || defined(_KMEMUSER)
|
||||
|
||||
/*
|
||||
* KERN_PROC subtype ops return arrays of augmented proc structures:
|
||||
*/
|
||||
@@ -434,14 +442,13 @@ struct kinfo_proc {
|
||||
short e_xrssize; /* text rss */
|
||||
short e_xccount; /* text references */
|
||||
short e_xswrss;
|
||||
long e_flag;
|
||||
#define EPROC_CTTY 0x01 /* controlling tty vnode active */
|
||||
#define EPROC_SLEADER 0x02 /* session leader */
|
||||
long e_flag; /* see p_eflag below */
|
||||
char e_login[MAXLOGNAME]; /* setlogin() name */
|
||||
pid_t e_sid; /* session id */
|
||||
long e_spare[3];
|
||||
} kp_eproc;
|
||||
};
|
||||
#endif /* defined(_KERNEL) || defined(_KMEMUSER) */
|
||||
|
||||
/*
|
||||
* Convert pointer to 64 bit unsigned integer for struct
|
||||
@@ -486,6 +493,8 @@ struct kinfo_proc2 {
|
||||
uint64_t p_ru; /* PTR: Exit information. XXX */
|
||||
|
||||
int32_t p_eflag; /* LONG: extra kinfo_proc2 flags */
|
||||
#define EPROC_CTTY 0x01 /* controlling tty vnode active */
|
||||
#define EPROC_SLEADER 0x02 /* session leader */
|
||||
int32_t p_exitsig; /* INT: signal to sent to parent on exit */
|
||||
int32_t p_flag; /* INT: P_* flags. */
|
||||
|
||||
@@ -590,7 +599,7 @@ struct kinfo_proc2 {
|
||||
};
|
||||
|
||||
/*
|
||||
* Compat flags for kinfo_proc, kinfo_proc2. Not guarenteed to be stable.
|
||||
* Compat flags for kinfo_proc, kinfo_proc2. Not guaranteed to be stable.
|
||||
* Some of them used to be shared with LWP flags.
|
||||
* XXXAD Trim to the minimum necessary...
|
||||
*/
|
||||
@@ -676,7 +685,7 @@ struct kinfo_lwp {
|
||||
* KERN_SYSVIPC subtypes
|
||||
*/
|
||||
#define KERN_SYSVIPC_INFO 1 /* struct: number of valid kern ids */
|
||||
#define KERN_SYSVIPC_MSG 2 /* int: SysV message queue suppoprt */
|
||||
#define KERN_SYSVIPC_MSG 2 /* int: SysV message queue support */
|
||||
#define KERN_SYSVIPC_SEM 3 /* int: SysV semaphore support */
|
||||
#define KERN_SYSVIPC_SHM 4 /* int: SysV shared memory support */
|
||||
#define KERN_SYSVIPC_SHMMAX 5 /* int: max shared memory segment size (bytes) */
|
||||
@@ -691,7 +700,7 @@ struct kinfo_lwp {
|
||||
/* KERN_SYSVIPC_OMSG_INFO 1 */
|
||||
/* KERN_SYSVIPC_OSEM_INFO 2 */
|
||||
/* KERN_SYSVIPC_OSHM_INFO 3 */
|
||||
#define KERN_SYSVIPC_MSG_INFO 4 /* msginfo and msqid_ds */
|
||||
#define KERN_SYSVIPC_MSG_INFO 4 /* msginfo and msgid_ds */
|
||||
#define KERN_SYSVIPC_SEM_INFO 5 /* seminfo and semid_ds */
|
||||
#define KERN_SYSVIPC_SHM_INFO 6 /* shminfo and shmid_ds */
|
||||
|
||||
@@ -800,7 +809,7 @@ struct kinfo_file {
|
||||
* kern.evcnt returns an array of these structures, which are designed both to
|
||||
* be immune to 32/64 bit emulation issues. Note that the struct here differs
|
||||
* from the real struct evcnt but contains the same information in order to
|
||||
* accomodate sysctl.
|
||||
* accommodate sysctl.
|
||||
*/
|
||||
struct evcnt_sysctl {
|
||||
uint64_t ev_count; /* current count */
|
||||
@@ -1049,7 +1058,7 @@ struct sysctllog;
|
||||
* variable. The loader prevents multiple use by issuing errors
|
||||
* if a variable is initialized in more than one place. They are
|
||||
* aggregated into an array in debug_sysctl(), so that it can
|
||||
* conveniently locate them when querried. If more debugging
|
||||
* conveniently locate them when queried. If more debugging
|
||||
* variables are added, they must also be declared here and also
|
||||
* entered into the array.
|
||||
*
|
||||
@@ -1242,7 +1251,9 @@ MALLOC_DECLARE(M_SYSCTLDATA);
|
||||
|
||||
extern const u_int sysctl_lwpflagmap[];
|
||||
|
||||
#ifdef SYSCTL_PRIVATE
|
||||
extern cprng_strong_t *sysctl_prng;
|
||||
#endif
|
||||
|
||||
#else /* !_KERNEL */
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: syslimits.h,v 1.26 2011/09/27 01:51:42 christos Exp $ */
|
||||
/* $NetBSD: syslimits.h,v 1.27 2012/12/07 07:06:39 dholland Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
@@ -34,15 +34,9 @@
|
||||
#ifndef _SYS_SYSLIMITS_H_
|
||||
#define _SYS_SYSLIMITS_H_
|
||||
|
||||
#if defined(_STANDALONE) && defined(__minix)
|
||||
/* LSC: In NetBSD this gets pulled in through libkern.h */
|
||||
#include <sys/null.h>
|
||||
uint32_t crc32(uint32_t, const uint8_t *, size_t);
|
||||
#endif /* defined(_STANDALONE) */
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define OPEN_MAX 255
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
#include <sys/featuretest.h>
|
||||
|
||||
@@ -57,7 +51,7 @@ uint32_t crc32(uint32_t, const uint8_t *, size_t);
|
||||
#define MAX_CANON 255 /* max bytes in term canon input line */
|
||||
#define MAX_INPUT 255 /* max bytes in terminal input */
|
||||
#define NAME_MAX 511 /* max bytes in a file name, must be */
|
||||
/* kept in sync with MAXPATHLEN */
|
||||
/* kept in sync with MAXNAMLEN */
|
||||
#define NGROUPS_MAX 16 /* max supplemental group id's */
|
||||
#define UID_MAX 2147483647U /* max value for a uid_t (2^31-2) */
|
||||
#ifndef OPEN_MAX
|
||||
@@ -66,7 +60,7 @@ uint32_t crc32(uint32_t, const uint8_t *, size_t);
|
||||
#define PATH_MAX 1024 /* max bytes in pathname */
|
||||
|
||||
#ifdef __minix
|
||||
#define PIPE_BUF 32768 /* max bytes for atomic pipe wri
|
||||
#define PIPE_BUF 32768 /* max bytes for atomic pipe writes */
|
||||
#else
|
||||
#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
|
||||
#endif
|
||||
@@ -98,11 +92,4 @@ uint32_t crc32(uint32_t, const uint8_t *, size_t);
|
||||
|
||||
#endif /* !_ANSI_SOURCE */
|
||||
|
||||
#ifdef __minix
|
||||
#define STREAM_MAX 8 /* == _POSIX_STREAM_MAX */
|
||||
#define TZNAME_MAX 6 /* == _POSIX_TZNAME_MAX */
|
||||
#define TIME_MAX LONG_MAX
|
||||
#endif
|
||||
|
||||
#endif /* !_SYS_SYSLIMITS_H_ */
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: systm.h,v 1.257 2012/08/03 18:08:01 matt Exp $ */
|
||||
/* $NetBSD: systm.h,v 1.259 2013/10/26 18:31:29 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1988, 1991, 1993
|
||||
@@ -62,7 +62,6 @@ struct tty;
|
||||
struct uio;
|
||||
struct vnode;
|
||||
struct vmspace;
|
||||
struct vm_map;
|
||||
|
||||
extern const char *panicstr; /* panic message */
|
||||
extern int doing_shutdown; /* shutting down */
|
||||
@@ -186,7 +185,7 @@ void aprint_naive(const char *, ...) __printflike(1, 2);
|
||||
void aprint_verbose(const char *, ...) __printflike(1, 2);
|
||||
void aprint_debug(const char *, ...) __printflike(1, 2);
|
||||
|
||||
void device_printf(device_t, const char *fmt, ...) __printflike(2, 3);
|
||||
void device_printf(device_t, const char *fmt, ...) __printflike(2, 3);
|
||||
|
||||
void aprint_normal_dev(device_t, const char *, ...) __printflike(2, 3);
|
||||
void aprint_error_dev(device_t, const char *, ...) __printflike(2, 3);
|
||||
@@ -534,6 +533,6 @@ void assert_sleepable(void);
|
||||
#define ASSERT_SLEEPABLE() /* nothing */
|
||||
#endif /* defined(DEBUG) */
|
||||
|
||||
vaddr_t calc_cache_size(struct vm_map *, int, int);
|
||||
vaddr_t calc_cache_size(vsize_t , int, int);
|
||||
|
||||
#endif /* !_SYS_SYSTM_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: termios.h,v 1.31 2009/12/26 19:31:34 mrg Exp $ */
|
||||
/* $NetBSD: termios.h,v 1.32 2013/07/11 16:46:06 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988, 1989, 1993, 1994
|
||||
@@ -87,68 +87,64 @@
|
||||
/*
|
||||
* Input flags - software input processing
|
||||
*/
|
||||
#define IGNBRK 0x00000001 /* ignore BREAK condition */
|
||||
#define BRKINT 0x00000002 /* map BREAK to SIGINT */
|
||||
#define IGNPAR 0x00000004 /* ignore (discard) parity errors */
|
||||
#define PARMRK 0x00000008 /* mark parity and framing errors */
|
||||
#define INPCK 0x00000010 /* enable checking of parity errors */
|
||||
#define ISTRIP 0x00000020 /* strip 8th bit off chars */
|
||||
#define INLCR 0x00000040 /* map NL into CR */
|
||||
#define IGNCR 0x00000080 /* ignore CR */
|
||||
#define ICRNL 0x00000100 /* map CR to NL (ala CRMOD) */
|
||||
#define IXON 0x00000200 /* enable output flow control */
|
||||
#define IXOFF 0x00000400 /* enable input flow control */
|
||||
#define IGNBRK 0x00000001U /* ignore BREAK condition */
|
||||
#define BRKINT 0x00000002U /* map BREAK to SIGINT */
|
||||
#define IGNPAR 0x00000004U /* ignore (discard) parity errors */
|
||||
#define PARMRK 0x00000008U /* mark parity and framing errors */
|
||||
#define INPCK 0x00000010U /* enable checking of parity errors */
|
||||
#define ISTRIP 0x00000020U /* strip 8th bit off chars */
|
||||
#define INLCR 0x00000040U /* map NL into CR */
|
||||
#define IGNCR 0x00000080U /* ignore CR */
|
||||
#define ICRNL 0x00000100U /* map CR to NL (ala CRMOD) */
|
||||
#define IXON 0x00000200U /* enable output flow control */
|
||||
#define IXOFF 0x00000400U /* enable input flow control */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define IXANY 0x00000800 /* any char will restart after stop */
|
||||
#define IXANY 0x00000800U /* any char will restart after stop */
|
||||
#endif
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define IMAXBEL 0x00002000 /* ring bell on input queue full */
|
||||
#endif
|
||||
|
||||
#ifdef __minix
|
||||
#define SCANCODES 0x00001000 /* send scancodes */
|
||||
#define IMAXBEL 0x00002000U /* ring bell on input queue full */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Output flags - software output processing
|
||||
*/
|
||||
#define OPOST 0x00000001 /* enable following output processing */
|
||||
#define OPOST 0x00000001U /* enable following output processing */
|
||||
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
#define ONLCR 0x00000002 /* map NL to CR-NL (ala CRMOD) */
|
||||
#define ONLCR 0x00000002U /* map NL to CR-NL (ala CRMOD) */
|
||||
#endif
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define OXTABS 0x00000004 /* expand tabs to spaces */
|
||||
#define ONOEOT 0x00000008 /* discard EOT's (^D) on output */
|
||||
#define OXTABS 0x00000004U /* expand tabs to spaces */
|
||||
#define ONOEOT 0x00000008U /* discard EOT's (^D) on output */
|
||||
#endif
|
||||
#if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
#define OCRNL 0x00000010 /* map CR to NL */
|
||||
#define ONOCR 0x00000020 /* discard CR's when on column 0 */
|
||||
#define ONLRET 0x00000040 /* move to column 0 on CR */
|
||||
#define OCRNL 0x00000010U /* map CR to NL */
|
||||
#define ONOCR 0x00000020U /* discard CR's when on column 0 */
|
||||
#define ONLRET 0x00000040U /* move to column 0 on CR */
|
||||
#endif /* defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE) */
|
||||
|
||||
/*
|
||||
* Control flags - hardware control of terminal
|
||||
*/
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define CIGNORE 0x00000001 /* ignore control flags */
|
||||
#define CIGNORE 0x00000001U /* ignore control flags */
|
||||
#endif
|
||||
#define CSIZE 0x00000300 /* character size mask */
|
||||
#define CS5 0x00000000 /* 5 bits (pseudo) */
|
||||
#define CS6 0x00000100 /* 6 bits */
|
||||
#define CS7 0x00000200 /* 7 bits */
|
||||
#define CS8 0x00000300 /* 8 bits */
|
||||
#define CSTOPB 0x00000400 /* send 2 stop bits */
|
||||
#define CREAD 0x00000800 /* enable receiver */
|
||||
#define PARENB 0x00001000 /* parity enable */
|
||||
#define PARODD 0x00002000 /* odd parity, else even */
|
||||
#define HUPCL 0x00004000 /* hang up on last close */
|
||||
#define CLOCAL 0x00008000 /* ignore modem status lines */
|
||||
#define CSIZE 0x00000300U /* character size mask */
|
||||
#define CS5 0x00000000U /* 5 bits (pseudo) */
|
||||
#define CS6 0x00000100U /* 6 bits */
|
||||
#define CS7 0x00000200U /* 7 bits */
|
||||
#define CS8 0x00000300U /* 8 bits */
|
||||
#define CSTOPB 0x00000400U /* send 2 stop bits */
|
||||
#define CREAD 0x00000800U /* enable receiver */
|
||||
#define PARENB 0x00001000U /* parity enable */
|
||||
#define PARODD 0x00002000U /* odd parity, else even */
|
||||
#define HUPCL 0x00004000U /* hang up on last close */
|
||||
#define CLOCAL 0x00008000U /* ignore modem status lines */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define CRTSCTS 0x00010000 /* RTS/CTS full-duplex flow control */
|
||||
#define CRTSCTS 0x00010000U /* RTS/CTS full-duplex flow control */
|
||||
#define CRTS_IFLOW CRTSCTS /* XXX compat */
|
||||
#define CCTS_OFLOW CRTSCTS /* XXX compat */
|
||||
#define CDTRCTS 0x00020000 /* DTR/CTS full-duplex flow control */
|
||||
#define MDMBUF 0x00100000 /* DTR/DCD hardware flow control */
|
||||
#define CDTRCTS 0x00020000U /* DTR/CTS full-duplex flow control */
|
||||
#define MDMBUF 0x00100000U /* DTR/DCD hardware flow control */
|
||||
#define CHWFLOW (MDMBUF|CRTSCTS|CDTRCTS) /* all types of hw flow control */
|
||||
#endif
|
||||
|
||||
@@ -162,32 +158,32 @@
|
||||
*/
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define ECHOKE 0x00000001 /* visual erase for line kill */
|
||||
#define ECHOKE 0x00000001U /* visual erase for line kill */
|
||||
#endif
|
||||
#define ECHOE 0x00000002 /* visually erase chars */
|
||||
#define ECHOK 0x00000004 /* echo NL after line kill */
|
||||
#define ECHO 0x00000008 /* enable echoing */
|
||||
#define ECHONL 0x00000010 /* echo NL even if ECHO is off */
|
||||
#define ECHOE 0x00000002U /* visually erase chars */
|
||||
#define ECHOK 0x00000004U /* echo NL after line kill */
|
||||
#define ECHO 0x00000008U /* enable echoing */
|
||||
#define ECHONL 0x00000010U /* echo NL even if ECHO is off */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define ECHOPRT 0x00000020 /* visual erase mode for hardcopy */
|
||||
#define ECHOCTL 0x00000040 /* echo control chars as ^(Char) */
|
||||
#define ECHOPRT 0x00000020U /* visual erase mode for hardcopy */
|
||||
#define ECHOCTL 0x00000040U /* echo control chars as ^(Char) */
|
||||
#endif /* defined(_NETBSD_SOURCE) */
|
||||
#define ISIG 0x00000080 /* enable signals INT, QUIT, [D]SUSP */
|
||||
#define ICANON 0x00000100 /* canonicalize input lines */
|
||||
#define ISIG 0x00000080U /* enable signals INT, QUIT, [D]SUSP */
|
||||
#define ICANON 0x00000100U /* canonicalize input lines */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define ALTWERASE 0x00000200 /* use alternate WERASE algorithm */
|
||||
#define ALTWERASE 0x00000200U /* use alternate WERASE algorithm */
|
||||
#endif /* defined(_NETBSD_SOURCE) */
|
||||
#define IEXTEN 0x00000400 /* enable DISCARD and LNEXT */
|
||||
#define IEXTEN 0x00000400U /* enable DISCARD and LNEXT */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define EXTPROC 0x00000800 /* external processing */
|
||||
#define EXTPROC 0x00000800U /* external processing */
|
||||
#endif /* defined(_NETBSD_SOURCE) */
|
||||
#define TOSTOP 0x00400000 /* stop background jobs on output */
|
||||
#define TOSTOP 0x00400000U /* stop background jobs on output */
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define FLUSHO 0x00800000 /* output being flushed (state) */
|
||||
#define NOKERNINFO 0x02000000 /* no kernel output from VSTATUS */
|
||||
#define PENDIN 0x20000000 /* re-echo input buffer at next read */
|
||||
#define FLUSHO 0x00800000U /* output being flushed (state) */
|
||||
#define NOKERNINFO 0x02000000U /* no kernel output from VSTATUS */
|
||||
#define PENDIN 0x20000000U /* re-echo input buffer at next read */
|
||||
#endif /* defined(_NETBSD_SOURCE) */
|
||||
#define NOFLSH 0x80000000 /* don't flush output on signal */
|
||||
#define NOFLSH 0x80000000U /* don't flush output on signal */
|
||||
|
||||
typedef unsigned int tcflag_t;
|
||||
typedef unsigned char cc_t;
|
||||
@@ -216,34 +212,34 @@ struct termios {
|
||||
/*
|
||||
* Standard speeds
|
||||
*/
|
||||
#define B0 0
|
||||
#define B50 50
|
||||
#define B75 75
|
||||
#define B110 110
|
||||
#define B134 134
|
||||
#define B150 150
|
||||
#define B200 200
|
||||
#define B300 300
|
||||
#define B600 600
|
||||
#define B1200 1200
|
||||
#define B1800 1800
|
||||
#define B2400 2400
|
||||
#define B4800 4800
|
||||
#define B9600 9600
|
||||
#define B19200 19200
|
||||
#define B38400 38400
|
||||
#define B0 0U
|
||||
#define B50 50U
|
||||
#define B75 75U
|
||||
#define B110 110U
|
||||
#define B134 134U
|
||||
#define B150 150U
|
||||
#define B200 200U
|
||||
#define B300 300U
|
||||
#define B600 600U
|
||||
#define B1200 1200U
|
||||
#define B1800 1800U
|
||||
#define B2400 2400U
|
||||
#define B4800 4800U
|
||||
#define B9600 9600U
|
||||
#define B19200 19200U
|
||||
#define B38400 38400U
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
#define B7200 7200
|
||||
#define B14400 14400
|
||||
#define B28800 28800
|
||||
#define B57600 57600
|
||||
#define B76800 76800
|
||||
#define B115200 115200
|
||||
#define B230400 230400
|
||||
#define B460800 460800
|
||||
#define B921600 921600
|
||||
#define EXTA 19200
|
||||
#define EXTB 38400
|
||||
#define B7200 7200U
|
||||
#define B14400 14400U
|
||||
#define B28800 28800U
|
||||
#define B57600 57600U
|
||||
#define B76800 76800U
|
||||
#define B115200 115200U
|
||||
#define B230400 230400U
|
||||
#define B460800 460800U
|
||||
#define B921600 921600U
|
||||
#define EXTA 19200U
|
||||
#define EXTB 38400U
|
||||
#endif /* defined(_NETBSD_SOURCE) */
|
||||
|
||||
#ifndef _KERNEL
|
||||
|
||||
@@ -249,10 +249,10 @@ struct itimerspec {
|
||||
};
|
||||
|
||||
#define CLOCK_REALTIME 0
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
#define CLOCK_VIRTUAL 1
|
||||
#define CLOCK_PROF 2
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
#define CLOCK_MONOTONIC 3
|
||||
|
||||
#if defined(_NETBSD_SOURCE)
|
||||
@@ -278,7 +278,8 @@ __BEGIN_DECLS
|
||||
#if (_POSIX_C_SOURCE - 0) >= 200112L || \
|
||||
defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
|
||||
int getitimer(int, struct itimerval *) __RENAME(__getitimer50);
|
||||
int gettimeofday(struct timeval * __restrict, void *__restrict);
|
||||
int gettimeofday(struct timeval * __restrict, void *__restrict)
|
||||
__RENAME(__gettimeofday50);
|
||||
int setitimer(int, const struct itimerval * __restrict,
|
||||
struct itimerval * __restrict) __RENAME(__setitimer50);
|
||||
int utimes(const char *, const struct timeval [2]) __RENAME(__utimes50);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: timepps.h,v 1.20 2012/03/21 05:42:26 matt Exp $ */
|
||||
/* $NetBSD: timepps.h,v 1.21 2013/05/26 18:07:42 kardel Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Jonathan Stone
|
||||
@@ -133,6 +133,15 @@ typedef struct {
|
||||
|
||||
#include <sys/mutex.h>
|
||||
|
||||
/* flags for pps_ref_event() - bitmask but only 1 bit allowed */
|
||||
#define PPS_REFEVNT_CAPTURE 0x01 /* use captume time stamp */
|
||||
#define PPS_REFEVNT_CURRENT 0x02 /* use current time stamp */
|
||||
#define PPS_REFEVNT_CAPCUR 0x04 /* use average of above */
|
||||
#define PPS_REFEVNT_RMASK 0x0F /* mask reference bits */
|
||||
|
||||
#define PPS_REFEVNT_PPS 0x10 /* guess PPS second from */
|
||||
/* capture timestamp */
|
||||
|
||||
extern kmutex_t timecounter_lock;
|
||||
|
||||
struct pps_state {
|
||||
@@ -140,6 +149,7 @@ struct pps_state {
|
||||
struct timehands *capth;
|
||||
unsigned capgen;
|
||||
u_int64_t capcount;
|
||||
struct bintime ref_time;
|
||||
|
||||
/* State information. */
|
||||
pps_params_t ppsparam;
|
||||
@@ -152,6 +162,7 @@ struct pps_state {
|
||||
|
||||
void pps_capture(struct pps_state *);
|
||||
void pps_event(struct pps_state *, int);
|
||||
void pps_ref_event(struct pps_state *, int, struct bintime *, int);
|
||||
void pps_init(struct pps_state *);
|
||||
int pps_ioctl(unsigned long, void *, struct pps_state *);
|
||||
|
||||
|
||||
@@ -57,13 +57,9 @@ struct tms {
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
#ifdef __minix
|
||||
clock_t times(struct tms *);
|
||||
#else
|
||||
#ifndef __LIBC12_SOURCE__
|
||||
clock_t times(struct tms *) __RENAME(__times13);
|
||||
#endif
|
||||
#endif /* __minix */
|
||||
__END_DECLS
|
||||
#endif
|
||||
#endif /* !_SYS_TIMES_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: timevar.h,v 1.32 2012/10/02 01:44:29 christos Exp $ */
|
||||
/* $NetBSD: timevar.h,v 1.33 2013/03/29 01:09:45 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2005, 2008 The NetBSD Foundation.
|
||||
@@ -145,7 +145,7 @@ void getnanotime(struct timespec *);
|
||||
void getmicrotime(struct timeval *);
|
||||
|
||||
/* Other functions */
|
||||
int abstimeout2timo(struct timespec *, int *);
|
||||
int ts2timo(clockid_t, int, struct timespec *, int *, struct timespec *);
|
||||
void adjtime1(const struct timeval *, struct timeval *, struct proc *);
|
||||
int clock_getres1(clockid_t, struct timespec *);
|
||||
int clock_gettime1(clockid_t, struct timespec *);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* $NetBSD: tree.h,v 1.16 2008/03/21 13:07:15 ad Exp $ */
|
||||
/* $OpenBSD: tree.h,v 1.7 2002/10/17 21:51:54 art Exp $ */
|
||||
/* $NetBSD: tree.h,v 1.20 2013/09/14 13:20:45 joerg Exp $ */
|
||||
/* $OpenBSD: tree.h,v 1.13 2011/07/09 00:19:45 pirofti Exp $ */
|
||||
/*
|
||||
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
|
||||
* All rights reserved.
|
||||
@@ -130,7 +130,7 @@ name##_SPLAY_FIND(struct name *head, struct type *elm) \
|
||||
return (NULL); \
|
||||
} \
|
||||
\
|
||||
static __inline struct type * \
|
||||
static __inline __unused struct type * \
|
||||
name##_SPLAY_NEXT(struct name *head, struct type *elm) \
|
||||
{ \
|
||||
name##_SPLAY(head, elm); \
|
||||
@@ -144,7 +144,7 @@ name##_SPLAY_NEXT(struct name *head, struct type *elm) \
|
||||
return (elm); \
|
||||
} \
|
||||
\
|
||||
static __inline struct type * \
|
||||
static __unused __inline struct type * \
|
||||
name##_SPLAY_MIN_MAX(struct name *head, int val) \
|
||||
{ \
|
||||
name##_SPLAY_MINMAX(head, val); \
|
||||
@@ -330,7 +330,7 @@ struct { \
|
||||
} while (/*CONSTCOND*/ 0)
|
||||
|
||||
#ifndef RB_AUGMENT
|
||||
#define RB_AUGMENT(x) (void)(x)
|
||||
#define RB_AUGMENT(x) do {} while (/*CONSTCOND*/ 0)
|
||||
#endif
|
||||
|
||||
#define RB_ROTATE_LEFT(head, elm, tmp, field) do { \
|
||||
@@ -733,9 +733,29 @@ name##_RB_MINMAX(struct name *head, int val) \
|
||||
(x) != NULL; \
|
||||
(x) = name##_RB_NEXT(x))
|
||||
|
||||
#define RB_FOREACH_FROM(x, name, y) \
|
||||
for ((x) = (y); \
|
||||
((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
|
||||
(x) = (y))
|
||||
|
||||
#define RB_FOREACH_SAFE(x, name, head, y) \
|
||||
for ((x) = RB_MIN(name, head); \
|
||||
((x) != NULL) && ((y) = name##_RB_NEXT(x), (x) != NULL); \
|
||||
(x) = (y))
|
||||
|
||||
#define RB_FOREACH_REVERSE(x, name, head) \
|
||||
for ((x) = RB_MAX(name, head); \
|
||||
(x) != NULL; \
|
||||
(x) = name##_RB_PREV(x))
|
||||
|
||||
#define RB_FOREACH_REVERSE_FROM(x, name, y) \
|
||||
for ((x) = (y); \
|
||||
((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
|
||||
(x) = (y))
|
||||
|
||||
#define RB_FOREACH_REVERSE_SAFE(x, name, head, y) \
|
||||
for ((x) = RB_MAX(name, head); \
|
||||
((x) != NULL) && ((y) = name##_RB_PREV(x), (x) != NULL); \
|
||||
(x) = (y))
|
||||
|
||||
#endif /* _SYS_TREE_H_ */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tty.h,v 1.90 2011/09/24 00:05:38 christos Exp $ */
|
||||
/* $NetBSD: tty.h,v 1.91 2013/02/24 06:20:24 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@@ -148,6 +148,7 @@ struct tty {
|
||||
sigset_t t_sigs[TTYSIG_COUNT]; /* Pending signals */
|
||||
int t_sigcount; /* # pending signals */
|
||||
TAILQ_ENTRY(tty) t_sigqueue; /* entry on pending signal list */
|
||||
void *t_softc; /* pointer to driver's softc. */
|
||||
};
|
||||
|
||||
#define t_cc t_termios.c_cc
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ttycom.h,v 1.19 2011/09/24 00:05:39 christos Exp $ */
|
||||
/* $NetBSD: ttycom.h,v 1.20 2012/10/19 16:49:21 apb Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1993, 1994
|
||||
@@ -39,6 +39,7 @@
|
||||
#ifndef _SYS_TTYCOM_H_
|
||||
#define _SYS_TTYCOM_H_
|
||||
|
||||
#include <sys/syslimits.h>
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
/*
|
||||
@@ -57,12 +58,12 @@ struct winsize {
|
||||
unsigned short ws_ypixel; /* vertical size, pixels */
|
||||
};
|
||||
|
||||
/* ptmget, for /dev/ptm pty getting ioctl PTMGET */
|
||||
/* ptmget, for /dev/ptm pty getting ioctl TIOCPTMGET, and for TIOCPTSNAME */
|
||||
struct ptmget {
|
||||
int cfd;
|
||||
int sfd;
|
||||
char cn[16];
|
||||
char sn[16];
|
||||
char cn[PATH_MAX];
|
||||
char sn[PATH_MAX];
|
||||
};
|
||||
|
||||
#define _PATH_PTMDEV "/dev/ptm"
|
||||
@@ -163,9 +164,7 @@ typedef char linedn_t[TTLINEDNAMELEN];
|
||||
#define STRIPDISC 6 /* metricom wireless IP discipline */
|
||||
#define HDLCDISC 9 /* HDLC discipline */
|
||||
|
||||
#ifdef __minix
|
||||
|
||||
#include <minix/ioctl.h>
|
||||
#if defined(__minix)
|
||||
|
||||
/* Terminal ioctls. Use big T. */
|
||||
#define TIOCSFON _IOW_BIG(1, u8_t [8192]) /* new font */
|
||||
@@ -178,6 +177,6 @@ typedef char linedn_t[TTLINEDNAMELEN];
|
||||
/* /dev/video ioctls. */
|
||||
#define TIOCMAPMEM _IOWR('v', 1, struct mapreqvm)
|
||||
#define TIOCUNMAPMEM _IOWR('v', 2, struct mapreqvm)
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_TTYCOM_H_ */
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
#define TTYDEF_OFLAG (OPOST | ONLCR | OXTABS)
|
||||
#define TTYDEF_LFLAG (ECHO | ICANON | ISIG | IEXTEN | ECHOE|ECHOKE|ECHOCTL)
|
||||
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
|
||||
#ifdef __minix
|
||||
#define TTYDEF_SPEED (B115200)
|
||||
#if defined(__minix)
|
||||
#define TTYDEF_SPEED (B115200)
|
||||
#else
|
||||
#define TTYDEF_SPEED (B9600)
|
||||
#endif
|
||||
#define TTYDEF_SPEED (B9600)
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
/*
|
||||
* Control Character Defaults
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: types.h,v 1.89 2012/03/17 21:30:29 christos Exp $ */
|
||||
/* $NetBSD: types.h,v 1.90 2013/02/02 14:00:37 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1991, 1993, 1994
|
||||
@@ -233,9 +233,11 @@ typedef int psetid_t;
|
||||
* Boolean type definitions for the kernel environment. User-space
|
||||
* boolean definitions are found in <stdbool.h>.
|
||||
*/
|
||||
#ifndef __cplusplus
|
||||
#define bool _Bool
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Deprecated Mach-style boolean_t type. Should not be used by new code.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ucontext.h,v 1.17 2012/09/12 02:00:54 manu Exp $ */
|
||||
/* $NetBSD: ucontext.h,v 1.18 2013/03/06 18:16:58 pooka Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2003 The NetBSD Foundation, Inc.
|
||||
@@ -57,11 +57,11 @@ struct __ucontext {
|
||||
#define _UC_STACK 0x02 /* valid uc_stack */
|
||||
#define _UC_CPU 0x04 /* valid GPR context in uc_mcontext */
|
||||
#define _UC_FPU 0x08 /* valid FPU context in uc_mcontext */
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
#define _UC_SWAPPED 0x10000
|
||||
#define _UC_IGNFPU 0x20000
|
||||
#define _UC_IGNSIGM 0x40000
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
#define _UC_MD 0x400f0020 /* MD bits. see below */
|
||||
|
||||
/*
|
||||
@@ -109,23 +109,20 @@ struct __ucontext {
|
||||
#ifdef _KERNEL
|
||||
struct lwp;
|
||||
|
||||
#if defined(__UCONTEXT_SIZE) && !defined(__minix)
|
||||
__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
|
||||
#endif
|
||||
|
||||
void getucontext(struct lwp *, ucontext_t *);
|
||||
int setucontext(struct lwp *, const ucontext_t *);
|
||||
void cpu_getmcontext(struct lwp *, mcontext_t *, unsigned int *);
|
||||
int cpu_setmcontext(struct lwp *, const mcontext_t *, unsigned int);
|
||||
int cpu_mcontext_validate(struct lwp *, const mcontext_t *);
|
||||
|
||||
#if defined(__UCONTEXT_SIZE) && !defined(__minix)
|
||||
__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
|
||||
#endif
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#ifdef __minix
|
||||
__BEGIN_DECLS
|
||||
void resumecontext(ucontext_t *ucp);
|
||||
#if defined(__UCONTEXT_SIZE) && !defined(__minix)
|
||||
__CTASSERT(sizeof(ucontext_t) == __UCONTEXT_SIZE);
|
||||
#endif
|
||||
|
||||
/* These functions get and set ucontext structure through PM/kernel. They don't
|
||||
* manipulate the stack. */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: unistd.h,v 1.53 2012/08/01 15:24:22 martin Exp $ */
|
||||
/* $NetBSD: unistd.h,v 1.54 2012/11/02 21:41:26 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
@@ -62,12 +62,12 @@
|
||||
#define _POSIX_VERSION 200112L
|
||||
#define _POSIX2_VERSION 200112L
|
||||
|
||||
#ifndef __minix
|
||||
#if !defined(__minix)
|
||||
/*
|
||||
* We support the posix_spawn() family of functions (unconditionally).
|
||||
*/
|
||||
#define _POSIX_SPAWN 200809L
|
||||
#endif
|
||||
#endif /* !defined(__minix) */
|
||||
|
||||
/* execution-time symbolic constants */
|
||||
|
||||
@@ -308,6 +308,9 @@
|
||||
/* This is implemented */
|
||||
#define _SC_SPAWN 86
|
||||
|
||||
/* Extensions found in Solaris and Linux. */
|
||||
#define _SC_PHYS_PAGES 121
|
||||
|
||||
#ifdef _NETBSD_SOURCE
|
||||
/* Commonly provided sysconf() extensions */
|
||||
#define _SC_NPROCESSORS_CONF 1001
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $NetBSD: userret.h,v 1.25 2012/02/19 21:07:00 rmind Exp $ */
|
||||
/* $NetBSD: userret.h,v 1.26 2013/04/07 07:54:53 kiyohara Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2003, 2006, 2008 The NetBSD Foundation, Inc.
|
||||
@@ -66,7 +66,6 @@
|
||||
#define _SYS_USERRET_H_
|
||||
|
||||
#include <sys/lockdebug.h>
|
||||
#include <sys/userret.h>
|
||||
#include <sys/intr.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -51,19 +51,21 @@ struct utsname {
|
||||
char release[_SYS_NMLN]; /* Release level. */
|
||||
char version[_SYS_NMLN]; /* Version level. */
|
||||
char machine[_SYS_NMLN]; /* Hardware type. */
|
||||
#if defined(__minix)
|
||||
char arch[_SYS_NMLN];
|
||||
#endif /* defined(__minix) */
|
||||
};
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
int uname(struct utsname *);
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
int sysuname(int _req, int _field, char *_value, size_t _len);
|
||||
#endif
|
||||
#endif /* defined(__minix) */
|
||||
__END_DECLS
|
||||
|
||||
#ifdef __minix
|
||||
#if defined(__minix)
|
||||
/* req: Get or set a string. */
|
||||
#define _UTS_GET 0
|
||||
#define _UTS_SET 1
|
||||
@@ -79,6 +81,6 @@ __END_DECLS
|
||||
#define _UTS_SYSNAME 7
|
||||
#define _UTS_BUS 8
|
||||
#define _UTS_MAX 9 /* Number of strings. */
|
||||
#endif /* __minix */
|
||||
#endif /* defined(__minix) */
|
||||
|
||||
#endif /* !_SYS_UTSNAME_H_ */
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user