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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [newlib-1.18.0/] [newlib/] [libc/] [reent/] [timesr.c] - Blame information for rev 207

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 207 jeremybenn
/* Reentrant versions of times system calls */
2
 
3
#include <reent.h>
4
#include <time.h>
5
#include <sys/time.h>
6
#include <sys/times.h>
7
#include <_syslist.h>
8
 
9
/* Some targets provides their own versions of these functions.  Those
10
   targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS.  */
11
 
12
#ifdef _REENT_ONLY
13
#ifndef REENTRANT_SYSCALLS_PROVIDED
14
#define REENTRANT_SYSCALLS_PROVIDED
15
#endif
16
#endif
17
 
18
#ifdef REENTRANT_SYSCALLS_PROVIDED
19
 
20
int _dummy_times_syscalls = 1;
21
 
22
#else
23
 
24
/* We use the errno variable used by the system dependent layer.  */
25
#undef errno
26
extern int errno;
27
 
28
/*
29
FUNCTION
30
        <<_times_r>>---Reentrant version of times
31
 
32
INDEX
33
        _times_r
34
 
35
ANSI_SYNOPSIS
36
        #include <reent.h>
37
        #include <sys/times.h>
38
        clock_t _times_r(struct _reent *<[ptr]>, struct tms *<[ptms]>);
39
 
40
TRAD_SYNOPSIS
41
        #include <reent.h>
42
        #include <sys/times.h>
43
        clock_t _times_r(<[ptr]>, <[ptms]>)
44
        struct _reent *<[ptr]>;
45
        struct tms *<[ptms]>;
46
 
47
DESCRIPTION
48
        This is a reentrant version of <<times>>.  It
49
        takes a pointer to the global data block, which holds
50
        <<errno>>.
51
*/
52
 
53
clock_t
54
_DEFUN (_times_r, (ptr, ptms),
55
     struct _reent *ptr _AND
56
     struct tms *ptms)
57
{
58
  clock_t ret;
59
 
60
  ret = _times (ptms);
61
  return ret;
62
}
63
#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */

powered by: WebSVN 2.1.0

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