X-Git-Url: http://git.liburcu.org/?p=urcu.git;a=blobdiff_plain;f=include%2Furcu%2Farch%2Friscv.h;fp=include%2Furcu%2Farch%2Friscv.h;h=1fd7d62bc201d234798ff46a4210906c78c46bb0;hp=0000000000000000000000000000000000000000;hb=fdfad81006c2c964781b616f0a75578507be809c;hpb=4b2d70a71f5d7ac75c9eb2589c3df26a2ed0684a diff --git a/include/urcu/arch/riscv.h b/include/urcu/arch/riscv.h new file mode 100644 index 0000000..1fd7d62 --- /dev/null +++ b/include/urcu/arch/riscv.h @@ -0,0 +1,49 @@ +#ifndef _URCU_ARCH_RISCV_H +#define _URCU_ARCH_RISCV_H + +/* + * arch/riscv.h: definitions for the RISC-V architecture + * + * Copyright (c) 2018 Michael Jeanson + * + * 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" { +#endif + +#include +#include + +/* + * On Linux, define the membarrier system call number if not yet available in + * the system headers. + */ +#if (defined(__linux__) && !defined(__NR_membarrier)) +#define __NR_membarrier 283 +#endif + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* _URCU_ARCH_RISCV_H */