mirror of
https://github.com/apache/nuttx.git
synced 2026-08-03 13:19:01 +00:00
Merged in masayuki2009/nuttx.nuttx/clock_systimer (pull request #570)
clock_systimer: Replace critical section APIs with spinlock APIs. (64bit only) Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
commit
4aeaf41dbd
1 changed files with 2 additions and 2 deletions
|
|
@ -120,9 +120,9 @@ systime_t clock_systimer(void)
|
|||
|
||||
/* 64-bit accesses are not atomic on most architectures. */
|
||||
|
||||
flags = enter_critical_section();
|
||||
flags = spin_lock_irqsave();
|
||||
sample = g_system_timer;
|
||||
leave_critical_section(flags);
|
||||
spin_unlock_irqrestore(flags);
|
||||
return sample;
|
||||
|
||||
# else /* CONFIG_SYSTEM_TIME64 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue