OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [src/] [getpid.c] - Blame information for rev 532

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*
2
 *  $Id: getpid.c,v 1.2 2001-09-27 11:59:17 chris Exp $
3
 */
4
 
5
#include <limits.h>
6
#include <errno.h>
7
#include <string.h>
8
#include <sys/types.h>
9
 
10
#include <rtems/system.h>
11
#include <rtems/score/object.h>
12
#include <rtems/posix/seterr.h>
13
 
14
/*PAGE
15
 *
16
 *  4.1.1 Get Process and Parent Process IDs, P1003.1b-1993, p. 83
17
 */
18
 
19
pid_t getpid( void )
20
{
21
  return _Objects_Local_node;
22
}
23
 
24
/*
25
 *  _getpid_r
26
 *
27
 *  This is the Newlib dependent reentrant version of getpid().
28
 */
29
 
30
#if defined(RTEMS_NEWLIB)
31
 
32
#include <reent.h>
33
 
34
pid_t _getpid_r(
35
  struct _reent *ptr
36
)
37
{
38
  return getpid();
39
}
40
#endif
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.