summaryrefslogtreecommitdiffstatsabout
path: root/SylixOS
diff options
context:
space:
mode:
authorHanhui <hanhui@acoinfo.com>2020-12-29 06:46:10 (GMT)
committer Hanhui <hanhui@acoinfo.com>2020-12-29 06:46:10 (GMT)
commit7c54c31a534697deb2277c8f75500179829077fc (patch)
tree77c15fc9d987478cff08d7eb42739d7e4235d30c /SylixOS
parent1b2107a60452b50ee6c96ec98d6a3aa74f8523c4 (diff)
downloadlibsylixos-7c54c31a534697deb2277c8f75500179829077fc.zip
libsylixos-7c54c31a534697deb2277c8f75500179829077fc.tar.gz
libsylixos-7c54c31a534697deb2277c8f75500179829077fc.tar.bz2
Fix thread once state rotation error.
Diffstat (limited to 'SylixOS')
-rw-r--r--SylixOS/kernel/threadext/ThreadOnce.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/SylixOS/kernel/threadext/ThreadOnce.c b/SylixOS/kernel/threadext/ThreadOnce.c
index a48fb59..179a667 100644
--- a/SylixOS/kernel/threadext/ThreadOnce.c
+++ b/SylixOS/kernel/threadext/ThreadOnce.c
@@ -137,7 +137,7 @@ INT API_ThreadOnce (INT *piOnce, VOIDFUNCPTR pfuncRoutine)
case __THREAD_ONCE_STATUS_NONE: /* 可以尝试初始化 */
iValue = __LW_ATOMIC_CAS(patomic,
__THREAD_ONCE_STATUS_NONE,
- __THREAD_ONCE_STATUS_DOWN);
+ __THREAD_ONCE_STATUS_INIT);
break;
default: /* 状态错误 */
@@ -203,7 +203,7 @@ INT API_ThreadOnce2 (INT *piOnce, VOIDFUNCPTR pfuncRoutine, PVOID pvArg)
case __THREAD_ONCE_STATUS_NONE: /* 可以尝试初始化 */
iValue = __LW_ATOMIC_CAS(patomic,
__THREAD_ONCE_STATUS_NONE,
- __THREAD_ONCE_STATUS_DOWN);
+ __THREAD_ONCE_STATUS_INIT);
break;
default: /* 状态错误 */