/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 …]
|
/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. 84 * the pindex already exists. Return zero on success or a non-zero error on 95 error = VM_RADIX_PCTRIE_INSERT_LOOKUP_LE(&rtree->rt_trie, page, mpred); in vm_radix_insert_lookup_lt() 103 * Returns the value stored at the index assuming there is an external lock. [all …]
|
/freebsd/usr.bin/lockf/tests/ |
H A D | lockf_test.sh | 2 # SPDX-License-Identifier: BSD-2-Clause 37 atf_check -s exit:${EX_USAGE} -e not-empty lockf 38 atf_check -s exit:${EX_USAGE} -e not-empty lockf "testlock" 49 # Make sure that the lock exists... 50 while ! test -e "testlock"; do 54 # Attempt both verbose and silent re-lock 55 atf_check -s exit:${EX_TEMPFAIL} -e not-empty \ 56 lockf -t 0 "testlock" sleep 0 57 atf_check -s exit:${EX_TEMPFAIL} -e empty \ 58 lockf -t 0 -s "testlock" sleep 0 [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/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-2024 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 tha in bc_file_output() 187 sig_atomic_t lock; bc_file_flush() local 215 sig_atomic_t lock; bc_file_write() local 261 sig_atomic_t lock; bc_file_printf() local 410 sig_atomic_t lock; bc_file_putchar() local [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 | 23 * Aggregate-sum counters are a form of fanned-out counter, used when atomic 31 * buckets. The core counter contains a lock for the entire counter, as well 33 * aggsum_bucket structure contains a per-bucket lock to protect the contents of 40 * help minimize lock and cache contention). If the bucket already has 51 * core counter; since all other operations access CPU-local resources, 67 * expensive is clearing buckets. This involves grabbing the global lock 69 * lock (preventing threads on those CPUs from modifying their delta), and 72 * suited for write-many read-rarely operations. 74 * Note that the aggsums do not expand if more CPUs are hot-added. In that 75 * case, we will have less fanout than boot_ncpus, but we don't want to always [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/bin/ps/ |
H A D | ps.1 | 1 .\"- 37 .Op Fl -libxo 49 .Op Fl -libxo 111 .Bl -tag -width indent 112 .It Fl -libxo 314 .Bl -tag -width lockname 330 .Bl -column P_SINGLE_BOUNDARY 0x40000000 331 .It Dv "P_ADVLOCK" Ta No "0x00000001" Ta "Process may hold a POSIX advisory lock" 367 .Bl -column P2_INHERIT_PROTECTED 0x00000001 403 The name of the lock that the process is currently blocked on. [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/crypto/openssl/providers/implementations/rands/ |
H A D | crngt.c | 2 * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 12 * Implementation of the FIPS 140-2 section 4.9.2 Conditional Tests. 31 CRYPTO_RWLOCK *lock; member 59 CRYPTO_THREAD_lock_free(crngt_glob->lock); in rand_crng_ossl_ctx_free() 60 EVP_MD_free(crngt_glob->md); in rand_crng_ossl_ctx_free() 71 if ((crngt_glob->md = EVP_MD_fetch(ctx, "SHA256", "")) == NULL) { in rand_crng_ossl_ctx_new() 76 if ((crngt_glob->lock = CRYPTO_THREAD_lock_new()) == NULL) { in rand_crng_ossl_ctx_new() 77 EVP_MD_free(crngt_glob->md); in rand_crng_ossl_ctx_new() 114 OSSL_LIB_CTX *libctx = ossl_prov_ctx_get0_libctx(drbg->provctx); in ossl_crngt_get_entropy() 125 if (!CRYPTO_THREAD_write_lock(crngt_glob->lock)) in ossl_crngt_get_entropy() [all …]
|
/freebsd/crypto/openssl/crypto/rsa/ |
H A D | rsa_ossl.c | 2 * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. 78 int i, num = 0, r = -1; in rsa_ossl_public_encrypt() 82 if (BN_num_bits(rsa->n) > OPENSSL_RSA_MAX_MODULUS_BITS) { in rsa_ossl_public_encrypt() 84 return -1; in rsa_ossl_public_encrypt() 87 if (BN_ucmp(rsa->n, rsa->e) <= 0) { in rsa_ossl_public_encrypt() 89 return -1; in rsa_ossl_public_encrypt() 93 if (BN_num_bits(rsa->n) > OPENSSL_RSA_SMALL_MODULUS_BITS) { in rsa_ossl_public_encrypt() 94 if (BN_num_bits(rsa->e) > OPENSSL_RSA_MAX_PUBEXP_BITS) { in rsa_ossl_public_encrypt() 96 return -1; in rsa_ossl_public_encrypt() 100 if ((ctx = BN_CTX_new_ex(rsa->libctx)) == NULL) in rsa_ossl_public_encrypt() [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/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 recently used) */ 231 * if false, do not add SOA - for unbound-internal consumption. [all …]
|