From 0d881bc974b74dff75c00a3cab5d535cbb2ace46 Mon Sep 17 00:00:00 2001 From: johannst Date: Fri, 26 Feb 2021 23:19:03 +0100 Subject: added implementation for armv7a --- lib/arch/arm/thread_create.s | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 lib/arch/arm/thread_create.s (limited to 'lib/arch/arm/thread_create.s') diff --git a/lib/arch/arm/thread_create.s b/lib/arch/arm/thread_create.s new file mode 100644 index 0000000..7231c3e --- /dev/null +++ b/lib/arch/arm/thread_create.s @@ -0,0 +1,20 @@ +# Copyright (c) 2021 Johannes Stoelp + + .arch armv7-a + .section .text, "ax", %progbits + + # extern "C" void thread_create(); + .global thread_create + .type thread_create, %function +thread_create: + .cfi_startproc + ldr r0, [sp, #0x4] + ldr r1, [sp] + + blx r1 + + # FIXME: no return from thread after user fn finished. +1: + b 1b + .cfi_endproc + .size thread_create, .-thread_create -- cgit v1.2.3