mirror of
https://github.com/apache/nuttx.git
synced 2025-12-09 19:54:55 +08:00
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:
committed by
YAMAMOTO Takashi
parent
993591dca1
commit
60fe0a0f96
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user