Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4921 | Serge | 1 | /* Reentrant versions of times system calls */ |
2 | |||
3 | #include |
||
4 | #include |
||
5 | #include |
||
6 | #include |
||
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 |
||
37 | #include |
||
38 | clock_t _times_r(struct _reent *<[ptr]>, struct tms *<[ptms]>); |
||
39 | |||
40 | TRAD_SYNOPSIS |
||
41 | #include |
||
42 | #include |
||
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 < |
||
49 | takes a pointer to the global data block, which holds |
||
50 | < |
||
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) */ |