| /freebsd/sys/kern/ |
| H A D | kern_lockf.c | 1 /*- 2 * SPDX-License-Identifier: BSD-3-Clause 29 /*- 70 #include <sys/lock.h> 92 static MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); 172 * This structure is used to keep track of both local and remote lock 174 * the lock owner structure. Each possible lock owner (local proc for 179 * If a lock owner has a lock that blocks some other lock or a lock 180 * that is waiting for some other lock, it also has a vertex in the 184 * (s) locked by state->ls_lock [all …]
|
| H A D | kern_rwlock.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 29 * Machine independent bits of reader/writer lock implementation. 41 #include <sys/lock.h> 59 PMC_SOFT_DECLARE( , , lock, failed); 63 * Return the rwlock address when the lock cookie address is provided. 71 static void db_show_rwlock(const struct lock_object *lock); 73 static void assert_rw(const struct lock_object *lock, int what); 74 static void lock_rw(struct lock_object *lock, uintptr_t how); 75 static int trylock_rw(struct lock_object *lock, uintptr_t how); [all …]
|
| H A D | kern_sx.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 34 * deterministic lock granting behavior, so that slocks and xlocks are 37 * Priority propagation will not generally raise the priority of lock holders, 50 #include <sys/lock.h> 73 PMC_SOFT_DECLARE( , , lock, failed); 102 while (_giantcnt--) \ 109 * Returns true if an exclusive lock is recursed. It assumes 110 * curthread currently has an exclusive lock. 112 #define sx_recursed(sx) ((sx)->sx_recurse != 0) [all …]
|
| /freebsd/contrib/ofed/opensm/include/complib/ |
| H A D | cl_passivelock.h | 3 * Copyright (c) 2002-2010 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 38 * This file contains the passive lock, which synchronizes passive threads. 39 * The passive lock allows multiple readers to access a resource 41 * Several writer threads are allowed - but only one can write at a given time 58 /****h* Component Library/Passive Lock 60 * Passive Lock 63 * The Passive Lock provides synchronization between multiple threads that [all …]
|
| /freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/ |
| H A D | PthreadLockChecker.cpp | 1 //===--- PthreadLockChecker.cpp - Check for locking problems ---*- C++ -*--===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 10 // * PthreadLockChecker, a simple lock -> unlock checker. 18 //===----------------------------------------------------------------------===// 201 ProgramStateRef resolvePossiblyDestroyedMutex(ProgramStateRef state, 215 // Lock, Try-lock. 252 checkRegionChanges(ProgramStateRef State, const InvalidatedSymbols *Symbols, 256 void printState(raw_ostream &Out, ProgramStateRef State, const char *NL, 270 new BugType{CheckNames[CheckKind], "Double locking", "Lock checker"}); in initBugType() [all …]
|
| /freebsd/sys/ofed/drivers/infiniband/core/ |
| H A D | ib_iwcm.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 21 * - Redistributions of source code must retain the above 25 * - Redistributions in binary form must reproduce the above 41 #include <linux/dma-mapping.h> 75 index = -reason; in iwcm_reject_msg() 97 * The following services provide a mechanism for pre-allocating iwcm_work 98 * elements. The design pre-allocates them based on the cm_id type: 112 * be processed. cm_event_handler() returns -ENOMEM in this case. Its up 124 if (list_empty(&cm_id_priv->work_free_list)) in get_work() [all …]
|
| H A D | ib_multicast.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 16 * - Redistributions of source code must retain the above 20 * - Redistributions in binary form must reproduce the above 39 #include <linux/dma-mapping.h> 67 spinlock_t lock; member 105 spinlock_t lock; member 112 enum mcast_group_state state; member 124 enum mcast_state state; member 137 struct rb_node *node = port->table.rb_node; in mcast_find() [all …]
|
| H A D | ib_cm.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause OR GPL-2.0 4 * Copyright (c) 2004-2007 Intel Corporation. All rights reserved. 19 * - Redistributions of source code must retain the above 23 * - Redistributions in binary form must reproduce the above 40 #include <linux/dma-mapping.h> 55 #include <asm/atomic-long.h> 125 spinlock_t lock; member 138 /* Sync on cm change port state */ 269 spinlock_t lock; /* Do not acquire inside cm.lock */ member [all …]
|
| /freebsd/crypto/krb5/src/plugins/audit/test/ |
| H A D | au_test.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 2 /* plugins/audit/au_test.c - Test Audit plugin implementation */ 33 * This test is to verify the JSON-based KDC audit functionality. 37 #include <k5-int.h> 40 #include "k5-thread.h" 51 static k5_mutex_t lock = K5_MUTEX_PARTIAL_INITIALIZER; variable 60 k5_mutex_init(&lock); in open_au() 69 k5_mutex_destroy(&lock); in close_au() 73 /* Log KDC-start event. Returns 0 on success. */ 83 k5_mutex_lock(&lock); in j_kdc_start() [all …]
|
| /freebsd/contrib/ntp/libntp/lib/isc/ |
| H A D | task.c | 2 * Copyright (C) 2004-2012 Internet Systems Consortium, Inc. ("ISC") 3 * Copyright (C) 1998-2003 Internet Software Consortium. 107 isc_mutex_t lock; member 108 /* Locked by task lock. */ 109 task_state_t state; member 118 /* Locked by task manager lock. */ 127 #define TASK_SHUTTINGDOWN(t) (((t)->flags & TASK_F_SHUTTINGDOWN) \ 139 isc_mutex_t lock; member 144 /* Locked by task manager lock. */ 166 #define FINISHED(m) ((m)->exiting && EMPTY((m)->tasks)) [all …]
|
| /freebsd/sys/dev/cxgbe/tom/ |
| H A D | t4_tom_l2t.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 39 #include <sys/lock.h> 67 if (atomic_fetchadd_int(&e->refcnt, 1) == 0) /* 0 -> 1 transition */ in l2t_hold() 68 atomic_subtract_int(&d->nfree, 1); in l2t_hold() 74 u_int hash, half = d->l2t_siz in l2_hash() [all...] |
| /freebsd/sys/compat/linuxkpi/common/src/ |
| H A D | linux_schedule.c | 1 /*- 60 const char *wmesg, long timeout, int state) in linux_add_to_sleepqueue() argument 64 MPASS((state & ~(TASK_PARKED | TASK_NORMAL)) == 0); in linux_add_to_sleepqueue() 66 flags = SLEEPQ_SLEEP | ((state & TASK_INTERRUPTIBLE) != 0 ? in linux_add_to_sleepqueue() 75 if ((state & TASK_INTERRUPTIBLE) != 0) { in linux_add_to_sleepqueue() 77 ret = -sleepq_wait_sig(wchan, 0); in linux_add_to_sleepqueue() 79 ret = -sleepq_timedwait_sig(wchan, 0); in linux_add_to_sleepqueue() 85 ret = -sleepq_timedwait(wchan, 0); in linux_add_to_sleepqueue() 90 if (ret != 0 && ret != -EWOULDBLOCK) { in linux_add_to_sleepqueue() 92 ret = -ERESTARTSYS; in linux_add_to_sleepqueue() [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_mutex.h | 1 //===-- sanitizer_mutex.h ---------------------------------------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 //===----------------------------------------------------------------------===// 29 void Lock() SANITIZER_ACQUIRE() { in Lock() function 63 // Semaphore provides an OS-dependent way to park/unpark threads. 65 // (destruction-safety). 89 MutexUnchecked = -1, 91 // The leaf mutexes can be locked under any other non-leaf mutex, 93 MutexLeaf = -1, [all …]
|
| /freebsd/crypto/krb5/src/util/profile/ |
| H A D | prof_set.c | 1 /* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */ 3 * prof_set.c --- routines that expose the public interfaces for 32 if (profile->magic != PROF_MAGIC_PROFILE) in rw_setup() 35 /* If the profile has no files, create a memory-only data object. */ in rw_setup() 36 if (profile->first_file == NULL) { in rw_setup() 37 profile->first_file = profile_open_memory(); in rw_setup() 38 return (profile->first_file == NULL) ? ENOMEM : 0; in rw_setup() 41 file = profile->first_file; in rw_setup() 46 if (file->data->flags & PROFILE_FILE_DIRTY) { in rw_setup() 51 if ((file->data->flags & PROFILE_FILE_SHARED) != 0) { in rw_setup() [all …]
|
| /freebsd/contrib/libcxxrt/ |
| H A D | guard.cc | 2 * Copyright 2010-2012 PathScale, Inc. All rights reserved. 29 * guard.cc: Functions for thread-safe static initialisation. 37 * Statics that require initialisation are protected by a 64-bit value. Any 38 * platform that can do 32-bit atomic test and set operations can use this 39 * value as a low-overhead lock. Because statics (in most sane code) are 40 * accessed far more times than they are initialised, this lock implementation 57 // x86 and ARM are the most common little-endian CPUs, so let's have a 66 * The Itanium C++ ABI defines guard words that are 64-bit (32-bit on AArch32) 71 * On many 32-bit platforms, 64-bit atomics are unavailable (or slow) and so we 72 * treat the two halves of the 64-bit word as independent values and establish [all …]
|
| /freebsd/sys/compat/linuxkpi/common/include/linux/ |
| H A D | wait.h | 1 /*- 81 spinlock_t lock; member 96 long linux_wait_woken(wait_queue_t *wq, unsigned state, long timeout); 98 #define wait_woken(wq, state, timeout) \ argument 99 linux_wait_woken((wq), (state), (timeout)) 121 MTX_SYSINIT(name, &(name).lock, spin_lock_name("wqhead"), MTX_DEF) 124 mtx_init(&(wqh)->lock, spin_lock_name("wqhead"), \ 126 INIT_LIST_HEAD(&(wqh)->task_list); \ 153 * Returns -ERESTARTSYS for a signal, 0 if cond is false after timeout, 1 if 157 #define __wait_event_common(wqh, cond, timeout, state, lock) ({ \ argument [all …]
|
| /freebsd/sys/dev/cxgbe/ |
| H A D | t4_l2t.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 38 #include <sys/lock.h> 50 * Module locking notes: There is a RW lock protecting the L2 table as a 52 * under the protection of the table lock, individual entry changes happen 53 * while holding that entry's spinlock. The table lock nests outside the 54 * entry locks. Allocations of new entries take the table lock a [all...] |
| H A D | t4_smt.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 38 #include <sys/lock.h> 50 * Module locking notes: There is a RW lock protecting the SMAC table as a 52 * under the protection of the table lock, individual entry changes happen 53 * while holding that entry's spinlock. The table lock nests outside the 54 * entry locks. Allocations of new entries take the table lock as writers so 56 * take the table lock as readers so multiple entries can be updated in 59 * can change state or increment its ref count during allocation as both of 68 * Allocate a free SMT entry. Must be called with smt_data.lock held. [all …]
|
| /freebsd/contrib/llvm-project/libcxx/include/__stop_token/ |
| H A D | atomic_unique_lock.h | 1 // -*- C++ -*- 2 //===------ [all...] |
| /freebsd/share/man/man4/ |
| H A D | uart.4 | 1 .\"- 2 .\" SPDX-License-Identifier: BSD-2-Clause 53 .Bl -tag -compact -width 0x000000 72 EIA RS-232C (CCITT V.24) serial communications interface. 112 It contains the bus attachments and the low-level interrupt handler. 144 .Bl -bullet -compact 182 .Bl -tag -compact -offset "mmmm" -width "mmmm" 193 .Bl -tag -compact -offset "mmmm" -width "mmmm" 195 Invert the pulse (RS-232 logic low = ASSERT, high = CLEAR). 203 state change; not all hardware has this capability. [all …]
|
| /freebsd/contrib/unbound/contrib/ |
| H A D | unbound_munin_ | 5 # and use munin-node-configure (--suggest, --shell). 9 # To install; enable statistics and unbound-control in unbound.conf 10 # server: extended-statistics: yes 11 # statistics-cumulative: no 12 # statistics-interval: 0 13 # remote-control: control-enable: yes 14 # Run the command unbound-control-setup to generate the key files. 17 # unbound_conf - where the unbound.conf file is located. 18 # unbound_control - where to find unbound-control executable. 19 # spoof_warn - what level to warn about spoofing [all …]
|
| /freebsd/include/rpcsvc/ |
| H A D | nlm_prot.x | 2 * Network lock manager protocol definition 5 * protocol used between local lock manager and remote lock manager 15 * status of a call to the lock manager 58 netobj oh; /* identify owner of a lock */ 70 int state; /* specify local status monitor state */ member 134 long state; member 211 int state; /* specify local status monitor state */ member 245 int state; /* new state */ member 251 int32_t state; member 255 * Over-the-wire protocol used between the network lock managers [all …]
|
| /freebsd/crypto/openssl/providers/implementations/rands/ |
| H A D | drbg.c | 2 * Copyright 2011-2025 The OpenSSL Project Authors. All Rights Reserved. 27 * Support framework for NIST SP 800-90A DRBG 33 * instantiation and un-instantiate, and reuse within a new/free 36 * a much bigger deal than just re-setting an allocated resource.) 39 /* NIST SP 800-90A DRBG recommends the use of a personalization string. */ 50 * however we manage for ourselves when we take a lock or not on the basis 51 * of whether drbg->lock is present or not. 65 void *parent = drbg->parent; in ossl_drbg_lock_parent() 68 && drbg->parent_lock != NULL in ossl_drbg_lock_parent() 69 && !drbg->parent_lock(parent)) { in ossl_drbg_lock_parent() [all …]
|
| /freebsd/contrib/llvm-project/llvm/include/llvm/ExecutionEngine/Orc/ |
| H A D | ThreadSafeModule.h | 1 //===----------- ThreadSafeModule.h -- Layer interfaces ---------*- C++ -*-===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 11 //===----------------------------------------------------------------------===// 27 /// An LLVMContext together with an associated mutex that can be used to lock 31 struct State { struct 32 State(std::unique_ptr<LLVMContext> Ctx) : Ctx(std::move(Ctx)) {} in State() function 39 // RAII based lock for ThreadSafeContext. 40 class [[nodiscard]] Lock { 42 Lock(std::shared_ptr<State> S) : S(std::move(S)), L(this->S->Mutex) {} in Lock() argument [all …]
|
| /freebsd/sys/netinet/tcp_stacks/ |
| H A D | tcp_bbr.h | 1 /*- 2 * Copyright (c) 2016-2020 Netflix, Inc. 29 #define BBR_INITIAL_RTO 1000000 /* 1 second in micro-seconds */ 39 #define BBR_TLP 0x0080 /* segment sent as tail-loss-probe */ 43 * totaled into bbr->rc_ctl.rc_lost 70 uint8_t r_rtr_cnt:4, /* Retran count, index this -1 to get time 78 r_is_smallmap:1,/* Was logged as a small-map send-map item */ 80 r_bbr_state:5; /* The BBR state at send */ 118 * exit from probe-rtt */ 230 uint64_t sb_acc; /* For out/ack or t-o */ [all …]
|