Skip to content

Commit 783b694

Browse files
authored
Merge pull request #4432 from mysterywolf/mutex
[libc] remove inherent mutex protection
2 parents 7b28f2b + 9952042 commit 783b694

File tree

2 files changed

+0
-91
lines changed

2 files changed

+0
-91
lines changed

components/libc/compilers/armlibc/syscalls.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* RT_USING_DFS is not defined
1414
* 2020-02-13 Meco Man re-implement exit() and abort()
1515
* 2020-02-14 Meco Man implement _sys_tmpnam()
16-
* 2020-02-25 Meco Man add multithreaded protection
1716
*/
1817

1918
#include <string.h>
@@ -42,36 +41,6 @@ const char __stdin_name[] = "STDIN";
4241
const char __stdout_name[] = "STDOUT";
4342
const char __stderr_name[] = "STDERR";
4443

45-
#ifdef RT_USING_HEAP
46-
int _mutex_initialize(rt_mutex_t *m)
47-
{
48-
*m = rt_mutex_create("_mutex_", RT_IPC_FLAG_PRIO);
49-
if(*m == RT_NULL)
50-
{
51-
return 0;
52-
}
53-
else
54-
{
55-
return 1;
56-
}
57-
}
58-
59-
void _mutex_acquire(rt_mutex_t *m)
60-
{
61-
rt_mutex_take(*m, RT_WAITING_FOREVER);
62-
}
63-
64-
void _mutex_release(rt_mutex_t *m)
65-
{
66-
rt_mutex_release(*m);
67-
}
68-
69-
void _mutex_free(rt_mutex_t *m)
70-
{
71-
rt_mutex_delete(*m);
72-
}
73-
#endif
74-
7544
/**
7645
* required by fopen() and freopen().
7746
*

components/libc/compilers/dlib/rmtx.c

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)