libc: Refine the inline handling

1.Remove CONFIG_HAVE_INLINE macro
2.Change the ANSI C function to normal function
3.Other simple non ANSI function to macro

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2020-06-26 14:40:13 +08:00
committed by YAMAMOTO Takashi
parent 993591dca1
commit 60fe0a0f96
24 changed files with 476 additions and 231 deletions

View File

@@ -47,13 +47,6 @@
* Public Functions
****************************************************************************/
#ifndef CONFIG_HAVE_INLINE
void bt_atomic_set(FAR bt_atomic_t *ptr, bt_atomic_t value)
{
*ptr = value;
}
#endif
bt_atomic_t bt_atomic_incr(FAR bt_atomic_t *ptr)
{
irqstate_t flags;
@@ -106,20 +99,6 @@ bt_atomic_t bt_atomic_clrbit(FAR bt_atomic_t *ptr, bt_atomic_t bitno)
return value;
}
#ifndef CONFIG_HAVE_INLINE
bt_atomic_t bt_atomic_get(FAR bt_atomic_t *ptr)
{
return *ptr;
}
#endif
#ifndef CONFIG_HAVE_INLINE
bool bt_atomic_testbit(FAR bt_atomic_t *ptr, bt_atomic_t bitno)
{
return (*ptr & (1 << bitno)) != 0;
}
#endif
bool bt_atomic_testsetbit(FAR bt_atomic_t *ptr, bt_atomic_t bitno)
{
irqstate_t flags;