diff libavutil/arm/timer.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libavutil/arm/timer.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,40 @@
     1.4 +/*
     1.5 + * Copyright (c) 2009 Mans Rullgard <mans@mansr.com>
     1.6 + *
     1.7 + * This file is part of FFmpeg.
     1.8 + *
     1.9 + * FFmpeg is free software; you can redistribute it and/or
    1.10 + * modify it under the terms of the GNU Lesser General Public
    1.11 + * License as published by the Free Software Foundation; either
    1.12 + * version 2.1 of the License, or (at your option) any later version.
    1.13 + *
    1.14 + * FFmpeg is distributed in the hope that it will be useful,
    1.15 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.16 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.17 + * Lesser General Public License for more details.
    1.18 + *
    1.19 + * You should have received a copy of the GNU Lesser General Public
    1.20 + * License along with FFmpeg; if not, write to the Free Software
    1.21 + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
    1.22 + */
    1.23 +
    1.24 +#ifndef AVUTIL_ARM_TIMER_H
    1.25 +#define AVUTIL_ARM_TIMER_H
    1.26 +
    1.27 +#include <stdint.h>
    1.28 +#include "config.h"
    1.29 +
    1.30 +#if HAVE_INLINE_ASM && defined(__ARM_ARCH_7A__)
    1.31 +
    1.32 +#define AV_READ_TIME read_time
    1.33 +
    1.34 +static inline uint64_t read_time(void)
    1.35 +{
    1.36 +    unsigned cc;
    1.37 +    __asm__ volatile ("mrc p15, 0, %0, c9, c13, 0" : "=r"(cc));
    1.38 +    return cc;
    1.39 +}
    1.40 +
    1.41 +#endif /* HAVE_INLINE_ASM && __ARM_ARCH_7A__ */
    1.42 +
    1.43 +#endif /* AVUTIL_ARM_TIMER_H */