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

4.11
Last change on this file since 3984a0e1 was 3984a0e1, checked in by Sebastian Huber <sebastian.huber@…>, on Jul 24, 2015 at 8:47:25 AM

m68k: Include proper header file

  • Property mode set to 100644
File size: 788 bytes
Line 
1/*
2 * Copyright (c) 2014-2015 embedded brains GmbH.  All rights reserved.
3 *
4 *  embedded brains GmbH
5 *  Dornierstr. 4
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/threadimpl.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.