Skip to content
Snippets Groups Projects
Commit 0ecef4db authored by Masayuki Ishikawa's avatar Masayuki Ishikawa
Browse files

clock_systimer: Replace critical section APIs with spinlock APIs. (64bit only)


If SMP=n or SMP=y && SPINLOCK_IRQ=n, this works in the same way as before.
If SMP=y && SPINLOCK_IRQ=y, performance will be improved.

Signed-off-by: default avatarMasayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
parent 57b6dec7
No related branches found
No related tags found
No related merge requests found
......@@ -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 */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment