source: rtems/cpukit/score/cpu/m68k/__m68k_read_tp.c @ c499856

4.11
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on Mar 20, 2014 at 9:10:47 PM

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 784 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/tls.h>
21
22void __m68k_read_tp(void);
23
24void __m68k_read_tp(void)
25{
26  const Thread_Control *executing = _Thread_Get_executing();
27  void *tp = (char *) executing->Start.tls_area +
28    _TLS_Get_thread_control_block_area_size((uintptr_t) _TLS_Alignment)
29    + 0x7000;
30
31  __asm__ volatile (
32    "move.l %0, %%a0"
33    :
34    : "d" (tp)
35  );
36}
Note: See TracBrowser for help on using the repository browser.