Skip to content

Commit 263d856

Browse files
committed
update
1 parent 933c54c commit 263d856

File tree

4 files changed

+20
-21
lines changed

4 files changed

+20
-21
lines changed

components/libc/compilers/armlibc/syscalls.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,8 @@ void _ttywrch(int ch)
258258

259259
RT_WEAK void _sys_exit(int return_code)
260260
{
261-
extern void __exit__(int status);
262-
__exit__(return_code);
261+
extern void __rt_libc_exit(int status);
262+
__rt_libc_exit(return_code);
263263
while(1);
264264
}
265265

@@ -306,8 +306,8 @@ int remove(const char *filename)
306306
#else
307307
int system(const char *string)
308308
{
309-
extern int __system__(const char *string);
310-
return __system__(string);
309+
extern int __rt_libc_system(const char *string);
310+
return __rt_libc_system(string);
311311
}
312312
#endif
313313

components/libc/compilers/common/stdlib.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
*/
1010

1111
#include <rtthread.h>
12+
#include <stdlib.h>
1213

13-
#define ABORT_STATUS 1
14-
15-
void __exit__(int status)
14+
void __rt_libc_exit(int status)
1615
{
1716
rt_thread_t self = rt_thread_self();
1817

@@ -25,7 +24,7 @@ void __exit__(int status)
2524

2625
if (self != RT_NULL)
2726
{
28-
if(status == ABORT_STATUS) /* abort() */
27+
if(status == EXIT_FAILURE) /* abort() */
2928
{
3029
rt_kprintf("thread:%s abort!\n", self->name);
3130
}
@@ -38,12 +37,12 @@ void __exit__(int status)
3837
}
3938
}
4039

41-
void __abort__(void)
40+
void __rt_libc_abort(void)
4241
{
43-
__exit__(ABORT_STATUS);
42+
__rt_libc_exit(EXIT_FAILURE);
4443
}
4544

46-
int __system__(const char *string)
45+
int __rt_libc_system(const char *string)
4746
{
4847
/* TODO */
4948
return 0;

components/libc/compilers/dlib/syscalls.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111

1212
void exit (int status)
1313
{
14-
extern void __exit__(int status);
15-
__exit__(status);
14+
extern void __rt_libc_exit(int status);
15+
__rt_libc_exit(status);
1616
while(1);
1717
}
1818

1919
void abort(void)
2020
{
21-
extern void __abort__(void);
22-
__abort__();
21+
extern void __rt_libc_abort(void);
22+
__rt_libc_abort();
2323
while(1);
2424
}

components/libc/compilers/newlib/syscalls.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,16 +286,16 @@ _free_r (struct _reent *ptr, void *addr)
286286
void
287287
exit (int status)
288288
{
289-
extern void __exit__(int status);
290-
__exit__(status);
289+
extern void __rt_libc_exit(int status);
290+
__rt_libc_exit(status);
291291
while(1);
292292
}
293293

294294
void
295295
_system(const char *s)
296296
{
297-
extern int __system__(const char *string);
298-
__system__(s);
297+
extern int __rt_libc_system(const char *string);
298+
__rt_libc_system(s);
299299
}
300300

301301
void __libc_init_array(void)
@@ -305,8 +305,8 @@ void __libc_init_array(void)
305305

306306
void abort(void)
307307
{
308-
extern void __abort__(void);
309-
__abort__();
308+
extern void __rt_libc_abort(void);
309+
__rt_libc_abort();
310310
while(1);
311311
}
312312

0 commit comments

Comments
 (0)