[OpenMP] kmp_affinity.h: add LoongArch64 support

In D135552 the #else is added, which causes build error when
building openmp on LoongArch. This patch fixed the error:
      "Unknown or unsupported architecture"

Reviewed By: SixWeining, MaskRay

Differential Revision: https://reviews.llvm.org/D137604
This commit is contained in:
zhanglimin 2022-11-17 11:58:57 +08:00 committed by Weining Lu
parent 4ae3e13c7d
commit db8a96731f
1 changed files with 11 additions and 0 deletions

View File

@ -256,6 +256,17 @@ public:
#elif __NR_sched_getaffinity != 5196
#error Wrong code for getaffinity system call.
#endif /* __NR_sched_getaffinity */
#elif KMP_ARCH_LOONGARCH64
#ifndef __NR_sched_setaffinity
#define __NR_sched_setaffinity 122
#elif __NR_sched_setaffinity != 122
#error Wrong code for setaffinity system call.
#endif /* __NR_sched_setaffinity */
#ifndef __NR_sched_getaffinity
#define __NR_sched_getaffinity 123
#elif __NR_sched_getaffinity != 123
#error Wrong code for getaffinity system call.
#endif /* __NR_sched_getaffinity */
#else
#error Unknown or unsupported architecture
#endif /* KMP_ARCH_* */