mm_lock.c: reformat preprocessor format
This commit is contained in:
parent
10251f6b6c
commit
42914040de
@ -62,19 +62,18 @@ int mm_lock(FAR struct mm_heap_s *heap)
|
|||||||
|
|
||||||
if (up_interrupt_context())
|
if (up_interrupt_context())
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_SMP)
|
# if !defined(CONFIG_SMP)
|
||||||
/* Check the mutex value, if held by someone, then return false.
|
/* Check the mutex value, if held by someone, then return false.
|
||||||
* Or, touch the heap internal data directly.
|
* Or, touch the heap internal data directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
return nxmutex_is_locked(&heap->mm_lock) ? -EAGAIN : 0;
|
return nxmutex_is_locked(&heap->mm_lock) ? -EAGAIN : 0;
|
||||||
#else
|
# else
|
||||||
/* Can't take mutex in SMP interrupt handler */
|
/* Can't take mutex in SMP interrupt handler */
|
||||||
|
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
#endif
|
# endif
|
||||||
}
|
}
|
||||||
else
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* _SCHED_GETTID() returns the task ID of the task at the head of the
|
/* _SCHED_GETTID() returns the task ID of the task at the head of the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user