Commit ee040a7f authored by Martin Storsjö's avatar Martin Storsjö

arm/aarch64: Use mach_absolute_time as timer on apple platforms

This is much less precise than the cycle counter register, but
the cycle counter register is not available on apple platforms
(and on linux, it requires a kernel module for allowing user mode
access).
Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 5ca40d6d
......@@ -24,7 +24,13 @@
#include <stdint.h>
#include "config.h"
#if HAVE_INLINE_ASM
#if defined(__APPLE__)
#include <mach/mach_time.h>
#define AV_READ_TIME mach_absolute_time
#elif HAVE_INLINE_ASM
#define AV_READ_TIME read_time
......
......@@ -24,7 +24,13 @@
#include <stdint.h>
#include "config.h"
#if HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__)
#if defined(__APPLE__)
#include <mach/mach_time.h>
#define AV_READ_TIME mach_absolute_time
#elif HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__)
#define AV_READ_TIME read_time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment