[Midnightbsd-cvs] src [12370] trunk/sys/sys: Sync with FreeBSD 11-stable
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Feb 16 17:00:35 EST 2020
Revision: 12370
http://svnweb.midnightbsd.org/src/?rev=12370
Author: laffer1
Date: 2020-02-16 17:00:35 -0500 (Sun, 16 Feb 2020)
Log Message:
-----------
Sync with FreeBSD 11-stable
Modified Paths:
--------------
trunk/sys/sys/namei.h
trunk/sys/sys/nlist_aout.h
trunk/sys/sys/nv.h
trunk/sys/sys/osd.h
Added Paths:
-----------
trunk/sys/sys/numa.h
Modified: trunk/sys/sys/namei.h
===================================================================
--- trunk/sys/sys/namei.h 2020-02-16 21:59:52 UTC (rev 12369)
+++ trunk/sys/sys/namei.h 2020-02-16 22:00:35 UTC (rev 12370)
@@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* @(#)namei.h 8.5 (Berkeley) 1/9/95
- * $FreeBSD: stable/10/sys/sys/namei.h 255219 2013-09-05 00:09:56Z pjd $
+ * $FreeBSD: stable/11/sys/sys/namei.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_NAMEI_H_
@@ -54,9 +54,11 @@
char *cn_pnbuf; /* pathname buffer */
char *cn_nameptr; /* pointer to looked up name */
long cn_namelen; /* length of looked up component */
- long cn_consume; /* chars to consume in lookup() */
};
+struct nameicap_tracker;
+TAILQ_HEAD(nameicap_tracker_head, nameicap_tracker);
+
/*
* Encapsulation of namei parameters.
*/
@@ -74,7 +76,7 @@
struct vnode *ni_rootdir; /* logical root directory */
struct vnode *ni_topdir; /* logical top directory */
int ni_dirfd; /* starting directory for *at functions */
- int ni_strictrelative; /* relative lookup only; no '..' */
+ int ni_lcf; /* local call flags */
/*
* Results: returned from namei
*/
@@ -96,6 +98,7 @@
* through the VOP interface.
*/
struct componentname ni_cnd;
+ struct nameicap_tracker_head ni_cap_tracker;
};
#ifdef _KERNEL
@@ -154,6 +157,12 @@
#define PARAMASK 0x3ffffe00 /* mask of parameter descriptors */
/*
+ * Flags in ni_lcf, valid for the duration of the namei call.
+ */
+#define NI_LCF_STRICTRELATIVE 0x0001 /* relative lookup only */
+#define NI_LCF_CAP_DOTDOT 0x0002 /* ".." in strictrelative case */
+
+/*
* Initialization of a nameidata structure.
*/
#define NDINIT(ndp, op, flags, segflg, namep, td) \
Modified: trunk/sys/sys/nlist_aout.h
===================================================================
--- trunk/sys/sys/nlist_aout.h 2020-02-16 21:59:52 UTC (rev 12369)
+++ trunk/sys/sys/nlist_aout.h 2020-02-16 22:00:35 UTC (rev 12370)
@@ -34,7 +34,7 @@
*
* @(#)nlist.h 8.2 (Berkeley) 1/21/94
*
- * $FreeBSD: stable/10/sys/sys/nlist_aout.h 208986 2010-06-10 14:19:51Z bz $
+ * $FreeBSD: stable/11/sys/sys/nlist_aout.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_NLIST_AOUT_H_
@@ -57,8 +57,6 @@
} n_un;
#else
const char *n_name; /* symbol name (in memory) */
- int : 8 * (sizeof(long) > sizeof(char *) ?
- sizeof(long) - sizeof(char *) : sizeof(char *) - sizeof(long));
#endif
unsigned char n_type; /* type defines */
char n_other; /* ".type" and binding information */
Added: trunk/sys/sys/numa.h
===================================================================
--- trunk/sys/sys/numa.h (rev 0)
+++ trunk/sys/sys/numa.h 2020-02-16 22:00:35 UTC (rev 12370)
@@ -0,0 +1,42 @@
+/* $MidnightBSD$ */
+/*
+ * Copyright (c) 2015 Adrian Chadd <adrian at FreeBSD.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.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may 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 AUTHOR 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.
+ *
+ * $FreeBSD: stable/11/sys/sys/numa.h 285387 2015-07-11 15:21:37Z adrian $
+ */
+#ifndef __SYS_NUMA_H__
+#define __SYS_NUMA_H__
+
+#include <sys/_vm_domain.h>
+
+extern int numa_setaffinity(cpuwhich_t which, id_t id,
+ struct vm_domain_policy_entry *vd);
+extern int numa_getaffinity(cpuwhich_t which, id_t id,
+ struct vm_domain_policy_entry *vd);
+
+#endif /* __SYS_NUMA_H__ */
Property changes on: trunk/sys/sys/numa.h
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/sys/sys/nv.h
===================================================================
--- trunk/sys/sys/nv.h 2020-02-16 21:59:52 UTC (rev 12369)
+++ trunk/sys/sys/nv.h 2020-02-16 22:00:35 UTC (rev 12370)
@@ -1,6 +1,7 @@
/* $MidnightBSD$ */
/*-
* Copyright (c) 2009-2013 The FreeBSD Foundation
+ * Copyright (c) 2013-2015 Mariusz Zaborski <oshogbo at FreeBSD.org>
* All rights reserved.
*
* This software was developed by Pawel Jakub Dawidek under sponsorship from
@@ -27,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/nv.h 292973 2015-12-31 03:28:14Z ngie $
+ * $FreeBSD: stable/11/sys/sys/nv.h 336346 2018-07-16 15:02:21Z kevans $
*/
#ifndef _NV_H_
@@ -60,11 +61,20 @@
#define NV_TYPE_NVLIST 5
#define NV_TYPE_DESCRIPTOR 6
#define NV_TYPE_BINARY 7
+#define NV_TYPE_BOOL_ARRAY 8
+#define NV_TYPE_NUMBER_ARRAY 9
+#define NV_TYPE_STRING_ARRAY 10
+#define NV_TYPE_NVLIST_ARRAY 11
+#define NV_TYPE_DESCRIPTOR_ARRAY 12
/*
* Perform case-insensitive lookups of provided names.
*/
#define NV_FLAG_IGNORE_CASE 0x01
+/*
+ * Names don't have to be unique.
+ */
+#define NV_FLAG_NO_UNIQUE 0x02
#if defined(_KERNEL) && defined(MALLOC_DECLARE)
MALLOC_DECLARE(M_NVLIST);
@@ -88,16 +98,21 @@
size_t nvlist_size(const nvlist_t *nvl);
void *nvlist_pack(const nvlist_t *nvl, size_t *sizep);
-nvlist_t *nvlist_unpack(const void *buf, size_t size);
+nvlist_t *nvlist_unpack(const void *buf, size_t size, int flags);
int nvlist_send(int sock, const nvlist_t *nvl);
-nvlist_t *nvlist_recv(int sock);
-nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl);
+nvlist_t *nvlist_recv(int sock, int flags);
+nvlist_t *nvlist_xfer(int sock, nvlist_t *nvl, int flags);
const char *nvlist_next(const nvlist_t *nvl, int *typep, void **cookiep);
const nvlist_t *nvlist_get_parent(const nvlist_t *nvl, void **cookiep);
+const nvlist_t *nvlist_get_array_next(const nvlist_t *nvl);
+bool nvlist_in_array(const nvlist_t *nvl);
+
+const nvlist_t *nvlist_get_pararr(const nvlist_t *nvl, void **cookiep);
+
/*
* The nvlist_exists functions check if the given name (optionally of the given
* type) exists on nvlist.
@@ -111,10 +126,15 @@
bool nvlist_exists_number(const nvlist_t *nvl, const char *name);
bool nvlist_exists_string(const nvlist_t *nvl, const char *name);
bool nvlist_exists_nvlist(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_binary(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_bool_array(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_number_array(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_string_array(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_nvlist_array(const nvlist_t *nvl, const char *name);
#ifndef _KERNEL
bool nvlist_exists_descriptor(const nvlist_t *nvl, const char *name);
+bool nvlist_exists_descriptor_array(const nvlist_t *nvl, const char *name);
#endif
-bool nvlist_exists_binary(const nvlist_t *nvl, const char *name);
/*
* The nvlist_add functions add the given name/value pair.
@@ -127,15 +147,28 @@
void nvlist_add_number(nvlist_t *nvl, const char *name, uint64_t value);
void nvlist_add_string(nvlist_t *nvl, const char *name, const char *value);
void nvlist_add_stringf(nvlist_t *nvl, const char *name, const char *valuefmt, ...) __printflike(3, 4);
-#ifdef _VA_LIST_DECLARED
+#if !defined(_KERNEL) || defined(_VA_LIST_DECLARED)
void nvlist_add_stringv(nvlist_t *nvl, const char *name, const char *valuefmt, va_list valueap) __printflike(3, 0);
#endif
void nvlist_add_nvlist(nvlist_t *nvl, const char *name, const nvlist_t *value);
+void nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, size_t size);
+void nvlist_add_bool_array(nvlist_t *nvl, const char *name, const bool *value, size_t nitems);
+void nvlist_add_number_array(nvlist_t *nvl, const char *name, const uint64_t *value, size_t nitems);
+void nvlist_add_string_array(nvlist_t *nvl, const char *name, const char * const *value, size_t nitems);
+void nvlist_add_nvlist_array(nvlist_t *nvl, const char *name, const nvlist_t * const *value, size_t nitems);
#ifndef _KERNEL
void nvlist_add_descriptor(nvlist_t *nvl, const char *name, int value);
+void nvlist_add_descriptor_array(nvlist_t *nvl, const char *name, const int *value, size_t nitems);
#endif
-void nvlist_add_binary(nvlist_t *nvl, const char *name, const void *value, size_t size);
+void nvlist_append_bool_array(nvlist_t *nvl, const char *name, const bool value);
+void nvlist_append_number_array(nvlist_t *nvl, const char *name, const uint64_t value);
+void nvlist_append_string_array(nvlist_t *nvl, const char *name, const char * const value);
+void nvlist_append_nvlist_array(nvlist_t *nvl, const char *name, const nvlist_t * const value);
+#ifndef _KERNEL
+void nvlist_append_descriptor_array(nvlist_t *nvl, const char *name, int value);
+#endif
+
/*
* The nvlist_move functions add the given name/value pair.
* The functions consumes provided buffer.
@@ -143,10 +176,15 @@
void nvlist_move_string(nvlist_t *nvl, const char *name, char *value);
void nvlist_move_nvlist(nvlist_t *nvl, const char *name, nvlist_t *value);
+void nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size);
+void nvlist_move_bool_array(nvlist_t *nvl, const char *name, bool *value, size_t nitems);
+void nvlist_move_string_array(nvlist_t *nvl, const char *name, char **value, size_t nitems);
+void nvlist_move_nvlist_array(nvlist_t *nvl, const char *name, nvlist_t **value, size_t nitems);
+void nvlist_move_number_array(nvlist_t *nvl, const char *name, uint64_t *value, size_t nitems);
#ifndef _KERNEL
void nvlist_move_descriptor(nvlist_t *nvl, const char *name, int value);
+void nvlist_move_descriptor_array(nvlist_t *nvl, const char *name, int *value, size_t nitems);
#endif
-void nvlist_move_binary(nvlist_t *nvl, const char *name, void *value, size_t size);
/*
* The nvlist_get functions returns value associated with the given name.
@@ -154,14 +192,19 @@
* not be freed by the caller.
*/
-bool nvlist_get_bool(const nvlist_t *nvl, const char *name);
-uint64_t nvlist_get_number(const nvlist_t *nvl, const char *name);
-const char *nvlist_get_string(const nvlist_t *nvl, const char *name);
-const nvlist_t *nvlist_get_nvlist(const nvlist_t *nvl, const char *name);
+bool nvlist_get_bool(const nvlist_t *nvl, const char *name);
+uint64_t nvlist_get_number(const nvlist_t *nvl, const char *name);
+const char *nvlist_get_string(const nvlist_t *nvl, const char *name);
+const nvlist_t *nvlist_get_nvlist(const nvlist_t *nvl, const char *name);
+const void *nvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep);
+const bool *nvlist_get_bool_array(const nvlist_t *nvl, const char *name, size_t *nitemsp);
+const uint64_t *nvlist_get_number_array(const nvlist_t *nvl, const char *name, size_t *nitemsp);
+const char * const *nvlist_get_string_array(const nvlist_t *nvl, const char *name, size_t *nitemsp);
+const nvlist_t * const *nvlist_get_nvlist_array(const nvlist_t *nvl, const char *name, size_t *nitemsp);
#ifndef _KERNEL
-int nvlist_get_descriptor(const nvlist_t *nvl, const char *name);
+int nvlist_get_descriptor(const nvlist_t *nvl, const char *name);
+const int *nvlist_get_descriptor_array(const nvlist_t *nvl, const char *name, size_t *nitemsp);
#endif
-const void *nvlist_get_binary(const nvlist_t *nvl, const char *name, size_t *sizep);
/*
* The nvlist_take functions returns value associated with the given name and
@@ -169,14 +212,19 @@
* The caller is responsible for freeing received data.
*/
-bool nvlist_take_bool(nvlist_t *nvl, const char *name);
-uint64_t nvlist_take_number(nvlist_t *nvl, const char *name);
-char *nvlist_take_string(nvlist_t *nvl, const char *name);
-nvlist_t *nvlist_take_nvlist(nvlist_t *nvl, const char *name);
+bool nvlist_take_bool(nvlist_t *nvl, const char *name);
+uint64_t nvlist_take_number(nvlist_t *nvl, const char *name);
+char *nvlist_take_string(nvlist_t *nvl, const char *name);
+nvlist_t *nvlist_take_nvlist(nvlist_t *nvl, const char *name);
+void *nvlist_take_binary(nvlist_t *nvl, const char *name, size_t *sizep);
+bool *nvlist_take_bool_array(nvlist_t *nvl, const char *name, size_t *nitemsp);
+uint64_t *nvlist_take_number_array(nvlist_t *nvl, const char *name, size_t *nitemsp);
+char **nvlist_take_string_array(nvlist_t *nvl, const char *name, size_t *nitemsp);
+nvlist_t **nvlist_take_nvlist_array(nvlist_t *nvl, const char *name, size_t *nitemsp);
#ifndef _KERNEL
int nvlist_take_descriptor(nvlist_t *nvl, const char *name);
+int *nvlist_take_descriptor_array(nvlist_t *nvl, const char *name, size_t *nitemsp);
#endif
-void *nvlist_take_binary(nvlist_t *nvl, const char *name, size_t *sizep);
/*
* The nvlist_free functions removes the given name/value pair from the nvlist
@@ -191,10 +239,16 @@
void nvlist_free_number(nvlist_t *nvl, const char *name);
void nvlist_free_string(nvlist_t *nvl, const char *name);
void nvlist_free_nvlist(nvlist_t *nvl, const char *name);
+void nvlist_free_binary(nvlist_t *nvl, const char *name);
+void nvlist_free_bool_array(nvlist_t *nvl, const char *name);
+void nvlist_free_number_array(nvlist_t *nvl, const char *name);
+void nvlist_free_string_array(nvlist_t *nvl, const char *name);
+void nvlist_free_nvlist_array(nvlist_t *nvl, const char *name);
+void nvlist_free_binary_array(nvlist_t *nvl, const char *name);
#ifndef _KERNEL
void nvlist_free_descriptor(nvlist_t *nvl, const char *name);
+void nvlist_free_descriptor_array(nvlist_t *nvl, const char *name);
#endif
-void nvlist_free_binary(nvlist_t *nvl, const char *name);
__END_DECLS
Modified: trunk/sys/sys/osd.h
===================================================================
--- trunk/sys/sys/osd.h 2020-02-16 21:59:52 UTC (rev 12369)
+++ trunk/sys/sys/osd.h 2020-02-16 22:00:35 UTC (rev 12370)
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $FreeBSD: stable/10/sys/sys/osd.h 298834 2016-04-30 04:01:22Z jamie $
+ * $FreeBSD: stable/11/sys/sys/osd.h 331722 2018-03-29 02:50:57Z eadler $
*/
#ifndef _SYS_OSD_H_
@@ -60,10 +60,10 @@
void osd_deregister(u_int type, u_int slot);
int osd_set(u_int type, struct osd *osd, u_int slot, void *value);
-void *osd_reserve(u_int slot);
-int osd_set_reserved(u_int type, struct osd *osd, u_int slot, void *rsv,
+void **osd_reserve(u_int slot);
+int osd_set_reserved(u_int type, struct osd *osd, u_int slot, void **rsv,
void *value);
-void osd_free_reserved(void *rsv);
+void osd_free_reserved(void **rsv);
void *osd_get(u_int type, struct osd *osd, u_int slot);
void osd_del(u_int type, struct osd *osd, u_int slot);
int osd_call(u_int type, u_int method, void *obj, void *data);
More information about the Midnightbsd-cvs
mailing list