File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
components/libc/compilers Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,13 @@ int usleep(useconds_t usec)
5050}
5151RTM_EXPORT (usleep );
5252
53- pid_t getpid (void )
53+ pid_t
54+ #if defined (RT_USING_NEWLIB )
55+ __rt_libc_getpid
56+ #else
57+ getpid
58+ #endif
59+ (void )
5460{
5561 /*TODO*/
5662 return 0 ;
Original file line number Diff line number Diff line change @@ -35,6 +35,13 @@ __errno ()
3535}
3636#endif
3737
38+ int
39+ _getpid_r (struct _reent * ptr )
40+ {
41+ extern pid_t __rt_libc_getpid (void );
42+ return __rt_libc_getpid ();
43+ }
44+
3845int
3946_close_r (struct _reent * ptr , int fd )
4047{
@@ -332,7 +339,4 @@ int flock(int fd, int operation)
332339These functions are implemented and replaced by the 'common/time.c' file
333340int _gettimeofday_r(struct _reent *ptr, struct timeval *__tp, void *__tzp);
334341_CLOCK_T_ _times_r(struct _reent *ptr, struct tms *ptms);
335-
336- These functions are implemented and replaced by the "common/unistd.c" file
337- int _getpid_r(struct _reent *ptr);
338342*/
You can’t perform that action at this time.
0 commit comments