• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2017 The Android Open Source Project
2 // SPDX-License-Identifier: BSD-2-Clause
3 
4 #include <semaphore.h>
5 
6 #include "header_checks.h"
7 
semaphore_h()8 static void semaphore_h() {
9   TYPE(sem_t);
10 
11   MACRO(SEM_FAILED);
12 
13 #if !defined(__GLIBC__)  // Our glibc is too old.
14   FUNCTION(sem_clockwait, int (*f)(sem_t*, clockid_t, const struct timespec*));
15 #endif
16   FUNCTION(sem_close, int (*f)(sem_t*));
17   FUNCTION(sem_destroy, int (*f)(sem_t*));
18   FUNCTION(sem_getvalue, int (*f)(sem_t*, int*));
19   FUNCTION(sem_init, int (*f)(sem_t*, int, unsigned));
20   FUNCTION(sem_open, sem_t* (*f)(const char*, int, ...));
21   FUNCTION(sem_post, int (*f)(sem_t*));
22   FUNCTION(sem_timedwait, int (*f)(sem_t*, const struct timespec*));
23   FUNCTION(sem_trywait, int (*f)(sem_t*));
24   FUNCTION(sem_unlink, int (*f)(const char*));
25   FUNCTION(sem_wait, int (*f)(sem_t*));
26 }
27