summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/arm/__aeabi_read_tp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--cpukit/score/cpu/arm/__aeabi_read_tp.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/cpukit/score/cpu/arm/__aeabi_read_tp.c b/cpukit/score/cpu/arm/__aeabi_read_tp.c
index 671065825d..0f4eba8d9a 100644
--- a/cpukit/score/cpu/arm/__aeabi_read_tp.c
+++ b/cpukit/score/cpu/arm/__aeabi_read_tp.c
@@ -1,7 +1,15 @@
/* SPDX-License-Identifier: BSD-2-Clause */
+/**
+ * @file
+ *
+ * @ingroup RTEMSScoreCPUARM
+ *
+ * @brief This source file contains the implementation of __aeabi_read_tp().
+ */
+
/*
- * Copyright (c) 2014 embedded brains GmbH. All rights reserved.
+ * Copyright (c) 2014 embedded brains GmbH & Co. KG
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -42,15 +50,15 @@ void __attribute__((naked)) __aeabi_read_tp(void)
"ldr r0, =_Per_CPU_Information\n"
"ldr r0, [r0, %[executingoff]]\n"
#if defined(__thumb__) && !defined(__thumb2__)
- "add r0, %[tlsareaoff]\n"
+ "add r0, %[threadidoff]\n"
"ldr r0, [r0]\n"
#else
- "ldr r0, [r0, %[tlsareaoff]]\n"
+ "ldr r0, [r0, %[threadidoff]]\n"
#endif
"bx lr\n"
:
: [executingoff] "I" (offsetof(Per_CPU_Control, executing)),
- [tlsareaoff] "I" (offsetof(Thread_Control, Start.tls_area))
+ [threadidoff] "I" (offsetof(Thread_Control, Registers.thread_id))
);
}