1 /* 2 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2023. All rights reserved. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 #ifndef PTHREAD_H 16 #define PTHREAD_H 17 18 #include "../../include/pthread.h" 19 20 hidden int __pthread_once(pthread_once_t *, void (*)(void)); 21 hidden void __pthread_testcancel(void); 22 hidden int __pthread_setcancelstate(int, int *); 23 hidden int __pthread_create(pthread_t *restrict, const pthread_attr_t *restrict, void *(*)(void *), void *restrict); 24 hidden _Noreturn void __pthread_exit(void *); 25 hidden int __pthread_join(pthread_t, void **); 26 hidden int __pthread_mutex_lock(pthread_mutex_t *); 27 hidden int __pthread_mutex_trylock(pthread_mutex_t *); 28 hidden int __pthread_mutex_trylock_owner(pthread_mutex_t *); 29 hidden int __pthread_mutex_timedlock(pthread_mutex_t *restrict, const struct timespec *restrict); 30 hidden int __pthread_mutex_unlock(pthread_mutex_t *); 31 hidden int __private_cond_signal(pthread_cond_t *, int) __attribute__((no_stack_protector)); 32 hidden int __pthread_cond_timedwait(pthread_cond_t *restrict, pthread_mutex_t *restrict, const struct timespec *restrict); 33 hidden int __pthread_key_create(pthread_key_t *, void (*)(void *)); 34 hidden int __pthread_key_delete(pthread_key_t); 35 hidden int __pthread_rwlock_rdlock(pthread_rwlock_t *); 36 hidden int __pthread_rwlock_tryrdlock(pthread_rwlock_t *); 37 hidden int __pthread_rwlock_timedrdlock(pthread_rwlock_t *__restrict, const struct timespec *__restrict); 38 hidden int __pthread_rwlock_wrlock(pthread_rwlock_t *); 39 hidden int __pthread_rwlock_trywrlock(pthread_rwlock_t *); 40 hidden int __pthread_rwlock_timedwrlock(pthread_rwlock_t *__restrict, const struct timespec *__restrict); 41 hidden int __pthread_rwlock_unlock(pthread_rwlock_t *); 42 43 #endif 44