summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2017-11-30 23:55:26 +0800
committerGitHub <[email protected]>2017-11-30 23:55:26 +0800
commitbaeb63dbf02776edf1a9d6d2513b743f6ae50954 (patch)
treed49a61e59202c15390260732482cf6464358ba6a /src
parentf004ff16f7b1a5399075026570e2195d6d3df284 (diff)
parentae7237dc53540897a9ea40e145122276bd0b9ddc (diff)
Merge pull request #1066 from BernardXiong/master
[DFS] fix the filesystem_operation_table issue.
Diffstat (limited to 'src')
-rw-r--r--src/kservice.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/kservice.c b/src/kservice.c
index 7b51f60ca3..f81a8e00f0 100644
--- a/src/kservice.c
+++ b/src/kservice.c
@@ -46,7 +46,7 @@
/**@{*/
/* global errno in RT-Thread */
-static volatile int _errno;
+static volatile int __rt_errno;
#if defined(RT_USING_DEVICE) && defined(RT_USING_CONSOLE)
static rt_device_t _console_device = RT_NULL;
@@ -64,12 +64,12 @@ rt_err_t rt_get_errno(void)
if (rt_interrupt_get_nest() != 0)
{
/* it's in interrupt context */
- return _errno;
+ return __rt_errno;
}
tid = rt_thread_self();
if (tid == RT_NULL)
- return _errno;
+ return __rt_errno;
return tid->error;
}
@@ -87,7 +87,7 @@ void rt_set_errno(rt_err_t error)
if (rt_interrupt_get_nest() != 0)
{
/* it's in interrupt context */
- _errno = error;
+ __rt_errno = error;
return;
}
@@ -95,7 +95,7 @@ void rt_set_errno(rt_err_t error)
tid = rt_thread_self();
if (tid == RT_NULL)
{
- _errno = error;
+ __rt_errno = error;
return;
}
@@ -114,13 +114,13 @@ int *_rt_errno(void)
rt_thread_t tid;
if (rt_interrupt_get_nest() != 0)
- return (int *)&_errno;
+ return (int *)&__rt_errno;
tid = rt_thread_self();
if (tid != RT_NULL)
return (int *) & (tid->error);
- return (int *)&_errno;
+ return (int *)&__rt_errno;
}
RTM_EXPORT(_rt_errno);