Home
last modified time | relevance | path

Searched refs:sem_t (Results 1 – 25 of 66) sorted by relevance

123

/glibc-2.36/sysdeps/pthread/
Dsemaphore.h35 extern int sem_init (sem_t *__sem, int __pshared, unsigned int __value)
39 extern int sem_destroy (sem_t *__sem) __THROW __nonnull ((1));
42 extern sem_t *sem_open (const char *__name, int __oflag, ...)
46 extern int sem_close (sem_t *__sem) __THROW __nonnull ((1));
55 extern int sem_wait (sem_t *__sem) __nonnull ((1));
63 extern int sem_timedwait (sem_t *__restrict __sem,
69 (sem_t *__restrict __sem,
81 extern int sem_clockwait (sem_t *__restrict __sem,
88 (sem_t *__restrict __sem,
100 extern int sem_trywait (sem_t *__sem) __THROWNL __nonnull ((1));
[all …]
Dsem_routines.c30 sem_t *sem;
39 sem_t *sem;
69 sem_t *
70 __sem_check_add_mapping (const char *name, int fd, sem_t *existing) in __sem_check_add_mapping()
77 sem_t *result = SEM_FAILED; in __sem_check_add_mapping()
109 existing = (sem_t *) __mmap (NULL, sizeof (sem_t), in __sem_check_add_mapping()
139 __munmap (existing, sizeof (sem_t)); in __sem_check_add_mapping()
148 sem_t *the_sem;
163 __sem_remove_mapping (sem_t *sem) in __sem_remove_mapping()
186 if (__munmap (rec->sem, sizeof (sem_t)) == -1) in __sem_remove_mapping()
Dsem_open.c35 sem_t *
39 sem_t *result; in __sem_open()
109 sem_t initsem; in __sem_open()
117 sizeof (sem_t) - sizeof (struct new_sem)); in __sem_open()
159 if (TEMP_FAILURE_RETRY (write (fd, &sem.initsem, sizeof (sem_t))) in __sem_open()
160 == sizeof (sem_t) in __sem_open()
162 && (result = (sem_t *) __mmap (NULL, sizeof (sem_t), in __sem_open()
170 __munmap (result, sizeof (sem_t)); in __sem_open()
Dtst-sem3.c37 sem_t *s; in do_test()
68 s = (sem_t *) (((uintptr_t) mem + __alignof (sem_t)) in do_test()
69 & ~(__alignof (sem_t) - 1)); in do_test()
Dsem_routines.h22 sem_t * __sem_check_add_mapping (const char *name, int fd, sem_t *existing)
25 bool __sem_remove_mapping (sem_t *sem) attribute_hidden;
Dtst-sem7.c36 sem_t *s; in do_test()
37 sem_t *s2; in do_test()
38 sem_t *s3; in do_test()
/glibc-2.36/nptl/
DsemaphoreP.h41 extern int __new_sem_init (sem_t *sem, int pshared, unsigned int value);
42 extern int __old_sem_init (sem_t *sem, int pshared, unsigned int value);
43 extern int __new_sem_destroy (sem_t *sem);
44 extern int __new_sem_post (sem_t *sem);
45 extern int __new_sem_wait (sem_t *sem);
46 extern int __old_sem_wait (sem_t *sem);
47 extern int __new_sem_trywait (sem_t *sem);
48 extern int __new_sem_getvalue (sem_t *sem, int *sval);
55 __sem_clockwait64 (sem_t *sem, clockid_t clockid,
59 __sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime);
Dtst-sem13.c13 typedef int (*waitfn_t)(sem_t *, struct timespec *);
20 sem_t s; in do_test_wait()
53 int test_sem_timedwait (sem_t *sem, struct timespec *ts) in test_sem_timedwait()
58 int test_sem_clockwait_monotonic (sem_t *sem, struct timespec *ts) in test_sem_clockwait_monotonic()
63 int test_sem_clockwait_realtime (sem_t *sem, struct timespec *ts) in test_sem_clockwait_realtime()
Dsem_init.c27 __new_sem_init (sem_t *sem, int pshared, unsigned int value) in __new_sem_init()
29 ASSERT_PTHREAD_INTERNAL_SIZE (sem_t, struct new_sem); in __new_sem_init()
72 __old_sem_init (sem_t *sem, int pshared, unsigned int value) in __old_sem_init()
74 ASSERT_PTHREAD_INTERNAL_SIZE (sem_t, struct new_sem); in __old_sem_init()
Dsem_wait.c24 __new_sem_wait (sem_t *sem) in __new_sem_wait()
54 __old_sem_wait (sem_t *sem) in __old_sem_wait()
77 __new_sem_trywait (sem_t *sem) in __new_sem_trywait()
94 __old_sem_trywait (sem_t *sem) in __old_sem_trywait()
Dtst-cancel24.cc26 sem_t *s = static_cast<sem_t *> (arg); in tf()
56 sem_t s; in do_test()
Dtst-cancel7.c39 static sem_t *sem;
89 sem = xmmap (NULL, sizeof (sem_t), PROT_READ | PROT_WRITE, MAP_SHARED, in do_prepare()
94 xftruncate (semfd, sizeof (sem_t)); in do_prepare()
Dsem_getvalue.c25 __new_sem_getvalue (sem_t *sem, int *sval) in __new_sem_getvalue()
52 __old_sem_getvalue (sem_t *sem, int *sval) in __old_sem_getvalue()
Dsem_timedwait.c26 ___sem_timedwait64 (sem_t *sem, const struct __timespec64 *abstime) in ___sem_timedwait64()
51 ___sem_timedwait (sem_t *sem, const struct timespec *abstime)
Dsem_clockwait.c26 ___sem_clockwait64 (sem_t *sem, clockid_t clockid, in ___sem_clockwait64()
56 ___sem_clockwait (sem_t *sem, clockid_t clockid, const struct timespec *abstime)
/glibc-2.36/conform/data/
Dsemaphore.h-data2 type sem_t
6 function int sem_close (sem_t*)
7 function int sem_destroy (sem_t*)
8 function int sem_getvalue (sem_t*, int*)
9 function int sem_init (sem_t*, int, unsigned int)
10 function {sem_t*} sem_open (const char*, int, ...)
11 function int sem_post (sem_t*)
13 function int sem_timedwait (sem_t*, const struct timespec*)
15 function int sem_trywait (sem_t*)
17 function int sem_wait (sem_t*)
/glibc-2.36/manual/
Dipc.texi50 @deftypefun int sem_init (sem_t *@var{sem}, int @var{pshared}, unsigned int @var{value});
52 @c Does not atomically update sem_t therefore AC-unsafe
53 @c because it can leave sem_t partially initialized.
56 @deftypefun int sem_destroy (sem_t *@var{sem});
61 @deftypefun sem_t *sem_open (const char *@var{name}, int @var{oflag}, ...);
70 @deftypefun int sem_close (sem_t *@var{sem});
86 @deftypefun int sem_wait (sem_t *@var{sem});
98 @deftypefun int sem_timedwait (sem_t *@var{sem}, const struct timespec *@var{abstime});
103 @deftypefun int sem_trywait (sem_t *@var{sem});
108 @deftypefun int sem_post (sem_t *@var{sem});
[all …]
/glibc-2.36/sysdeps/m68k/nptl/bits/
Dsemaphore.h27 #define SEM_FAILED ((sem_t *) 0)
34 } sem_t; typedef
/glibc-2.36/sysdeps/aarch64/nptl/bits/
Dsemaphore.h32 #define SEM_FAILED ((sem_t *) 0)
39 } sem_t; typedef
/glibc-2.36/sysdeps/unix/sysv/linux/bits/
Dsemaphore.h32 #define SEM_FAILED ((sem_t *) 0)
39 } sem_t; typedef
/glibc-2.36/sysdeps/mips/nptl/bits/
Dsemaphore.h29 #define SEM_FAILED ((sem_t *) 0)
36 } sem_t; typedef
/glibc-2.36/sysdeps/htl/
Dsem-wait.c22 extern int __sem_timedwait_internal (sem_t *restrict sem,
27 __sem_wait (sem_t *sem) in __sem_wait()
Dsem-timedwait.c47 __sem_timedwait_internal (sem_t *restrict sem, in __sem_timedwait_internal()
194 __sem_clockwait (sem_t *sem, clockid_t clockid, in __sem_clockwait()
202 __sem_timedwait (sem_t *restrict sem, const struct timespec *restrict timeout) in __sem_timedwait()
/glibc-2.36/stdlib/
Dtest-dlclose-exit-race.c40 sem_t order1;
44 sem_t order2;
Dtest-dlclose-exit-race-helper.c29 extern sem_t order1;
33 extern sem_t order2;

123