diff options
author | WANG Xuerui <git@xen0n.name> | 2022-10-25 12:14:07 +0800 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-01-30 19:42:17 +0000 |
commit | 743214d67bd4d84f23a931ecfa02f479ccd711fc (patch) | |
tree | ddb5713d8808031b86171494661321d3e228c412 | |
parent | 99cc3802d127a8569dcba267c0338e9333d36d51 (diff) |
forkfd/linux: add support for LoongArch
This architecture is not CLONE_BACKWARDS in any way.
Matching OpenDCDiag PR: https://github.com/opendcdiag/opendcdiag/pull/169
Change-Id: Ibceccfd20d270b30302a936885d12e4c55cdd833
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 0ab51dcc3c0cca0d84822f3871d98ffa46b6b2e4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/3rdparty/forkfd/forkfd_linux.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/3rdparty/forkfd/forkfd_linux.c b/src/3rdparty/forkfd/forkfd_linux.c index ffe0e9a5e2..b1f5408d11 100644 --- a/src/3rdparty/forkfd/forkfd_linux.c +++ b/src/3rdparty/forkfd/forkfd_linux.c @@ -82,7 +82,8 @@ static int sys_clone(unsigned long cloneflags, int *ptid) return syscall(__NR_clone, cloneflags, child_stack, stack_size, ptid, newtls, ctid); #elif defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__mips__) || \ defined(__nds32__) || defined(__hppa__) || defined(__powerpc__) || defined(__i386__) || \ - defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) + defined(__x86_64__) || defined(__xtensa__) || defined(__alpha__) || defined(__riscv) || \ + defined(__loongarch__) /* ctid and newtls are inverted on CONFIG_CLONE_BACKWARDS architectures, * but since both values are 0, there's no harm. */ return syscall(__NR_clone, cloneflags, child_stack, ptid, ctid, newtls); |