/freebsd/sys/contrib/device-tree/Bindings/i2c/ |
H A D | i2c-arb-gpio-challenge.txt | 1 GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 7 the standard I2C multi-master rules. Using GPIOs is generally useful in 21 others can see. These are all active low with pull-ups enabled. We'll 24 - OUR_CLAIM: output from us signaling to other hosts that we want the bus 25 - THEIR_CLAIMS: output from others signaling that they want the bus 37 4. Otherwise, wait for a few milliseconds and see if THEIR_CLAIMS are released. 38 5. If not, back off, release the claim and wait for a few more milliseconds. 43 - compatible: i2c-arb-gpio-challenge 44 - our-claim-gpio: The GPIO that we use to claim the bus. 45 - their-claim-gpios: The GPIOs that the other sides use to claim the bus. [all …]
|
/freebsd/contrib/ntp/libntp/lib/isc/win32/ |
H A D | condition.c | 3 * Copyright (C) 1998-2001 Internet Software Consortium. 37 cond->waiters = 0; in isc_condition_init() 46 cond->events[LSIGNAL] = h; in isc_condition_init() 50 * for the wait condition in isc_condition_init() 52 ISC_LIST_INIT(cond->threadlist); in isc_condition_init() 74 * Create the thread-specific handle in register_thread() 78 free(newthread); in register_thread() 85 newthread->handle[LSIGNAL] = gblcond->events[LSIGNAL]; in register_thread() 86 newthread->handle[LBROADCAST] = hc; in register_thread() 87 newthread->th = thrd; in register_thread() [all …]
|
/freebsd/sys/dev/aic7xxx/ |
H A D | aic7xxx.seq | 1 /*- 4 * Copyright (c) 1994-2001 Justin T. Gibbs. 5 * Copyright (c) 2000-2001 Adaptec Inc. 19 * 3. Neither the names of the above-listed copyright holders nor the names 24 * GNU General Public License ("GPL") version 2 as published by the Free 58 * use byte 27 of the SCB as a pseudo-next pointer and to thread a list 59 * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, 61 * this list every time a request sense occurs or after completing a non-tagged 76 if ((ahc->features & AHC_ULTRA2) != 0) { 80 if ((ahc->features & AHC_TWIN) != 0) { [all …]
|
H A D | aic79xx.seq | 1 /*- 4 * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. 5 * Copyright (c) 2000-2002 Adaptec Inc. 19 * 3. Neither the names of the above-listed copyright holders nor the names 24 * GNU General Public License ("GPL") version 2 as published by the Free 49 if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { 56 if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { 71 * If the kernel has caught up with us, thaw the queue. 98 cmp SCB_NEXT_COMPLETE[1], SCB_LIST_NULL jne . - 1; 122 if ((ahd->bugs & AHD_FAINT_LED_BUG) != 0) { [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_pipe.c | 3 /*- 35 #include <sys/wait.h> 46 #include <atf-c.h> 103 * the other side do partial write and wait for us to pick in ATF_TC_BODY() 108 /* Wait until parent is alarmed and awakens us */ in ATF_TC_BODY() 111 if (sigsuspend(&emptysigset) != -1 || errno != EINTR) in ATF_TC_BODY() 117 /* Read all what parent wants to give us */ in ATF_TC_BODY() 146 todo -= sz; in ATF_TC_BODY() 156 free(f); in ATF_TC_BODY()
|
/freebsd/sys/contrib/openzfs/module/os/linux/zfs/ |
H A D | arc_os.c | 9 * or https://opensource.org/licenses/CDDL-1.0. 63 * practice, the kernel's shrinker can ask us to evict up to about 4x this 98 size = allmem - (1 << 30); in arc_default_max() 112 return (ptob(zfs_totalram_pages - zfs_totalhigh_pages)); in arc_all_memory() 119 * Return the amount of memory that is considered free. In user space 120 * which is primarily used for testing we pretend that free memory ranges 121 * from 0-20% of all memory. 129 return (ptob(si.freeram - si.freehigh)); in arc_free_memory() 138 * needed. Positive if there is sufficient free memory, negative indicates 144 return (arc_free_memory() - arc_sys_free); in arc_available_memory() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zed/ |
H A D | zed_exec.c | 4 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). 5 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. 9 * Common Development and Distribution License Version 1.0 (CDDL-1.0). 10 * You can obtain a copy of the license from the top-level file 11 * "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>. 25 #include <sys/wait.h> 53 p1 = ((const struct launched_process_node *) x1)->pid; in _launched_process_node_compare() 54 p2 = ((const struct launched_process_node *) x2)->pid; in _launched_process_node_compare() 57 return (-1); in _launched_process_node_compare() 64 static pthread_t _reap_children_tid = (pthread_t)-1; [all …]
|
/freebsd/usr.bin/vmstat/ |
H A D | vmstat.8 | 37 .Op Fl -libxo 48 .Op Fl w Ar wait 50 .Op wait Op count 68 .Bl -tag -width indent 69 .It Fl -libxo 131 Report per-cpu system/user/idle cpu statistics. 137 .Bl -tag -width indent -compact 139 .Bl -tag -width 9n -compact 169 .Bl -tag -width 9n -compact 181 .Bl -tag -width 9n -compact [all …]
|
/freebsd/sys/sys/ |
H A D | buf_ring.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2007-2009 Kip Macy <kmacy@freebsd.org> 70 * multi-producer safe lock-free ring buffer enqueue 79 mask = br->br_prod_mask; in buf_ring_enqueue() 83 * via drbr_peek(), and then re-added via drbr_putback() and in buf_ring_enqueue() 86 for (uint32_t i = atomic_load_32(&br->br_cons_head); in buf_ring_enqueue() 87 i != atomic_load_32(&br->br_prod_head); i++) in buf_ring_enqueue() 88 if (br->br_ring[i & mask] == buf) in buf_ring_enqueue() 90 buf, i, atomic_load_32(&br->br_prod_tail), in buf_ring_enqueue() [all …]
|
/freebsd/sys/kern/ |
H A D | kern_alq.c | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 5 * Copyright (c) 2008-2009, Lawrence Stewart <lstewart@freebsd.org> 6 * Copyright (c) 2009-2010, The FreeBSD Foundation 69 * NB: Used as a wait channel so must 87 #define ALQ_LOCK(alq) mtx_lock_spin(&(alq)->aq_mtx) 88 #define ALQ_UNLOCK(alq) mtx_unlock_spin(&(alq)->aq_mtx) 90 #define HAS_PENDING_DATA(alq) ((alq)->aq_freebytes != (alq)->aq_buflen) 179 alq->aq_flags &= ~AQ_ACTIVE; in ald_deactivate() 256 /* Wait for ald_daemon to exit. */ in ald_shutdown() [all …]
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | evthread-internal.h | 2 * Copyright (c) 2008-2012 Niels Provos, Nick Mathewson 33 #include "event2/event-config.h" 34 #include "evconfig-private.h" 37 #include "util-internal.h" 42 /* On Windows, the way we currently make DLLs, it's not allowed for us to 43 * have shared global structures. Thus, we only do the direct-call-to-function 50 /* Global function pointers to lock-related functions. NULL if locking isn't 68 (base)->th_owner_id == evthread_id_fn_()) 75 (base)->running_loop && \ 76 (base)->th_owner_id != evthread_id_fn_()) [all …]
|
/freebsd/contrib/libevent/ |
H A D | evthread-internal.h | 2 * Copyright (c) 2008-2012 Niels Provos, Nick Mathewson 33 #include "event2/event-config.h" 34 #include "evconfig-private.h" 37 #include "util-internal.h" 42 /* On Windows, the way we currently make DLLs, it's not allowed for us to 43 * have shared global structures. Thus, we only do the direct-call-to-function 50 /* Global function pointers to lock-related functions. NULL if locking isn't 68 (base)->th_owner_id == evthread_id_fn_()) 75 (base)->running_loop && \ 76 (base)->th_owner_id != evthread_id_fn_()) [all …]
|
/freebsd/sys/contrib/device-tree/src/arm/allwinner/ |
H A D | sun7i-a20-hummingbird.dts | 6 * This file is dual-licensed: you can use it either under the terms 11 * a) This file is free software; you can redistribute it and/or 13 * published by the Free Software Foundation; either version 2 of the 23 * b) Permission is hereby granted, free of charge, to any person 45 /dts-v1/; 46 #include "sun7i-a20.dtsi" 47 #include "sunxi-common-regulators.dtsi" 49 #include <dt-bindings/gpio/gpio.h> 50 #include <dt-bindings/interrupt-controller/irq.h> 54 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; [all …]
|
/freebsd/contrib/ntp/scripts/ |
H A D | plot_summary.in | 1 #! @PATH_PERL@ -w 8 # Copyright (c) 1997, 1999 by Ulrich Windl <Ulrich.Windl@rz.uni-regensburg.de> 10 # This program is free software; you can redistribute it and/or modify 12 # the Free Software Foundation; either version 2 of the License, or 21 # along with this program; if not, write to the Free Software 39 $identifier = $opts->{'identifier'}; 44 $offset_limit = $opts->{'offset-limit'}; 45 $output_file = $opts->{'output-fil [all...] |
/freebsd/contrib/libpcap/rpcapd/ |
H A D | daemon.c | 2 * Copyright (c) 2002 - 2003 38 #include <stdlib.h> // for malloc(), free(), ... 62 #include "rpcap-protocol.h" 72 // Timeout, in seconds, when we're waiting for a client to send us an 73 // authentication request; if they don't send us a request within that 80 // to send us a request, if a capture isn't in progress; if they don't 81 // send us a request within that interval, we drop the connection, so 87 // Time, in seconds, that we wait after a failed authentication attempt 105 // and a platform-dependent (UN*X vs. Windows) identifier for the 170 uint8 type; // ContentType - will be 22, for Handshake [all …]
|
/freebsd/contrib/ntp/ntpd/ |
H A D | refclock_zyfer.c | 2 * refclock_zyfer - clock driver for the Zyfer GPSTarplus Clock 38 * with arbitrary on-time characters. This clock *begins* the stream with 39 * `!`, the on-time character, and the string is *not* EOL-terminated. 41 * Configure the beast for 9600, 8N1. While I see leap-second stuff 50 * ! On-time character 52 * DDD 001-366 Day of Year 53 * HH 00-23 Hour 54 * MM 00-59 Minute 55 * SS 00-5 [all...] |
/freebsd/contrib/nvi/common/ |
H A D | main.c | 1 /*- 34 * editor -- 56 if (gp->scr_busy == NULL) in editor() 57 gp->scr_busy = vs_busy; in editor() 59 if (gp->scr_msg == NULL) in editor() 60 gp->scr_msg = vs_msg; in editor() 61 gp->catd = (nl_catd)-1; in editor() 64 TAILQ_INIT(gp->dq); in editor() 65 TAILQ_INIT(gp->hq); in editor() 66 SLIST_INIT(gp->ecq); in editor() [all …]
|
/freebsd/sys/contrib/device-tree/src/arm/samsung/ |
H A D | exynos5250-snow-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/clock/maxim,max77686.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/sound/samsung-i2 [all...] |
/freebsd/sys/contrib/dev/acpica/components/executer/ |
H A D | exsystem.c | 3 * Module Name: exsystem - Interface to OS services 11 * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. 21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 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 147 * GNU General Public License ("GPL") version 2 as published by the Free 164 * PARAMETERS: Semaphore - Semaphore to wait on [all …]
|
/freebsd/sys/contrib/openzfs/module/os/linux/spl/ |
H A D | spl-condvar.c | 2 * Copyright (C) 2007-2010 Lawrence Livermore National Security, LLC. 6 * UCRL-CODE-235197 10 * The SPL is free software; you can redistribute it and/or modify it 12 * Free Software Foundation; either version 2 of the License, or (at your 50 return (-EINVAL); in param_set_hrtimeout_slack() 62 "schedule_hrtimeout_range() delta/slack value in us, default(0)"); 72 cvp->cv_magic = CV_MAGIC; in __cv_init() 73 init_waitqueue_head(&cvp->cv_event); in __cv_init() 74 init_waitqueue_head(&cvp->cv_destroy); in __cv_init() 75 atomic_set(&cvp->cv_waiters, 0); in __cv_init() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libutil/ |
H A D | t_pidfile.c | 38 * 3) Wait for the subprocess to terminate and ensure it exited successfully. 42 * root (/var/run). This makes us require root privileges to execute these 52 #include <sys/wait.h> 63 #include <atf-c.h> 81 if (fscanf(file, "%d", &pid) == -1) in check_pidfile() 96 if (access(path, R_OK) != -1) { in ensure_deleted() 113 ATF_REQUIRE(pid != -1); in run_child() 122 ATF_REQUIRE(waitpid(pid, &status, 0) != -1); in run_child() 135 basename == NULL ? getprogname() : basename) == -1) { in generate_varrun_pidfile() 149 if (pidfile(NULL) == -1) in helper_default_path() [all …]
|
/freebsd/contrib/ntp/libntp/ |
H A D | work_fork.c | 2 * work_fork.c - fork implementation for blocking worker child. 11 #include <sys/wait.h> 38 * via pipe suffers from EINTR -- and this goes for both directions. 59 l -= r; in netread() 65 return (size_t)(b - (char *)vb); in netread() 82 l -= w; in netwrite() 88 return (size_t)(b - (const char *)vb); in netwrite() 101 * For example, http://netbsd.gw.com/cgi-bin/man-cgi?fork++NetBSD-5.0 102 * recommends _exit() to avoid double-flushing C runtime stream buffers 144 TRACE(1, ("worker SIGHUP with %us left to sleep", in worker_sleep() [all …]
|
/freebsd/tests/sys/file/ |
H A D | flock_helper.c | 1 /*- 35 #include <sys/wait.h> 100 free(filename); in make_file() 132 return -1; \ 140 * Test 1 - F_GETLK on unlocked region 159 printf("1 - F_GETLK on unlocked region: "); in test1() 173 * Test 2 - F_SETLK on locked region 207 * parent will kill us when its done. in test2() 218 * Wait until the child has set its lock and then perform the in test2() 225 * fcntl should return -1 with errno set to either EACCES or in test2() [all …]
|
/freebsd/sys/x86/iommu/ |
H A D | x86_iommu.h | 1 /*- 2 * SPDX-License-Identifier: BSD-2-Clause 4 * Copyright (c) 2013-2015, 2024 The FreeBSD Foundation 40 #define IOMMU_PAGE_MASK (IOMMU_PAGE_SIZE - 1) 44 #define IOMMU_PTEMASK (IOMMU_NPTEPG - 1) 76 void (*domain_unload_entry)(struct iommu_map_entry *entry, bool free, 125 * Hw writes there on completion of wait descriptor 127 * 8-bytes write. Due to little-endian, and use of 4-byte 128 * sequence numbers, the difference does not matter for us. 133 uint32_t inv_waitd_seq; /* next sequence number to use for wait descr */ [all …]
|
/freebsd/sys/dev/drm2/ |
H A D | drm_lock.c | 16 * Permission is hereby granted, free of charge, to any person obtaining a 54 * Add the current task to the lock wait queue, and attempt to take to lock. 59 struct drm_master *master = file_priv->master; in drm_lock() 62 ++file_priv->lock_count; in drm_lock() 64 if (lock->context == DRM_KERNEL_CONTEXT) { in drm_lock() 66 DRM_CURRENTPID, lock->context); in drm_lock() 67 return -EINVAL; in drm_lock() 71 lock->context, DRM_CURRENTPID, in drm_lock() 72 master->lock.hw_lock->lock, lock->flags); in drm_lock() 74 mtx_lock(&master->lock.spinlock); in drm_lock() [all …]
|