| /freebsd/share/man/man9/ |
| H A D | buf_ring.9 | 40 .Nd multi-producer, {single, multi}-consumer lock-less ring buffer 65 functions provide a lock-less multi-producer and lock-less multi-consumer as 66 well as single-consumer ring buffer. 90 function is a multi-consumer safe way of dequeueing elements from a buf_ring. 94 function is a single-consumer interface to dequeue elements - requiring 95 the user to serialize accesses with a lock.
|
| H A D | drbr.9 | 65 dequeue to be done without any per-packet atomics as it is protected 66 by the driver's tx queue lock. 71 will assert that the tx queue lock is held when it is called. 119 Provided the tx queue lock is held there will not be less.
|
| H A D | g_access.9 | 62 No-operation is not permitted 72 .Va gp->access ) . 74 The topology lock has to be held. 86 are less than or equal to 0. 90 .Bd -literal -offset indent 117 * Don't hold topology lock while reading. 120 ptr = g_read_data(cp, 0, pp->sectorsize, &error); 129 g_access(cp, -1, 0, 0); 138 .Bl -tag -width Er 161 .An -nosplit
|
| H A D | sleep.9 | 87 handle event-based thread blocking. 188 and the locking primitive sleep routines specify an additional lock 190 The lock will be released before sleeping and reacquired 197 the lock will not be reacquired before returning. 198 The lock is used to ensure that a condition can be checked atomically, 210 mutex may be specified as the lock to drop. 216 either a lock should be used to protect against races, 230 reference a default, i.e. non-spin, mutex. 304 except that it makes runnable last thread on the queue (sleeping less), 314 is based on an absolute real-time clock value, [all …]
|
| H A D | bus_dma.9 | 170 API is a bus, device, and machine-independent (MI) interface to 182 For example, if a DMA engine in a device is limited to 32-bit addresses, 190 For example, a device might require 16-byte alignment of its descriptor ring 201 The per-group tags can then inherit these restrictions from this 203 tag rather than having to list them explicitly when creating the per-group tags. 234 Sync operations also handle architecture-specific details such as CPU cache 239 Static transactions are used with a long-lived memory region that is reused 264 will attempt to allocate memory requiring less expensive sync operations 285 to track the mappings of any in-flight transactions. 315 .Bl -tag -width indent [all …]
|
| /freebsd/sys/vm/ |
| H A D | vm_radix.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 50 pctrie_init(&rtree->rt_trie); in vm_radix_init() 56 return (pctrie_is_empty(&rtree->rt_trie)); in vm_radix_is_empty() 63 * Inserts the key-value pair into the trie, starting search from root. 69 return (VM_RADIX_PCTRIE_INSERT(&rtree->rt_trie, page)); in vm_radix_insert() 73 * Inserts the key-value pair into the trie, starting search from iterator. 83 * Returns the value stored at the index assuming there is an external lock. 90 return (VM_RADIX_PCTRIE_LOOKUP(&rtree->rt_trie, index)); in vm_radix_lookup() 94 * Returns the value stored at the index without requiring an external lock. [all …]
|
| /freebsd/share/man/man3/ |
| H A D | pthread_rwlock_timedrdlock.3 | 30 .Nd "acquire a read-write lock for reading or give up after a specified period" 38 This function acquires a read lock on the read-write lock 40 However, if the lock cannot be 42 unlock the lock, 50 function must be called once for each lock acquired. 59 at the time the call is made it holds a write lock on 62 an uninitialized read-write lock. 77 .Bl -tag -width Er 79 The lock could not be acquired before the specified timeout expired. 85 .Bl -tag -width Er [all …]
|
| H A D | pthread_rwlock_timedwrlock.3 | 30 .Nd "acquire a read-write lock for writing or give up after a specified period" 38 This function acquires a write lock on the read-write lock 40 However, if the lock cannot be 42 unlock the lock, 57 an uninitialized read-write lock. 72 .Bl -tag -width Er 74 The lock could not be acquired before the specified timeout expired. 80 .Bl -tag -width Er 87 does not refer to an initialized read-write lock object, 90 nanosecond value is less than zero or [all …]
|
| H A D | pthread_mutex_timedlock.3 | 30 .Nd lock a mutex without blocking indefinitely 41 function will lock 59 .Bl -tag -width Er 70 specified a nanosecond value less than zero or 94 thread terminated while holding the mutex lock. 95 The lock was granted to the caller and it is up to the new owner 113 .St -p1003.1-96 .
|
| /freebsd/usr.bin/lockf/tests/ |
| H A D | lockf_test.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 43 while [ "$cur" -lt "$tmo" -a ! -f "$lockfile" ]; do 55 atf_check -s exit:${EX_USAGE} -e not-empty lockf 56 atf_check -s exit:${EX_USAGE} -e not-empty lockf "testlock" 67 # Make sure that the lock exists... 68 while ! test -e "testlock"; do 72 # Attempt both verbose and silent re-lock 73 atf_check -s exit:${EX_TEMPFAIL} -e not-empty \ 74 lockf -t 0 "testlock" sleep 0 75 atf_check -s exit:${EX_TEMPFAIL} -e empty \ [all …]
|
| /freebsd/lib/libthr/ |
| H A D | libthr.3 | 50 The library is tightly integrated with the run-time link editor 51 .Xr ld-elf.so.1 1 62 The run-time linker 63 .Xr ld-elf.so.1 1 64 has some code to ensure backward-compatibility with older versions of 70 .Li -lpthread , 71 the run-time dependency 80 owning the lock. 83 is more resource-consuming than the previous. 92 is performed, where the library attempts to acquire the lock by [all …]
|
| /freebsd/contrib/bc/src/ |
| H A D | file.c | 4 * SPDX-License-Identifier: BSD-2-Clause 6 * Copyright (c) 2018-2025 Gavin D. Howard and contributors. 78 buf[i] = buf2[len - i - 1]; in bc_file_ultoa() 94 sig_atomic_t lock; in bc_file_output() local 96 BC_SIG_TRYLOCK(lock); in bc_file_output() 98 // While the number of bytes written is less than intended... in bc_file_output() 102 ssize_t written = write(fd, buf + bytes, n - bytes); in bc_file_output() 105 if (BC_ERR(written == -1)) in bc_file_output() 107 BC_SIG_TRYUNLOCK(lock); in bc_file_output() 115 BC_SIG_TRYUNLOCK(lock); in bc_file_output() [all …]
|
| /freebsd/contrib/sendmail/contrib/ |
| H A D | movemail.pl | 1 #!/usr/bin/perl -w 3 # Move old mail messages between queues by calling re-mqueue.pl. 5 # movemail.pl [config-script] 35 my $lastage = -1; 58 if ($#ages != ($#queues - 1)) { 59 print "$progname: wrong number of ages (should be one less than number of queues)\n"; 63 # Get lock or exit quietly. Useful when running from cron. 66 open LOCK, ">>$lockfile" 67 or die "Can't open lock file: $!"; 68 unless (flock LOCK, $LOCK_EX|$LOCK_NB) { [all …]
|
| /freebsd/contrib/ntp/html/ |
| H A D | discipline.html | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 4 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1"> 7 <!-- Changed by: stenn, 03-Jan-2020 --> 13 <!-- #BeginDate format:En2m -->3-Jan-2020 02:12<!-- #EndDate --> 18 <li class="inline"><a href="#pll">Phase-Lock Loop Operations</a></li> 24 …-lock feedback loop. It is an intricately crafted algorithm that automatically adapts for optimum… 29 …ed update <em>V<sub>s</sub></em>. The loop filter implements a type-2 proportional-integrator con… 35 …hout affecting the oscillator frequency. In this way the offset error is less than 0.5 ms within … 36 …-ms step has the same shape as at 64 s, but with amplitude compressed by one-tenth. The response … 40 …ally within one millisecond. When the ambient temperature variations are less than a degree Celsi… [all …]
|
| /freebsd/sys/contrib/openzfs/module/zfs/ |
| H A D | aggsum.c | 1 // SPDX-License-Identifier: CDDL-1.0 24 * Aggregate-sum counters are a form of fanned-out counter, used when atomic 32 * buckets. The core counter contains a lock for the entire counter, as well 34 * aggsum_bucket structure contains a per-bucket lock to protect the contents of 41 * help minimize lock and cache contention). If the bucket already has 52 * core counter; since all other operations access CPU-local resources, 68 * expensive is clearing buckets. This involves grabbing the global lock 70 * lock (preventing threads on those CPUs from modifying their delta), and 73 * suited for write-many read-rarely operations. 75 * Note that the aggsums do not expand if more CPUs are hot-added. In that [all …]
|
| /freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
| H A D | sanitizer_thread_arg_retval.h | 1 //===-- sanitizer_thread_arg_retval.h -------- 36 void Lock() SANITIZER_ACQUIRE() { mtx_.Lock(); } Lock() function [all...] |
| /freebsd/sys/kern/ |
| H A D | kern_cpu.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2004-2007 Nate Lawson (SDG) 34 #include <sys/lock.h> 68 struct sx lock; member 90 #define CF_MTX_INIT(x) sx_init((x), "cpufreq lock") 168 sc->dev = dev; in cpufreq_attach() 169 sysctl_ctx_init(&sc->sysctl_ctx); in cpufreq_attach() 170 TAILQ_INIT(&sc->all_levels); in cpufreq_attach() 171 CF_MTX_INIT(&sc->lock); in cpufreq_attach() [all …]
|
| /freebsd/sys/dev/random/ |
| H A D | fortuna.c | 1 /*- 3 * Copyright (c) 2013-2015 Mark R V Murray 31 * ISBN 978-0-470-47424-2 "Cryptography Engineering" by Ferguson, Schneier 41 #include <sys/lock.h> 62 #include <crypto/rijndael/rijndael-api-fst.h> 118 /* Reseed lock */ 128 * 1. Concurrent full-rate devrandom readers can achieve similar throughput to 130 * non-concurrent design falls over at 2 readers). 132 * 2. The rand_harvestq process spends much less time spinning when one or more 137 * mutexes assume that a lock holder currently on CPU will release the lock [all …]
|
| /freebsd/contrib/llvm-project/openmp/runtime/src/ |
| H A D | kmp_itt.inl | 3 * kmp_itt.inl -- Inline functions of ITT Notify. 6 //===-------- 651 ___kmp_itt_lock_init(kmp_user_lock_p lock,char const * type,const ident_t * loc) global() argument 666 ___kmp_itt_lock_init(kmp_user_lock_p lock,char const * type) global() argument 684 ___kmp_itt_lock_fini(kmp_user_lock_p lock,char const * type) global() argument 694 __kmp_itt_lock_creating(kmp_user_lock_p lock,const ident_t * loc) global() argument 698 __kmp_itt_lock_creating(kmp_user_lock_p lock) global() argument 703 __kmp_itt_lock_acquiring(kmp_user_lock_p lock) global() argument 719 __kmp_itt_lock_acquired(kmp_user_lock_p lock) global() argument 735 __kmp_itt_lock_releasing(kmp_user_lock_p lock) global() argument 750 __kmp_itt_lock_cancelled(kmp_user_lock_p lock) global() argument 765 __kmp_itt_lock_destroyed(kmp_user_lock_p lock) global() argument 773 __kmp_itt_critical_creating(kmp_user_lock_p lock,const ident_t * loc) global() argument 777 __kmp_itt_critical_creating(kmp_user_lock_p lock) global() argument 782 __kmp_itt_critical_acquiring(kmp_user_lock_p lock) global() argument 786 __kmp_itt_critical_acquired(kmp_user_lock_p lock) global() argument 790 __kmp_itt_critical_releasing(kmp_user_lock_p lock) global() argument 794 __kmp_itt_critical_destroyed(kmp_user_lock_p lock) global() argument [all...] |
| /freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
| H A D | Parallel.h | 1 //===- llvm/Support/Parallel.h - Parallel algorithms ----------------------===// 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7 //===----------------------------------------------------------------------===// 13 #include "llvm/Config/llvm-config.h" 72 std::lock_guard<std::mutex> lock(Mutex); in inc() 77 std::lock_guard<std::mutex> lock(Mutex); in dec() 78 if (--Count == 0) in dec() 83 std::unique_lock<std::mutex> lock(Mutex); in sync() 84 Cond.wait(lock, [&] { return Count == 0; }); in sync() 118 return Comp(*Start, *(End - 1)) in medianOf3() [all …]
|
| /freebsd/sys/amd64/include/ |
| H A D | atomic.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 47 * Therefore, except for special cases, like non-temporal memory accesses or 63 * The open-coded number is used instead of the symbolic expression to 82 * atomic_subtract_char(P, V) (*(u_char *)(P) -= (V)) 87 * atomic_subtract_short(P, V) (*(u_short *)(P) -= (V)) 92 * atomic_subtract_int(P, V) (*(u_int *)(P) -= (V)) 99 * atomic_subtract_long(P, V) (*(u_long *)(P) -= (V)) 105 * Always use lock prefixes. The result is slightly less optimal for 106 * UP systems, but it matters less now, and sometimes UP is emulated [all …]
|
| /freebsd/crypto/openssl/crypto/rsa/ |
| H A D | rsa_ossl.c | 2 * Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved. 103 int i, num = 0, r = -1; in rsa_ossl_public_encrypt() 107 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_encrypt() 109 return -1; in rsa_ossl_public_encrypt() 112 if (BN_ucmp(rsa->n, rsa->e) <= 0) { in rsa_ossl_public_encrypt() 114 return -1; in rsa_ossl_public_encrypt() 118 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_encrypt() 119 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_encrypt() 121 return -1; in rsa_ossl_public_encrypt() 125 if ((ctx = BN_CTX_new_ex(rsa->libctx)) == NULL) in rsa_ossl_public_encrypt() [all …]
|
| /freebsd/crypto/heimdal/lib/hx509/ |
| H A D | ChangeLog | 1 2008-07-14 Love Hörnquist Åstrand <lha@kth.se> 5 2008-06-21 Love Hörnquist Åstrand <lha@kth.se> 12 2008-05-23 Love Hörnquist Åstrand <lha@kth.se> 16 2008-04-29 Love Hörnquist Åstrand <lha@it.su.se> 18 * sel-lex.l: Use _hx509_sel_yyerror() instead of error_message(). 20 2008-04-20 Love Hörnquist Åstrand <lha@it.su.se> 22 * sel-lex.l: Include <config.h> 24 2008-04-17 Love Hörnquist Åstrand <lha@it.su.se> 26 * Makefile.am: Update make-proto usage. 28 2008-04-15 Love Hörnquist Åstrand <lha@it.su.se> [all …]
|
| /freebsd/contrib/unbound/validator/ |
| H A D | val_neg.h | 2 * validator/val_neg.h - validator aggressive negative caching functions. 61 * Kept as validator-environ-state. It refers back to the rrset cache for 68 /** the big lock on the negative cache. Because we use a rbtree 69 * for the data (quick lookup), we need a big lock */ 70 lock_basic_type lock; member 108 * parents (-parents) include this one, that are in_use 137 * less than the name) data elements are also in the rbtree, with a usage 156 * parents (-parents) include this one, that are in use 165 /** next in LRU (next element was less recentl [all...] |
| /freebsd/bin/ps/ |
| H A D | ps.1 | 1 .\"- 2 .\" SPDX-License-Identifier: BSD-3-Clause 44 .Op Fl -libxo 57 .Op Fl -libxo 66 .Pq one per lightweight-process . 68 .Fl -libxo . 157 has been specified, by lightweight-process (thread) ID. 187 also accepts the old-style BSD options, whose format and effect are left 191 .Bl -tag -width indent 192 .It Fl -libxo [all …]
|