/freebsd/sys/dev/sound/midi/ |
H A D | midiq.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 36 int h, t, s; \ 40 #define MIDIQ_INIT(head, buf, size) do { \ argument 41 (head).h=(head).t=0; \ 42 (head).s=size; \ 43 (head).b=buf; \ 46 #define MIDIQ_EMPTY(head) ((head).h == (head).t ) argument 48 #define MIDIQ_LENBASE(head) ((head).h - (head).t < 0 ? \ argument 49 (head).h - (head).t + (head).s : \ [all …]
|
/freebsd/tools/tools/drm/radeon/mkregtable/ |
H A D | mkregtable.c | 19 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) 21 * container_of - cast a member of a structure out to the containing structure 28 const typeof(((type *)0)->member)*__mptr = (ptr); \ 29 (type *)((char *)__mptr - offsetof(type, member)); }) 38 * using the generic single-entry routines. 52 list->next = list; in INIT_LIST_HEAD() 53 list->prev = list; in INIT_LIST_HEAD() 66 next->prev = new; in __list_add() 67 new->next = next; in __list_add() 68 new->prev = prev; in __list_add() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Demangle/ |
H A D | MicrosoftDemangle.h | 1 //===------------------------- MicrosoftDemangle.h --------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 21 // This memory allocator is extremely fast, but it doesn't call dtors 22 // for allocated objects. That means you can't use STL containers 23 // (such as std::vector) with this allocator. But it pays off -- 38 NewHead->Buf = new uint8_t[Capacity]; in addNode() 39 NewHead->Next = Head; in addNode() 40 NewHead->Capacity = Capacity; in addNode() 41 Head = NewHead; in addNode() [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/xray/ |
H A D | xray_segmented_array.h | 1 //===-- xray_segmented_array.h ---------------------------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 // Defines the implementation of a segmented array, with fixed-size segments 14 //===----------------------------------------------------------------------===// 33 template <class T> class Array { 43 // - Each segment will be on a cache-line address boundary (kCacheLineSize 46 // - The elements will be accessed through an aligned pointer, dependent on 47 // the alignment of T. 49 // - Each element is at least two-pointers worth from the beginning of the [all …]
|
/freebsd/sys/net/ |
H A D | radix.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 68 -1, -1, -1, -1, -1, -1, -1, -1, 69 -1, -1, -1, -1, -1, -1, -1, -1, 70 -1, -1, -1, -1, -1, -1, -1, -1, 71 -1, -1, -1, -1, -1, -1, -1, -1, 85 * of a node n have keys whose bits all agree up to position rn_bit - 1. 92 * bit-wise logical and of the key and mask to be the key. 104 * Similar logic shows that a non-normal mask m such that 106 * Thus, for each non-host route, we attach its mask to a list at an internal [all …]
|
H A D | radix.h | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 52 short rn_bit; /* bit offset; -1-index(netmask) */ 89 short rm_bit; /* bit offset; -1-index(netmask) */ 107 struct radix_head *head); 109 struct radix_head *head, struct radix_node nodes[]); 111 struct radix_head *head); 113 struct radix_head *head); 114 typedef int rn_walktree_t(struct radix_head *head, walktree_f_t *f, 116 typedef int rn_walktree_from_t(struct radix_head *head, [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/Target/AArch64/ |
H A D | AArch64ConditionalCompares.cpp | 1 //===-- AArch64ConditionalCompares.cpp --- CCMP formation for AArch64 -----===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 14 // if-conversion, and this pass should run immediately before the early 15 // if-conversion pass. 17 //===----------------------------------------------------------------------===// 41 #define DEBUG_TYPE "aarch64-ccmp" 46 "aarch64-ccmp-limit", cl::init(30), cl::Hidden, 49 // Stress testing mode - disable heuristics. 50 static cl::opt<bool> Stress("aarch64-stress-ccmp", cl::Hidden, [all …]
|
/freebsd/contrib/llvm-project/lldb/include/lldb/Utility/ |
H A D | Instrumentation.h | 1 //===-- Instrumentation.h -------- 26 stringify_append(llvm::raw_string_ostream & ss,const T & t) stringify_append() argument 32 stringify_append(llvm::raw_string_ostream & ss,const T & t) stringify_append() argument 37 stringify_append(llvm::raw_string_ostream & ss,T * t) stringify_append() argument 42 stringify_append(llvm::raw_string_ostream & ss,const T * t) stringify_append() argument 59 stringify_helper(llvm::raw_string_ostream & ss,const Head & head) stringify_helper() argument 64 stringify_helper(llvm::raw_string_ostream & ss,const Head & head,const Tail &...tail) stringify_helper() argument [all...] |
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/ |
H A D | ImmutableList.h | 1 //==--- ImmutableList.h - Immutable (functional) list interface --*- C++ -*-==// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 12 //===----------------------------------------------------------------------===// 25 template <typename T> class ImmutableListFactory; 27 template <typename T> 29 friend class ImmutableListFactory<T>; 31 T Head; variable 35 ImmutableListImpl(ElemT &&head, const ImmutableListImpl *tail = nullptr) 36 : Head(std::forward<ElemT>(head)), Tail(tail) {} in Head() argument [all …]
|
/freebsd/sys/contrib/ck/include/ |
H A D | ck_stack.h | 2 * Copyright 2009-2015 Samy Al Bahra. 41 struct ck_stack_entry *head; member 58 stack = ck_pr_load_ptr(&target->head); in ck_stack_push_upmc() 59 entry->next = stack; in ck_stack_push_upmc() 62 while (ck_pr_cas_ptr_value(&target->head, stack, entry, &stack) == false) { in ck_stack_push_upmc() 63 entry->next = stack; in ck_stack_push_upmc() 82 stack = ck_pr_load_ptr(&target->head); in ck_stack_trypush_upmc() 83 entry->next = stack; in ck_stack_trypush_upmc() 86 return ck_pr_cas_ptr(&target->head, stack, entry); in ck_stack_trypush_upmc() 100 entry = ck_pr_load_ptr(&target->head); in ck_stack_pop_upmc() [all …]
|
H A D | ck_fifo.h | 2 * Copyright 2010-2015 Samy Al Bahra. 47 struct ck_fifo_spsc_entry *head; member 48 char pad[CK_MD_CACHELINE - sizeof(struct ck_fifo_spsc_entry *) - sizeof(ck_spinlock_t)]; 60 return ck_spinlock_trylock(&fifo->m_tail); in ck_fifo_spsc_enqueue_trylock() 67 ck_spinlock_lock(&fifo->m_tail); in ck_fifo_spsc_enqueue_lock() 75 ck_spinlock_unlock(&fifo->m_tail); in ck_fifo_spsc_enqueue_unlock() 83 return ck_spinlock_trylock(&fifo->m_head); in ck_fifo_spsc_dequeue_trylock() 90 ck_spinlock_lock(&fifo->m_head); in ck_fifo_spsc_dequeue_lock() 98 ck_spinlock_unlock(&fifo->m_head); in ck_fifo_spsc_dequeue_unlock() 106 ck_spinlock_init(&fifo->m_head); in ck_fifo_spsc_init() [all …]
|
H A D | ck_hp_fifo.h | 2 * Copyright 2010-2015 Samy Al Bahra. 54 struct ck_hp_fifo_entry *head; member 63 fifo->head = fifo->tail = stub; in ck_hp_fifo_init() 64 stub->next = NULL; in ck_hp_fifo_init() 72 *stub = fifo->head; in ck_hp_fifo_deinit() 73 fifo->head = fifo->tail = NULL; in ck_hp_fifo_deinit() 85 entry->value = value; in ck_hp_fifo_enqueue_mpmc() 86 entry->next = NULL; in ck_hp_fifo_enqueue_mpmc() 90 tail = ck_pr_load_ptr(&fifo->tail); in ck_hp_fifo_enqueue_mpmc() 92 if (tail != ck_pr_load_ptr(&fifo->tail)) in ck_hp_fifo_enqueue_mpmc() [all …]
|
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/ |
H A D | EarlyIfConversion.cpp | 1 //===-- EarlyIfConversion.cpp - If-conversion on SSA form machine code ----===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 9 // Early if-conversion is for out-of-order CPUs that don't have a lot of 16 //===----------------------------------------------------------------------===// 43 #define DEBUG_TYPE "early-ifcvt" 48 BlockInstrLimit("early-ifcvt-limit", cl::init(30), cl::Hidden, 51 // Stress testing mode - disable heuristics. 52 static cl::opt<bool> Stress("stress-early-ifcvt", cl::Hidden, 60 //===----------------------------------------------------------------------===// [all …]
|
/freebsd/contrib/elftoolchain/common/ |
H A D | _elftc.h | 1 /*- 26 * $Id: _elftc.h 3446 2016-05-03 01:31:17Z emaste $ 41 #define offsetof(T, M) ((int) &((T*) 0) -> M) argument 44 /* --QUEUE-MACROS-- [[ */ 80 #define LIST_FOREACH_SAFE(var, head, field, tvar) \ argument 81 for ((var) = LIST_FIRST((head)); \ 87 #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ argument 88 for ((var) = SLIST_FIRST((head)); \ 96 *(head1)->stqh_last = (head2)->stqh_first; \ 97 (head1)->stqh_last = (head2)->stqh_last; \ [all …]
|
/freebsd/sbin/routed/ |
H A D | radix.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 49 #define rn_masktop (mask_rnhead->rnh_treetop) 56 struct radix_node_head *head, struct radix_node treenodes[2]); 57 static struct radix_node *rn_match(void *v_arg, struct radix_node_head *head); 63 * of a node n have keys whose bits all agree up to position rn_b - 1. 70 * bit-wise logical and of the key and mask to be the key. 82 * Similar logic shows that a non-normal mask m such that 84 * Thus, for each non-host route, we attach its mask to a list at an internal 87 * The present version of the code makes use of normal routes in short- [all …]
|
/freebsd/sbin/rcorder/ |
H A D | rcorder.c | 5 /*- 6 * SPDX-License-Identifier: BSD-2-Clause 66 #define REQUIRE_LEN (sizeof(REQUIRE_STR) - 1) 68 #define REQUIRES_LEN (sizeof(REQUIRES_STR) - 1) 70 #define PROVIDE_LEN (sizeof(PROVIDE_STR) - 1) 72 #define PROVIDES_LEN (sizeof(PROVIDES_STR) - 1) 74 #define BEFORE_LEN (sizeof(BEFORE_STR) - 1) 76 #define KEYWORD_LEN (sizeof(KEYWORD_STR) - 1) 78 #define KEYWORDS_LEN (sizeof(KEYWORDS_STR) - 1) 104 flag head; member [all …]
|
/freebsd/sbin/fsck_msdosfs/ |
H A D | dir.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 68 * We don't use bitfields because we don't know how compilers for 86 #define DD_YEAR_MASK 0xFE00 /* year - 1980 */ 117 freede = de->next; in newDosDirEntry() 124 de->next = freede; in freeDosDirEntry() 142 freedt = dt->next; in newDirTodo() 149 dt->next = freedt; in freeDirTodo() 169 *--cp = '\0'; in fullpath() 172 np = dir->lname[0] ? dir->lname : dir->name; in fullpath() [all …]
|
/freebsd/contrib/mandoc/ |
H A D | compat_fts.c | 4 /*- 65 #define CLR(opt) (sp->fts_options &= ~(opt)) 66 #define ISSET(opt) (sp->fts_options & (opt)) 67 #define SET(opt) (sp->fts_options |= (opt)) 93 sp->fts_compar = compar; in fts_open() 94 sp->fts_options = options; in fts_open() 106 parent->fts_level = FTS_ROOTPARENTLEVEL; in fts_open() 112 p->fts_level = FTS_ROOTLEVEL; in fts_open() 113 p->fts_parent = parent; in fts_open() 114 p->fts_accpath = p->fts_name; in fts_open() [all …]
|
/freebsd/share/man/man3/ |
H A D | tree.3 | 105 .Nd "implementations of splay and rank-balanced (wavl) trees" 113 .Fn SPLAY_INITIALIZER "SPLAY_HEAD *head" 114 .Fn SPLAY_ROOT "SPLAY_HEAD *head" 116 .Fn SPLAY_EMPTY "SPLAY_HEAD *head" 118 .Fn SPLAY_NEXT NAME "SPLAY_HEAD *head" "struct TYPE *elm" 120 .Fn SPLAY_MIN NAME "SPLAY_HEAD *head" 122 .Fn SPLAY_MAX NAME "SPLAY_HEAD *head" 124 .Fn SPLAY_FIND NAME "SPLAY_HEAD *head" "struct TYPE *elm" 129 .Fn SPLAY_FOREACH VARNAME NAME "SPLAY_HEAD *head" 131 .Fn SPLAY_INIT "SPLAY_HEAD *head" [all …]
|
/freebsd/usr.bin/rpcinfo/ |
H A D | rpcinfo.c | 33 * Copyright (c) 1986 - 1991 by Sun Microsystems, Inc. 43 * We are for now defining PORTMAP here. It doesn't even compile 53 * all the portmapper specific options such as -u, -t, -p become void. 96 #define RPCBDUMP_SHORT 9 /* dump rpcbind registrations - short version */ 167 while ((c = getopt(argc, argv, "a:bdlmn:pstT:u")) != -1) { 169 while ((c = getopt(argc, argv, "a:bdlmn:sT:")) != -1) { 180 case 't': 242 case 'T': 255 if (argc - optind > 1) 266 pmapdump(argc - optind, argv + optind); [all …]
|
/freebsd/usr.sbin/makefs/cd9660/ |
H A D | iso9660_rrip.c | 3 /*- 4 * SPDX-License-Identifier: BSD-2-Clause 7 * Perez-Rathke and Ram Vedam. All rights reserved. 10 * Alan Perez-Rathke and Ram Vedam. 23 * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM ``AS IS'' AND ANY EXPRESS OR 27 * GABRYS, ALAN PEREZ-RATHKE AND RAM VEDAM BE LIABLE FOR ANY DIRECT, INDIRECT, 65 if (!(node->type & CD9660_TYPE_DOT) && in cd9660_susp_initialize() 66 !(node->type & CD9660_TYPE_DOTDOT)) in cd9660_susp_initialize() 67 TAILQ_INIT(&(node->head)); in cd9660_susp_initialize() 68 if (node->dot_record != 0) in cd9660_susp_initialize() [all …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | Registry.h | 1 //=== Registry.h - Linker-supported plugin registries -----------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 //===----------------------------------------------------------------------===// 25 /// no-argument constructor. 26 template <typename T> 29 std::unique_ptr<T> (*Ctor)(); 32 SimpleRegistryEntry(StringRef N, StringRef D, std::unique_ptr<T> (*C)()) in SimpleRegistryEntry() 37 std::unique_ptr<T> instantiate() const { return Ctor(); } in instantiate() 43 template <typename T> [all …]
|
/freebsd/contrib/atf/atf-c/ |
H A D | macros_test.c | 26 #include "atf-c/macros.h" 40 #include <atf-c.h> 42 #include "atf-c/detail/fs.h" 43 #include "atf-c/detail/process.h" 44 #include "atf-c/detail/test_helpers.h" 45 #include "atf-c/detail/text.h" 47 /* --------------------------------------------------------------------- 49 * --------------------------------------------------------------------- */ 59 O_CREAT | O_WRONLY | O_TRUNC, 0644) != -1); in create_ctl_file() 79 init_and_run_h_tc(const char *name, void (*head)(atf_tc_t *), in init_and_run_h_tc() [all …]
|
/freebsd/usr.sbin/ppp/ |
H A D | cbcp.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 65 cbcp->required = 0; in cbcp_Init() 66 cbcp->fsm.state = CBCP_CLOSED; in cbcp_Init() 67 cbcp->fsm.id = 0; in cbcp_Init() 68 cbcp->fsm.delay = 0; in cbcp_Init() 69 *cbcp->fsm.phone = '\0'; in cbcp_Init() 70 memset(&cbcp->fsm.timer, '\0', sizeof cbcp->fsm.timer); in cbcp_Init() 71 cbcp->p = p; in cbcp_Init() 83 timer_Stop(&cbcp->fsm.timer); in cbcp_Timeout() [all …]
|
/freebsd/sys/dev/netmap/ |
H A D | netmap.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (C) 2011-2014 Matteo Landi 5 * Copyright (C) 2011-2016 Luigi Rizzo 6 * Copyright (C) 2011-2016 Giuseppe Lettieri 7 * Copyright (C) 2011-2016 Vincenzo Maffione 41 * i.e. user-accessible copies of the interface's queues. 77 - a spinlock on each ring, to handle producer/consumer races on 84 - an atomic variable to guarantee that there is at most one 96 - *xsync() should be protected against initializations of the card. [all …]
|