2 * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
16 #ifndef _cl_sem_h_ // NOLINT(build/header_guard)
17 #define _cl_sem_h_ // NOLINT(build/header_guard)
19 #include <semaphore.h>
22 #define EXT_C extern "C"
29 * @brief \~english This file contains the api of sem wait.
32 /** @addtogroup BaseSystem
35 /** @addtogroup native_service
39 /** @addtogroup common_library
40 * @ingroup native_service
44 /////////////////////////////////////////////////////////////////////////////////////
46 /// \~english @par Brief
48 /// \~english @param [in] semid
49 /// sem_t * - the pointer to the union sem_t
50 /// \~english @param [in] timeout
51 /// unsigned int - the count of timeout
52 /// \~english @retval 0 Success
53 /// \~english @retval not 0 Error
54 /// \~english @par Prerequisite
56 /// \~english @par Change of internal state
58 /// \~english @par Conditions of processing failure
60 /// \~english @par Classification
62 /// \~english @par Type
64 /// \~english @par Detail
66 /// \~english @see None
67 ////////////////////////////////////////////////////////////////////////////////////
68 EXT_C int CL_SemWait(sem_t *semid, unsigned int timeout); // NOLINT(readability/nolint)
70 /** @}*/ // end of common_library
71 /** @}*/ // end of NativeService
72 /** @}*/ // end of BaseSystem
73 #endif // #ifndef _cl_sem_h_ // NOLINT(build/header_guard)