lib/librthread/rthread_sem.c
103
sem_t sem;
lib/librthread/rthread_sem.c
145
sem = calloc(1, sizeof(*sem));
lib/librthread/rthread_sem.c
146
if (!sem) {
lib/librthread/rthread_sem.c
150
sem->value = value;
lib/librthread/rthread_sem.c
151
*semp = sem;
lib/librthread/rthread_sem.c
159
sem_t sem;
lib/librthread/rthread_sem.c
164
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem.c
169
if (sem->waitcount) {
lib/librthread/rthread_sem.c
178
if (sem->shared)
lib/librthread/rthread_sem.c
179
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem.c
181
free(sem);
lib/librthread/rthread_sem.c
189
sem_t sem;
lib/librthread/rthread_sem.c
191
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem.c
196
*sval = sem->value;
lib/librthread/rthread_sem.c
204
sem_t sem;
lib/librthread/rthread_sem.c
206
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem.c
211
_sem_post(sem);
lib/librthread/rthread_sem.c
221
sem_t sem;
lib/librthread/rthread_sem.c
229
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem.c
235
error = _sem_wait(sem, 1, NULL, &self->delayed_cancel);
lib/librthread/rthread_sem.c
241
sem->value, errno);
lib/librthread/rthread_sem.c
253
sem_t sem;
lib/librthread/rthread_sem.c
257
if (!semp || !(sem = *semp) || !abstime || !timespecisvalid(abstime)) {
lib/librthread/rthread_sem.c
267
error = _sem_wait(sem, 1, abstime, &self->delayed_cancel);
lib/librthread/rthread_sem.c
273
sem->value, errno);
lib/librthread/rthread_sem.c
283
sem_t sem;
lib/librthread/rthread_sem.c
286
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem.c
291
while ((val = sem->value) > 0) {
lib/librthread/rthread_sem.c
292
if (atomic_cas_uint(&sem->value, val, val - 1) == val) {
lib/librthread/rthread_sem.c
299
_rthread_debug(1, "%s: v=%d errno=%d\n", __func__, sem->value, errno);
lib/librthread/rthread_sem.c
318
sem_t sem, *semp;
lib/librthread/rthread_sem.c
377
sem = mmap(NULL, SEM_MMAP_SIZE, PROT_READ | PROT_WRITE,
lib/librthread/rthread_sem.c
380
if (sem == MAP_FAILED) {
lib/librthread/rthread_sem.c
386
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem.c
391
sem->value = value;
lib/librthread/rthread_sem.c
392
sem->shared = 1;
lib/librthread/rthread_sem.c
394
*semp = sem;
lib/librthread/rthread_sem.c
402
sem_t sem;
lib/librthread/rthread_sem.c
404
if (!semp || !(sem = *semp) || !sem->shared) {
lib/librthread/rthread_sem.c
410
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem.c
58
_sem_wait(sem_t sem, int can_eintr, const struct timespec *abstime,
lib/librthread/rthread_sem.c
64
atomic_inc_int(&sem->waitcount);
lib/librthread/rthread_sem.c
66
while ((val = sem->value) > 0) {
lib/librthread/rthread_sem.c
67
if (atomic_cas_uint(&sem->value, val, val - 1) == val) {
lib/librthread/rthread_sem.c
69
atomic_dec_int(&sem->waitcount);
lib/librthread/rthread_sem.c
76
error = _twait(&sem->value, 0, CLOCK_REALTIME, abstime);
lib/librthread/rthread_sem.c
82
atomic_dec_int(&sem->waitcount);
lib/librthread/rthread_sem.c
89
_sem_post(sem_t sem)
lib/librthread/rthread_sem.c
92
atomic_inc_int(&sem->value);
lib/librthread/rthread_sem.c
93
_wake(&sem->value, 1);
lib/librthread/rthread_sem_compat.c
100
sem->value++;
lib/librthread/rthread_sem_compat.c
101
if (sem->waitcount) {
lib/librthread/rthread_sem_compat.c
105
_spinunlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
115
sem_t sem;
lib/librthread/rthread_sem_compat.c
157
sem = calloc(1, sizeof(*sem));
lib/librthread/rthread_sem_compat.c
158
if (!sem) {
lib/librthread/rthread_sem_compat.c
162
sem->lock = _SPINLOCK_UNLOCKED;
lib/librthread/rthread_sem_compat.c
163
sem->value = value;
lib/librthread/rthread_sem_compat.c
164
*semp = sem;
lib/librthread/rthread_sem_compat.c
172
sem_t sem;
lib/librthread/rthread_sem_compat.c
177
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem_compat.c
182
if (sem->waitcount) {
lib/librthread/rthread_sem_compat.c
191
if (sem->shared)
lib/librthread/rthread_sem_compat.c
192
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem_compat.c
194
free(sem);
lib/librthread/rthread_sem_compat.c
202
sem_t sem;
lib/librthread/rthread_sem_compat.c
204
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem_compat.c
209
_spinlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
210
*sval = sem->value;
lib/librthread/rthread_sem_compat.c
211
_spinunlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
219
sem_t sem;
lib/librthread/rthread_sem_compat.c
221
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem_compat.c
226
_sem_post(sem);
lib/librthread/rthread_sem_compat.c
236
sem_t sem;
lib/librthread/rthread_sem_compat.c
244
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem_compat.c
250
r = _sem_wait(sem, 1, NULL, &self->delayed_cancel);
lib/librthread/rthread_sem_compat.c
266
sem_t sem;
lib/librthread/rthread_sem_compat.c
270
if (!semp || !(sem = *semp) || !abstime || !timespecisvalid(abstime)) {
lib/librthread/rthread_sem_compat.c
280
r = _sem_wait(sem, 1, abstime, &self->delayed_cancel);
lib/librthread/rthread_sem_compat.c
294
sem_t sem;
lib/librthread/rthread_sem_compat.c
297
if (!semp || !(sem = *semp)) {
lib/librthread/rthread_sem_compat.c
302
_spinlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
303
if (sem->value) {
lib/librthread/rthread_sem_compat.c
304
sem->value--;
lib/librthread/rthread_sem_compat.c
308
_spinunlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
333
sem_t sem, *semp;
lib/librthread/rthread_sem_compat.c
392
sem = mmap(NULL, SEM_MMAP_SIZE, PROT_READ | PROT_WRITE,
lib/librthread/rthread_sem_compat.c
395
if (sem == MAP_FAILED) {
lib/librthread/rthread_sem_compat.c
401
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem_compat.c
406
sem->lock = _SPINLOCK_UNLOCKED;
lib/librthread/rthread_sem_compat.c
407
sem->value = value;
lib/librthread/rthread_sem_compat.c
408
sem->shared = 1;
lib/librthread/rthread_sem_compat.c
410
*semp = sem;
lib/librthread/rthread_sem_compat.c
418
sem_t sem;
lib/librthread/rthread_sem_compat.c
420
if (!semp || !(sem = *semp) || !sem->shared) {
lib/librthread/rthread_sem_compat.c
426
munmap(sem, SEM_MMAP_SIZE);
lib/librthread/rthread_sem_compat.c
57
_sem_wait(sem_t sem, int can_eintr, const struct timespec *abstime,
lib/librthread/rthread_sem_compat.c
60
void *ident = (void *)&sem->waitcount;
lib/librthread/rthread_sem_compat.c
63
if (sem->shared)
lib/librthread/rthread_sem_compat.c
66
_spinlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
67
if (sem->value) {
lib/librthread/rthread_sem_compat.c
68
sem->value--;
lib/librthread/rthread_sem_compat.c
71
sem->waitcount++;
lib/librthread/rthread_sem_compat.c
74
&sem->lock, delayed_cancel);
lib/librthread/rthread_sem_compat.c
75
_spinlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
80
} while (r == 0 && sem->value == 0);
lib/librthread/rthread_sem_compat.c
81
sem->waitcount--;
lib/librthread/rthread_sem_compat.c
83
sem->value--;
lib/librthread/rthread_sem_compat.c
85
_spinunlock(&sem->lock);
lib/librthread/rthread_sem_compat.c
91
_sem_post(sem_t sem)
lib/librthread/rthread_sem_compat.c
93
void *ident = (void *)&sem->waitcount;
lib/librthread/rthread_sem_compat.c
96
if (sem->shared)
lib/librthread/rthread_sem_compat.c
99
_spinlock(&sem->lock);
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
10
sem_t sem;
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
17
CHECKr(sem_init(&sem, 0, 0));
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
18
CHECKe(sem_getvalue(&sem, &val));
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
21
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
22
CHECKe(sem_getvalue(&sem, &val));
regress/lib/libpthread/semaphore/sem_getvalue/sem_getvalue.c
25
CHECKe(sem_destroy(&sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
105
CHECKe(sem_destroy(&sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
28
sem_t sem;
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
43
CHECKn(sem_timedwait(&sem, &ts));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
46
CHECKr(sem_init(&sem, 0, 0));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
48
CHECKr(pthread_create(&th, NULL, waiter, &sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
53
CHECKn(sem_destroy(&sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
57
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
68
CHECKr(pthread_create(&th, NULL, waiter, &sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
77
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_timedwait/sem_timedwait.c
82
CHECKn(sem_timedwait(&sem, &ts));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
11
sem_t sem;
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
18
CHECKn(sem_trywait(&sem));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
21
CHECKr(sem_init(&sem, 0, 0));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
23
CHECKn(sem_trywait(&sem));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
26
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
27
CHECKr(sem_trywait(&sem));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
29
CHECKe(sem_getvalue(&sem, &val));
regress/lib/libpthread/semaphore/sem_trywait/sem_trywait.c
32
CHECKe(sem_destroy(&sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
25
sem_t sem;
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
34
CHECKn(sem_wait(&sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
37
CHECKr(sem_init(&sem, 0, 0));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
39
CHECKr(pthread_create(&th, NULL, waiter, &sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
44
CHECKn(sem_destroy(&sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
48
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
59
CHECKr(pthread_create(&th, NULL, waiter, &sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
68
CHECKr(sem_post(&sem));
regress/lib/libpthread/semaphore/sem_wait/sem_wait.c
71
CHECKe(sem_destroy(&sem));
sys/dev/acpi/dwiic_acpi.c
173
uint64_t sem;
sys/dev/acpi/dwiic_acpi.c
235
"_SEM", 0, NULL, &sem))
sys/dev/acpi/dwiic_acpi.c
236
sem = 0;
sys/dev/acpi/dwiic_acpi.c
238
if (sem)
sys/dev/acpi/dwiic_acpi.c
255
if (sem) {
sys/dev/ic/iosf.c
230
uint32_t sem;
sys/dev/ic/iosf.c
232
sem = iosf_mbi_mdr_read(mbi,
sys/dev/ic/iosf.c
235
return (ISSET(sem, IOSF_PUNIT_SEM_BIT));
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
320
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c
338
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
1673
r = down_write_killable(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
1702
up_write(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
1938
r = down_read_killable(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_debugfs.c
1979
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
709
if (down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
710
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
712
lockdep_assert_held(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
738
down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
740
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
806
down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
808
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
865
down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
867
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
937
down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c
939
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_gart.c
417
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_gart.c
419
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c
1413
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_gfx.c
1418
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c
675
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c
688
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c
736
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c
804
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
850
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
901
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
1520
if (!down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
1529
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3603
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
3604
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
272
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
277
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
335
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
340
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
607
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
613
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
805
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
810
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
928
down_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras_eeprom.c
934
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.c
298
rw_init(&reset_domain->sem, "agrs");
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.c
306
down_write(&reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.c
313
up_write(&reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.h
142
lockdep_assert_held(&domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.h
143
return rwsem_is_contended(&domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_reset.h
99
struct rwlock sem;
sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
1362
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
1364
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
1461
down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/amdgpu_virt.c
1465
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/gmc_v10_0.c
259
u32 sem, req, ack;
sys/dev/pci/drm/amd/amdgpu/gmc_v10_0.c
263
sem = hub->vm_inv_eng0_sem + hub->eng_distance * eng;
sys/dev/pci/drm/amd/amdgpu/gmc_v10_0.c
295
tmp = RREG32_RLC_NO_KIQ(sem, hub_ip);
sys/dev/pci/drm/amd/amdgpu/gmc_v10_0.c
327
WREG32_RLC_NO_KIQ(sem, 0, hub_ip);
sys/dev/pci/drm/amd/amdgpu/gmc_v11_0.c
244
u32 sem, req, ack;
sys/dev/pci/drm/amd/amdgpu/gmc_v11_0.c
251
sem = hub->vm_inv_eng0_sem + hub->eng_distance * eng;
sys/dev/pci/drm/amd/amdgpu/gmc_v11_0.c
283
tmp = RREG32_RLC_NO_KIQ(sem, hub_ip);
sys/dev/pci/drm/amd/amdgpu/gmc_v11_0.c
307
WREG32_RLC_NO_KIQ(sem, 0, hub_ip);
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
844
u32 j, inv_req, tmp, sem, req, ack, inst;
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
852
sem = hub->vm_inv_eng0_sem + hub->eng_distance * eng;
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
889
tmp = RREG32_SOC15_IP_NO_KIQ(MMHUB, sem, GET_INST(GC, inst));
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
891
tmp = RREG32_SOC15_IP_NO_KIQ(GC, sem, GET_INST(GC, inst));
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
932
WREG32_SOC15_IP_NO_KIQ(MMHUB, sem, 0, GET_INST(GC, inst));
sys/dev/pci/drm/amd/amdgpu/gmc_v9_0.c
934
WREG32_SOC15_IP_NO_KIQ(GC, sem, 0, GET_INST(GC, inst));
sys/dev/pci/drm/amd/amdgpu/mxgpu_ai.c
300
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/mxgpu_ai.c
303
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/mxgpu_ai.c
319
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/mxgpu_ai.c
322
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/mxgpu_nv.c
367
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/mxgpu_nv.c
370
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdgpu/mxgpu_nv.c
386
if (down_read_trylock(&adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdgpu/mxgpu_nv.c
389
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
211
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2385
if (!down_read_trylock(&dqm->dev->adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2439
up_read(&dqm->dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2445
up_read(&dqm->dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2471
if (!down_read_trylock(&dqm->dev->adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2476
up_read(&dqm->dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
251
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
261
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
281
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2832
down_read_trylock(&dqm->dev->adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
2836
up_read(&dqm->dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
291
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
362
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
366
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
382
if (!down_read_trylock(&adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_device_queue_manager.c
386
up_read(&adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_kernel_queue.c
200
if (kq->queue->properties.type == KFD_QUEUE_TYPE_HIQ && down_read_trylock(&kq->dev->adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdkfd/kfd_kernel_queue.c
207
up_read(&kq->dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c
95
down_read_trylock(&dev->adev->reset_domain->sem)) {
sys/dev/pci/drm/amd/amdkfd/kfd_process_queue_manager.c
98
up_read(&dev->adev->reset_domain->sem);
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
2347
if (!down_read_trylock(&pdd->dev->adev->reset_domain->sem))
sys/dev/pci/drm/amd/amdkfd/kfd_svm.c
2359
up_read(&pdd->dev->adev->reset_domain->sem);
sys/dev/pci/drm/radeon/radeon_trace.h
170
TP_PROTO(int ring, struct radeon_semaphore *sem),
sys/dev/pci/drm/radeon/radeon_trace.h
172
TP_ARGS(ring, sem),
sys/dev/pci/drm/radeon/radeon_trace.h
182
__entry->waiters = sem->waiters;
sys/dev/pci/drm/radeon/radeon_trace.h
183
__entry->gpu_addr = sem->gpu_addr;
sys/dev/pci/drm/radeon/radeon_trace.h
192
TP_PROTO(int ring, struct radeon_semaphore *sem),
sys/dev/pci/drm/radeon/radeon_trace.h
194
TP_ARGS(ring, sem)
sys/dev/pci/drm/radeon/radeon_trace.h
199
TP_PROTO(int ring, struct radeon_semaphore *sem),
sys/dev/pci/drm/radeon/radeon_trace.h
201
TP_ARGS(ring, sem)
sys/dev/pci/if_mwx.c
2867
int i, rv, sem;
sys/dev/pci/if_mwx.c
2943
sem = mt7921_mcu_patch_sem_ctrl(sc, 0);
sys/dev/pci/if_mwx.c
2944
if (sem != 0)
sys/dev/pci/if_mwx.c
2945
rv = sem;
sys/dev/pci/if_mwx.c
3080
int rv, seq, sem;
sys/dev/pci/if_mwx.c
3087
rv = mwx_mcu_wait_resp_int(sc, MCU_CMD_PATCH_SEM_CONTROL, seq, &sem);
sys/dev/pci/if_mwx.c
3092
switch (sem) {
sys/dev/pci/if_mwx.c
3103
switch (sem) {
sys/kern/sysv_sem.c
276
semaptr->sem_nsems * sizeof(struct sem));
sys/kern/sysv_sem.c
441
semaptr_new->sem_base = mallocarray(nsems, sizeof(struct sem),
sys/kern/sysv_sem.c
469
nsems * sizeof(struct sem));
sys/kern/sysv_sem.c
512
free(semaptr_new->sem_base, M_SEM, nsems * sizeof(struct sem));
sys/kern/sysv_sem.c
533
struct sem *semptr = NULL;
sys/sys/sem.h
55
struct sem *sem_base; /* pointer to first semaphore in set */
usr.bin/ipcs/ipcs.c
656
struct semid_ds sem, **sema;
usr.bin/ipcs/ipcs.c
842
if (kvm_read(kd, (u_long)sema[i], &sem,
usr.bin/ipcs/ipcs.c
843
sizeof(sem)) != sizeof(sem))
usr.bin/ipcs/ipcs.c
846
show_seminfo(sem.sem_otime,
usr.bin/ipcs/ipcs.c
847
sem.sem_ctime,
usr.bin/ipcs/ipcs.c
848
IXSEQ_TO_IPCID(i, sem.sem_perm),
usr.bin/ipcs/ipcs.c
849
sem.sem_perm.key,
usr.bin/ipcs/ipcs.c
850
sem.sem_perm.mode,
usr.bin/ipcs/ipcs.c
851
sem.sem_perm.uid,
usr.bin/ipcs/ipcs.c
852
sem.sem_perm.gid,
usr.bin/ipcs/ipcs.c
853
sem.sem_perm.cuid,
usr.bin/ipcs/ipcs.c
854
sem.sem_perm.cgid,
usr.bin/ipcs/ipcs.c
855
sem.sem_nsems);