| /freebsd/sys/contrib/openzfs/module/avl/ |
| H A D | avl.c | 1 // SPDX-License-Identifier: CDDL-1.0 10 * or https://opensource.org/licenses/CDDL-1.0. 33 * AVL - generic AVL tree implementation for kernel use 39 * any given node, the left and right subtrees are allowed to differ in height 47 * rotations, which bring unbalanced subtrees back into the semi-balanced state. 51 * - The AVL specific data structures are physically embedded as fields 56 * - Since the AVL data is always embedded in other structures, there is 62 * - The implementation uses iteration instead of explicit recursion, 67 * - The left/right children pointers of a node are in an array. 77 * int left_heavy; // -1 when left subtree is taller at some node, [all …]
|
| /freebsd/contrib/unbound/util/ |
| H A D | rbtree.c | 2 * rbtree.c -- generic red black tree 4 * Copyright (c) 2001-2007, NLnet Labs. All rights reserved. 47 /** Node colour black */ 49 /** Node colour red */ 52 /** the NULL node, global alloc */ 62 static void rbtree_rotate_left(rbtree_type *rbtree, rbnode_type *node); 64 static void rbtree_rotate_right(rbtree_type *rbtree, rbnode_type *node); 65 /** Fixup node colours when insert happened */ 66 static void rbtree_insert_fixup(rbtree_type *rbtree, rbnode_type *node); 67 /** Fixup node colours when delete happened */ [all …]
|
| /freebsd/contrib/ldns/ |
| H A D | rbtree.c | 2 * rbtree.c -- generic red black tree 6 * Copyright (c) 2001-2008, NLnet Labs. All rights reserved. 49 /** Node colour black */ 51 /** Node colour red */ 54 /** the NULL node, global alloc */ 65 static void ldns_rbtree_rotate_left(ldns_rbtree_t *rbtree, ldns_rbnode_t *node); 67 static void ldns_rbtree_rotate_right(ldns_rbtree_t *rbtree, ldns_rbnode_t *node); 68 /** Fixup node colours when insert happened */ 69 static void ldns_rbtree_insert_fixup(ldns_rbtree_t *rbtree, ldns_rbnode_t *node); 70 /** Fixup node colours when delete happened */ [all …]
|
| /freebsd/sys/dev/ofw/ |
| H A D | ofw_graph.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 47 ofw_graph_get_port_by_idx(phandle_t node, uint32_t idx) in ofw_graph_get_port_by_idx() argument 49 phandle_t ports, child; in ofw_graph_get_port_by_idx() local 53 /* First try to find a port@<idx> node */ in ofw_graph_get_port_by_idx() 55 child = ofw_bus_find_child(node, portnode); in ofw_graph_get_port_by_idx() 56 if (child != 0) in ofw_graph_get_port_by_idx() 57 return (child); in ofw_graph_get_port_by_idx() 62 child = ofw_bus_find_child(node, portnode); in ofw_graph_get_port_by_idx() 63 if (child != 0) in ofw_graph_get_port_by_idx() [all …]
|
| H A D | ofw_bus_subr.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2001 - 2003 by Thomas Moestl <tmm@FreeBSD.org>. 53 ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *obd, phandle_t node) in ofw_bus_gen_setup_devinfo() argument 59 if ((OF_getprop_alloc(node, "name", (void **)&obd->obd_name)) == -1) in ofw_bus_gen_setup_devinfo() 61 OF_getprop_alloc(node, "compatible", (void **)&obd->obd_compat); in ofw_bus_gen_setup_devinfo() 62 OF_getprop_alloc(node, "device_type", (void **)&obd->obd_type); in ofw_bus_gen_setup_devinfo() 63 OF_getprop_alloc(node, "model", (void **)&obd->obd_model); in ofw_bus_gen_setup_devinfo() 64 OF_getprop_alloc(node, "status", (void **)&obd->obd_status); in ofw_bus_gen_setup_devinfo() 65 obd->obd_node = node; in ofw_bus_gen_setup_devinfo() [all …]
|
| /freebsd/contrib/llvm-project/llvm/lib/WindowsManifest/ |
| H A D | WindowsManifestMerger.cpp | 1 //===-- WindowsManifestMerger.cpp ------------------------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===---------------------------------------------------------------------===// 11 //===---------------------------------------------------------------------===// 60 {"urn:schemas-microsoft-com:asm.v1", "ms_asmv1"}, 61 {"urn:schemas-microsoft-com:asm.v2", "ms_asmv2"}, 62 {"urn:schemas-microsoft-com:asm.v3", "ms_asmv3"}, 65 {"urn:schemas-microsoft-com:compatibility.v1", "ms_compatibilityv1"}}; 88 for (xmlNodePtr Child = Parent->children; Child; Child = Child->next) { in getChildWithName() local 89 if (xmlStringsEqual(Child->name, ElementName)) { in getChildWithName() [all …]
|
| /freebsd/sys/kern/ |
| H A D | subr_pctrie.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 33 * Path-compressed radix trie implementation. 36 * - Size of the nodes should be as small as possible but still big enough 41 * - There is not a huge bias toward the number of lookup operations over 45 * - On average not many nodes are expected to be fully populated, hence 84 smr_pctnode_t pn_parent; /* Parent node. */ 85 smr_pctnode_t pn_child[PCTRIE_COUNT]; /* Child nodes. */ 89 * Map index to an array position for the children of node, 92 pctrie_slot(struct pctrie_node *node, uint64_t index) in pctrie_slot() argument [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/Tooling/Syntax/ |
| H A D | Tree.cpp | 1 //===- Tree.cpp -----------------------------------------------*- C++ -*-=====// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 19 static void traverse(const syntax::Node *N, in traverse() 20 llvm::function_ref<void(const syntax::Node *)> Visit) { in traverse() 22 for (const syntax::Node &C : T->getChildren()) in traverse() 27 static void traverse(syntax::Node *N, in traverse() 28 llvm::function_ref<void(syntax::Node *)> Visit) { in traverse() 29 traverse(static_cast<const syntax::Node *>(N), [&](const syntax::Node *N) { in traverse() 30 Visit(const_cast<syntax::Node *>(N)); in traverse() [all …]
|
| /freebsd/sys/dev/fdt/ |
| H A D | simplebus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 52 static void simplebus_probe_nomatch(device_t bus, device_t child); 53 static int simplebus_print_child(device_t bus, device_t child); 57 device_t child); 59 static ssize_t simplebus_get_property(device_t bus, device_t child, 66 device_t child); 154 * XXX We should attach only to pure' compatible = "simple-bus"', in simplebus_probe() 157 * "syscon", "simple-bus"; is handled by fdt/syscon driver in simplebus_probe() 158 * "simple-mfd", "simple-bus"; is handled by fdt/simple-mfd driver in simplebus_probe() [all …]
|
| H A D | fdt_common.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2009-2014 The FreeBSD Foundation 66 fdt_get_range_by_busaddr(phandle_t node, u_long addr, u_long *base, in fdt_get_range_by_busaddr() argument 74 if (node == 0) { in fdt_get_range_by_busaddr() 80 if ((fdt_addrsize_cells(node, &addr_cells, &size_cells)) != 0) in fdt_get_range_by_busaddr() 85 par_addr_cells = fdt_parent_addr_cells(node); in fdt_get_range_by_busaddr() 90 len = OF_getproplen(node, "ranges"); in fdt_get_range_by_busaddr() 92 return (-1); in fdt_get_range_by_busaddr() 96 return (fdt_get_range_by_busaddr(OF_parent(node), addr, in fdt_get_range_by_busaddr() [all …]
|
| /freebsd/contrib/googletest/googletest/test/ |
| H A D | gtest_xml_test_utils.py | 33 from xml.dom import minidom, Node 45 Asserts that actual_node (a DOM node object) is equivalent to 46 expected_node (another DOM node object), in that either both of 54 convertible to a floating-point number and any attribute named 55 "type_param" which only has to be non-empty. 56 * It has an equivalent set of child nodes (including elements and 62 expected_node: expected DOM node object 63 actual_node: actual DOM node object 66 if expected_node.nodeType == Node.CDATA_SECTION_NODE: 67 self.assertEqual(Node.CDATA_SECTION_NODE, actual_node.nodeType) [all …]
|
| /freebsd/contrib/ofed/libibverbs/ |
| H A D | memory.c | 15 * - Redistributions of source code must retain the above 19 * - Redistributions in binary form must reproduce the above 107 n = sscanf(buf, "%" SCNxPTR "-%" SCNxPTR, &range_start, &range_end); in get_page_size() 148 tmp_aligned = (void *) ((uintptr_t) tmp & ~(size - 1)); in ibv_fork_init() 166 mm_root->parent = NULL; in ibv_fork_init() 167 mm_root->left = NULL; in ibv_fork_init() 168 mm_root->right = NULL; in ibv_fork_init() 169 mm_root->color = IBV_BLACK; in ibv_fork_init() 170 mm_root->start = 0; in ibv_fork_init() 171 mm_root->end = UINTPTR_MAX; in ibv_fork_init() [all …]
|
| /freebsd/contrib/wpa/src/utils/ |
| H A D | xml-utils.c | 3 * Copyright (c) 2012-2013, Qualcomm Atheros, Inc. 12 #include "xml-utils.h" 19 xml_node_t *node; in get_node_uri_iter() local 26 node = root; in get_node_uri_iter() 27 xml_node_for_each_sibling(ctx, node) { in get_node_uri_iter() 28 xml_node_for_each_check(ctx, node); in get_node_uri_iter() 29 name = xml_node_get_localname(ctx, node); in get_node_uri_iter() 34 if (node == NULL) in get_node_uri_iter() 38 return get_node_uri_iter(ctx, xml_node_first_child(ctx, node), in get_node_uri_iter() 42 return node; in get_node_uri_iter() [all …]
|
| /freebsd/usr.sbin/autofs/ |
| H A D | common.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 67 static void parse_master_yyin(struct node *root, const char *master); 68 static void parse_map_yyin(struct node *parent, const char *map, 102 s1last = s1[strlen(s1) - 1]; in concat() 109 * it - skip the latter; otherwise concatenating "/" in concat() 160 struct node * 163 struct node *n; in node_new_root() 169 n->n_key = checked_strdup("/"); in node_new_root() 170 n->n_options = checked_strdup(""); in node_new_root() [all …]
|
| /freebsd/sys/netpfil/ipfilter/netinet/ |
| H A D | ipf_rb.h | 38 rotate_left(struct _n##_rb_head *head, _t *node) \ 42 parent = node->_f.parent; \ 43 tmp1 = node->_f.right; \ 44 tmp2 = tmp1->_f.left; \ 45 node->_f.right = tmp2; \ 47 tmp2->_f.parent = node; \ 49 head->top._f.right = tmp1; \ 50 else if (parent->_f.right == node) \ 51 parent->_f.right = tmp1; \ 53 parent->_f.left = tmp1; \ [all …]
|
| /freebsd/sys/dev/pci/ |
| H A D | pci_host_generic_fdt.c | 1 /*- 95 if (ofw_bus_is_compatible(dev, "pci-host-ecam-generic")) { in generic_pcie_fdt_probe() 111 phandle_t node; in pci_host_generic_setup_fdt() local 116 STAILQ_INIT(&sc->pci_ofw_devlist); in pci_host_generic_setup_fdt() 120 device_printf(dev, "parsing FDT for ECAM%d:\n", sc->base.ecam); in pci_host_generic_setup_fdt() 121 if (parse_pci_mem_ranges(dev, &sc->base)) in pci_host_generic_setup_fdt() 128 node = ofw_bus_get_node(dev); in pci_host_generic_setup_fdt() 129 if (sc->base.coherent == 0) { in pci_host_generic_setup_fdt() 130 sc->base.coherent = OF_hasprop(node, "dma-coherent"); in pci_host_generic_setup_fdt() 133 device_printf(dev, "Bus is%s cache-coherent\n", in pci_host_generic_setup_fdt() [all …]
|
| /freebsd/sys/arm64/cavium/ |
| H A D | thunder_pcie_fdt.c | 107 thunder_pcie_ofw_get_devinfo(device_t bus __unused, device_t child) in thunder_pcie_ofw_get_devinfo() argument 111 di = device_get_ivars(child); in thunder_pcie_ofw_get_devinfo() 112 return (&di->di_dinfo); in thunder_pcie_ofw_get_devinfo() 116 get_addr_size_cells(phandle_t node, pcell_t *addr_cells, pcell_t *size_cells) in get_addr_size_cells() argument 121 OF_getencprop(node, "#address-cells", addr_cells, sizeof(*addr_cells)); in get_addr_size_cells() 125 OF_getencprop(node, "#size-cells", size_cells, sizeof(*size_cells)); in get_addr_size_cells() 132 device_t child; in thunder_pcie_ofw_bus_attach() local 133 phandle_t parent, node; in thunder_pcie_ofw_bus_attach() local 140 for (node = OF_child(parent); node > 0; node = OF_peer(node)) { in thunder_pcie_ofw_bus_attach() 143 if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node) != 0) { in thunder_pcie_ofw_bus_attach() [all …]
|
| /freebsd/sys/contrib/device-tree/Bindings/pinctrl/ |
| H A D | samsung-pinctrl.txt | 6 on-chip controllers onto these pads. 9 - compatible: should be one of the following. 10 - "samsung,s3c2412-pinctrl": for S3C2412-compatible pin-controller, 11 - "samsung,s3c2416-pinctrl": for S3C2416-compatible pin-controller, 12 - "samsung,s3c2440-pinctrl": for S3C2440-compatible pin-controller, 13 - "samsung,s3c2450-pinctrl": for S3C2450-compatible pin-controller, 14 - "samsung,s3c64xx-pinctrl": for S3C64xx-compatible pin-controller, 15 - "samsung,s5pv210-pinctrl": for S5PV210-compatible pin-controller, 16 - "samsung,exynos3250-pinctrl": for Exynos3250 compatible pin-controller. 17 - "samsung,exynos4210-pinctrl": for Exynos4210 compatible pin-controller. [all …]
|
| /freebsd/sys/dev/dpaa/ |
| H A D | bman_fdt.c | 1 /*- 2 * Copyright (c) 2011-2012 Semihalf. 85 #define BMAN_PORT_DEVSTR "Freescale Buffer Manager - Portals" 100 "bman-portals", 109 get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep) in get_addr_props() argument 114 OF_getencprop(node, "#address-cells", addrp, sizeof(*addrp)); in get_addr_props() 115 OF_getencprop(node, "#size-cells", sizep, sizeof(*sizep)); in get_addr_props() 121 phandle_t node; in bman_portals_fdt_probe() local 123 if (ofw_bus_is_compatible(dev, "simple-bus")) { in bman_portals_fdt_probe() 124 node = ofw_bus_get_node(dev); in bman_portals_fdt_probe() [all …]
|
| H A D | qman_fdt.c | 1 /*- 2 * Copyright (c) 2011-2012 Semihalf. 85 #define QMAN_PORT_DEVSTR "Freescale Queue Manager - Portals" 100 "qman-portals", 109 get_addr_props(phandle_t node, uint32_t *addrp, uint32_t *sizep) in get_addr_props() argument 114 OF_getencprop(node, "#address-cells", addrp, sizeof(*addrp)); in get_addr_props() 115 OF_getencprop(node, "#size-cells", sizep, sizeof(*sizep)); in get_addr_props() 121 phandle_t node; in qman_portals_fdt_probe() local 123 if (ofw_bus_is_compatible(dev, "simple-bus")) { in qman_portals_fdt_probe() 124 node = ofw_bus_get_node(dev); in qman_portals_fdt_probe() [all …]
|
| /freebsd/sys/contrib/dev/acpica/components/namespace/ |
| H A D | nsalloc.c | 3 * Module Name: nsalloc - Namespace allocation and deletion utilities 11 * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. 28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 104 * re-exports any such software from a foreign destination, Licensee shall 105 * ensure that the distribution and export/re-export of the software is in 108 * any of its subsidiaries will export/re-export any technical data, process, 130 * 3. Neither the names of the above-listed copyright holders nor the names 165 * PARAMETERS: Name - Name of the new node (4 char ACPI name) 167 * RETURN: New namespace node (Null on failure) 169 * DESCRIPTION: Create a namespace node [all …]
|
| /freebsd/contrib/ofed/opensm/include/opensm/ |
| H A D | osm_mtree.h | 2 * Copyright (c) 2004-2009 Voltaire, Inc. All rights reserved. 3 * Copyright (c) 2002-2005 Mellanox Technologies LTD. All rights reserved. 4 * Copyright (c) 1996-2003 Intel Corporation. All rights reserved. 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 60 #define OSM_MTREE_LEAF ((void*)-1) 68 * in which each node in the tree represents a switch, and may have a 88 * The MTree Node object encapsulates the information needed by the 91 * The MTree Node object is not thread safe, thus callers must provide 112 * Pointer to the switch represented by this tree node. [all …]
|
| /freebsd/contrib/wpa/hs20/client/ |
| H A D | osu_client.c | 3 * Copyright (c) 2012-2014, Qualcomm Atheros, Inc. 19 #include "utils/xml-utils.h" 20 #include "utils/http-utils.h" 42 if (!ctx->result_file) in write_result() 45 f = fopen(ctx->result_file, "w"); in write_result() 62 if (!ctx->summary_file) in write_summary() 65 f = fopen(ctx->summary_file, "a"); in write_summary() 78 xml_node_t *node) in debug_dump_node() argument 80 char *str = xml_node_to_str(ctx->xml, node); in debug_dump_node() 100 if (*pos == '-' || *pos == '.' || *pos == '_') in valid_fqdn() [all …]
|
| /freebsd/sys/dev/gpio/ |
| H A D | ofw_gpiobus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 71 rv = ofw_bus_parse_xref_list_alloc(cnode, prop_name, "#gpio-cells", in gpio_pin_get_by_ofw_propidx() 109 gpio_pin_get_by_ofw_idx(device_t consumer, phandle_t node, in gpio_pin_get_by_ofw_idx() argument 113 return (gpio_pin_get_by_ofw_propidx(consumer, node, "gpios", idx, pin)); in gpio_pin_get_by_ofw_idx() 117 gpio_pin_get_by_ofw_property(device_t consumer, phandle_t node, in gpio_pin_get_by_ofw_property() argument 121 return (gpio_pin_get_by_ofw_propidx(consumer, node, name, 0, pin)); in gpio_pin_get_by_ofw_property() 125 gpio_pin_get_by_ofw_name(device_t consumer, phandle_t node, in gpio_pin_get_by_ofw_name() argument 130 KASSERT(consumer != NULL && node > 0, in gpio_pin_get_by_ofw_name() 131 ("both consumer and node required")); in gpio_pin_get_by_ofw_name() [all …]
|
| /freebsd/sys/dev/pwm/ |
| H A D | ofw_pwmbus.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 59 device_t child; in ofw_pwmbus_add_child() local 67 if ((child = device_add_child_ordered(dev, order, name, unit)) == NULL) { in ofw_pwmbus_add_child() 72 ivars->devinfo.obd_node = -1; in ofw_pwmbus_add_child() 73 device_set_ivars(child, ivars); in ofw_pwmbus_add_child() 75 return (child); in ofw_pwmbus_add_child() 79 ofw_pwmbus_child_deleted(device_t dev, device_t child) in ofw_pwmbus_child_deleted() argument 83 ivars = device_get_ivars(child); in ofw_pwmbus_child_deleted() 85 ofw_bus_gen_destroy_devinfo(&ivars->devinfo); in ofw_pwmbus_child_deleted() [all …]
|