5
Last change
on this file since 0daa8ab was
c499856,
checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47
|
Change all references of rtems.com to rtems.org.
|
-
Property mode set to
100644
|
File size:
1011 bytes
|
Line | |
---|
1 | /* |
---|
2 | * Copyright (c) 2014 embedded brains GmbH. All rights reserved. |
---|
3 | * |
---|
4 | * embedded brains GmbH |
---|
5 | * Obere Lagerstr. 30 |
---|
6 | * 82178 Puchheim |
---|
7 | * Germany |
---|
8 | * <rtems@embedded-brains.de> |
---|
9 | * |
---|
10 | * The license and distribution terms for this file may be |
---|
11 | * found in the file LICENSE in this distribution or at |
---|
12 | * http://www.rtems.org/license/LICENSE. |
---|
13 | */ |
---|
14 | |
---|
15 | #ifdef HAVE_CONFIG_H |
---|
16 | #include "config.h" |
---|
17 | #endif |
---|
18 | |
---|
19 | #include <rtems/score/thread.h> |
---|
20 | #include <rtems/score/percpu.h> |
---|
21 | |
---|
22 | #ifndef RTEMS_SMP |
---|
23 | |
---|
24 | void __attribute__((naked)) __aeabi_read_tp(void); |
---|
25 | |
---|
26 | void __attribute__((naked)) __aeabi_read_tp(void) |
---|
27 | { |
---|
28 | __asm__ volatile ( |
---|
29 | "ldr r0, =_Per_CPU_Information\n" |
---|
30 | "ldr r0, [r0, %[executingoff]]\n" |
---|
31 | #if defined(__thumb__) && !defined(__thumb2__) |
---|
32 | "add r0, %[tlsareaoff]\n" |
---|
33 | "ldr r0, [r0]\n" |
---|
34 | #else |
---|
35 | "ldr r0, [r0, %[tlsareaoff]]\n" |
---|
36 | #endif |
---|
37 | "bx lr\n" |
---|
38 | : |
---|
39 | : [executingoff] "I" (offsetof(Per_CPU_Control, executing)), |
---|
40 | [tlsareaoff] "I" (offsetof(Thread_Control, Start.tls_area)) |
---|
41 | ); |
---|
42 | } |
---|
43 | |
---|
44 | #endif /* RTEMS_SMP */ |
---|
Note: See
TracBrowser
for help on using the repository browser.