source: trunk/libs/newlib/src/newlib/libc/reent/timesr.c @ 620

Last change on this file since 620 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 1.0 KB
Line 
1/* 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
20int _dummy_times_syscalls = 1;
21
22#else
23
24/* We use the errno variable used by the system dependent layer.  */
25#undef errno
26extern int errno;
27
28/*
29FUNCTION
30        <<_times_r>>---Reentrant version of times
31
32INDEX
33        _times_r
34
35SYNOPSIS
36        #include <reent.h>
37        #include <sys/times.h>
38        clock_t _times_r(struct _reent *<[ptr]>, struct tms *<[ptms]>);
39
40DESCRIPTION
41        This is a reentrant version of <<times>>.  It
42        takes a pointer to the global data block, which holds
43        <<errno>>.
44*/
45
46clock_t
47_times_r (struct _reent *ptr,
48     struct tms *ptms)
49{
50  clock_t ret;
51
52  ret = _times (ptms);
53  return ret;
54}
55#endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */
Note: See TracBrowser for help on using the repository browser.