xref: /aosp_15_r20/external/pigweed/third_party/chromium_verifier/public/chromium_verifier/pthread/pthread.h (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1 // Copyright 2021 The Pigweed Authors
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); you may not
4 // use this file except in compliance with the License. You may obtain a copy of
5 // the License at
6 //
7 //     https://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, WITHOUT
11 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12 // License for the specific language governing permissions and limitations under
13 // the License.
14 #pragma once
15 
16 #include <stdint.h>
17 
18 // The following declares a number of pthread APIs and data types needed to
19 // compile chromium verifier. But our port doesn't have any referrence to
20 // them. Thus just declarations are sufficient. The header will only be
21 // used for targets without a native POSIX thread implementation.
22 
23 typedef unsigned long int pthread_t;
24 typedef uint32_t pthread_key_t;
25 typedef uint32_t pthread_mutex_t;
26 
27 #if __cplusplus
28 extern "C" {
29 #endif
30 
31 int pthread_mutex_lock(pthread_mutex_t* __mutex);
32 int pthread_mutex_trylock(pthread_mutex_t*);
33 int pthread_mutex_unlock(pthread_mutex_t*);
34 
35 #if __cplusplus
36 }
37 #endif
38