mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-02-20 20:57:12 +08:00
统一getcwd和chdir的加锁方式
This commit is contained in:
parent
fc6bc1ad39
commit
2a57ba9f96
@ -890,9 +890,9 @@ int access(const char *path, int amode)
|
||||
char *getcwd(char *buf, size_t size)
|
||||
{
|
||||
#ifdef DFS_USING_WORKDIR
|
||||
rt_enter_critical();
|
||||
dfs_lock();
|
||||
strncpy(buf, working_directory, size);
|
||||
rt_exit_critical();
|
||||
dfs_unlock();
|
||||
#else
|
||||
rt_kprintf(NO_WORKING_DIR);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user