From f7e039e90eda0759d2499db23e613ff4e4bbeb69 Mon Sep 17 00:00:00 2001 From: wangxiaoyao Date: Thu, 25 Aug 2022 17:12:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[bsp/qemu-virt64-aarch64]=20=E5=8E=BB?= =?UTF-8?q?=E9=99=A4qemu=E9=85=8D=E7=BD=AE=E4=B8=AD=E5=BD=B1=E5=93=8Dvirti?= =?UTF-8?q?o=E4=BD=BF=E7=94=A8=E7=9A=84=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/qemu-virt64-aarch64/qemu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bsp/qemu-virt64-aarch64/qemu.sh b/bsp/qemu-virt64-aarch64/qemu.sh index 1130c5429b..40eeabc551 100755 --- a/bsp/qemu-virt64-aarch64/qemu.sh +++ b/bsp/qemu-virt64-aarch64/qemu.sh @@ -1,7 +1,7 @@ if [ ! -f "sd.bin" ]; then dd if=/dev/zero of=sd.bin bs=1024 count=65536 fi -qemu-system-aarch64 -M virt,gic-version=2,virtualization=on,secure=on -cpu cortex-a53 -smp 4 -kernel rtthread.bin -nographic +qemu-system-aarch64 -M virt,gic-version=2 -cpu cortex-a53 -smp 4 -kernel rtthread.bin -nographic \ -drive if=none,file=sd.bin,format=raw,id=blk0 -device virtio-blk-device,drive=blk0,bus=virtio-mmio-bus.0 \ -netdev user,id=net0 -device virtio-net-device,netdev=net0,bus=virtio-mmio-bus.1 \ -device virtio-serial-device -chardev socket,host=127.0.0.1,port=4321,server=on,wait=off,telnet=on,id=console0 -device virtserialport,chardev=console0 -- Gitee From 054eebda6be65af803fc716279effae6fbf5b160 Mon Sep 17 00:00:00 2001 From: wangxiaoyao Date: Thu, 25 Aug 2022 17:14:40 +0800 Subject: [PATCH 2/2] [lwp/lwp_futex] modified verification for timeout in sys_futex() --- components/lwp/lwp_futex.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/lwp/lwp_futex.c b/components/lwp/lwp_futex.c index cbae3a09c2..b0d3fd0666 100644 --- a/components/lwp/lwp_futex.c +++ b/components/lwp/lwp_futex.c @@ -187,7 +187,13 @@ int sys_futex(int *uaddr, int op, int val, const struct timespec *timeout, rt_set_errno(EINVAL); return -RT_EINVAL; } - if (timeout) + + /** + * if (op & (FUTEX_WAKE|FUTEX_FD|FUTEX_WAKE_BITSET|FUTEX_TRYLOCK_PI|FUTEX_UNLOCK_PI)) was TRUE + * `timeout` should be ignored by implementation, according to POSIX futex(2) manual. + * since only FUTEX_WAKE is implemented in rt-smart, only FUTEX_WAKE was omitted currently + */ + if (timeout && !(op & (FUTEX_WAKE))) { if (!lwp_user_accessable((void *)timeout, sizeof(struct timespec))) { -- Gitee