source: rtems/cpukit/posix/src/pthreadself.c @ 0e16fa45

5
Last change on this file since 0e16fa45 was 48fed9a, checked in by Sebastian Huber <sebastian.huber@…>, on 06/25/15 at 12:11:53

score: Simplify <rtems/system.h>

Drop the <rtems/score/percpu.h> include since this file exposes a lot of
implementation details.

  • Property mode set to 100644
File size: 629 bytes
Line 
1/**
2 * @file
3 *
4 * @brief Function returns the ID of the Calling Thread
5 * @ingroup POSIXAPI
6 */
7
8/*
9 *  16.1.6 Get Calling Thread's ID, p1003.1c/Draft 10, p. 152
10 *
11 *  COPYRIGHT (c) 1989-1999.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  The license and distribution terms for this file may be
15 *  found in the file LICENSE in this distribution or at
16 *  http://www.rtems.org/license/LICENSE.
17 */
18
19#if HAVE_CONFIG_H
20#include "config.h"
21#endif
22
23#include <pthread.h>
24
25#include <rtems/score/percpu.h>
26#include <rtems/score/thread.h>
27
28pthread_t pthread_self( void )
29{
30  return _Thread_Get_executing()->Object.id;
31}
Note: See TracBrowser for help on using the repository browser.