X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;ds=sidebyside;f=urcu%2Farch%2Fhppa.h;h=f92b0ab594b43cf801aab944a1b47bf6df82c0b5;hb=3fa182868e25068413fdaa1bef290365e99ab246;hp=b9b9494364a622b98c344419f3f4de01f888a63e;hpb=13e0bc720bc9baadf0adc007f0035c180888b1f1;p=urcu.git diff --git a/urcu/arch/hppa.h b/urcu/arch/hppa.h index b9b9494..f92b0ab 100644 --- a/urcu/arch/hppa.h +++ b/urcu/arch/hppa.h @@ -1,8 +1,29 @@ #ifndef _URCU_ARCH_HPPA_H #define _URCU_ARCH_HPPA_H +/* + * arch/hppa.h: definitions for hppa architecture + * + * Copyright (c) 2014 Helge Deller + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + #include #include +#include #ifdef __cplusplus extern "C" { @@ -11,11 +32,12 @@ extern "C" { #include #include -typedef unsigned long cycles_t; +#define HAS_CAA_GET_CYCLES +typedef unsigned long caa_cycles_t; -static inline cycles_t caa_get_cycles(void) +static inline caa_cycles_t caa_get_cycles(void) { - cycles_t cycles; + caa_cycles_t cycles; asm volatile("mfctl 16, %0" : "=r" (cycles)); return cycles;