1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 20 #ifndef _NIMBLE_NPL_OS_H_ 21 #define _NIMBLE_NPL_OS_H_ 22 23 #include <assert.h> 24 #include <stdint.h> 25 #include <string.h> 26 27 #include "os_types.h" 28 29 #ifdef __cplusplus 30 extern "C" { 31 #endif 32 33 #define BLE_NPL_OS_ALIGNMENT 4 34 35 #define BLE_NPL_TIME_FOREVER INT32_MAX 36 37 #define SYSINIT_PANIC_MSG(msg) __assert_fail(msg, __FILE__, __LINE__, __func__) 38 39 #define SYSINIT_PANIC_ASSERT_MSG(rc, msg) do \ 40 { \ 41 if (!(rc)) { \ 42 SYSINIT_PANIC_MSG(msg); \ 43 } \ 44 } while (0) 45 46 #ifdef __cplusplus 47 } 48 #endif 49 50 #endif /* _NPL_H_ */ 51