Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-19 Thread via GitHub
zyfeier commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1847875872 ## libs/libc/machine/arch_atomic.c: ## @@ -323,280 +323,240 @@ / STORE(__atomic_store_,

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-18 Thread via GitHub
xiaoxiang781216 commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1847499916 ## arch/sim/src/sim/posix/sim_testset.c: ## @@ -58,7 +58,7 @@ uint8_t up_testset(volatile uint8_t *lock) * following test and set is atomic. */ - ret

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-18 Thread via GitHub
zyfeier commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2482245249 > similar in which sense? > instrumentation? > types? (atomic_t/atomic64_t/atomic_long_t) > something else? @yamt only support int32_t atomic type and interface. -- This

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-18 Thread via GitHub
zyfeier commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1846576873 ## include/nuttx/atomic.h: ## @@ -86,13 +86,149 @@ extern "C++" #ifndef ATOMIC_VAR_INIT # define ATOMIC_VAR_INIT(value) (value) #endif -# else -#in

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-18 Thread via GitHub
xiaoxiang781216 commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1846626875 ## include/nuttx/atomic.h: ## @@ -86,13 +86,149 @@ extern "C++" #ifndef ATOMIC_VAR_INIT # define ATOMIC_VAR_INIT(value) (value) #endif -# else

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-18 Thread via GitHub
xiaoxiang781216 commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1846566020 ## include/nuttx/atomic.h: ## @@ -86,13 +86,149 @@ extern "C++" #ifndef ATOMIC_VAR_INIT # define ATOMIC_VAR_INIT(value) (value) #endif -# else

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-17 Thread via GitHub
yamt commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2482139319 > > * it seems a bit wasteful to mechanically replace short with long to me. especially where structure fields are arranged for a short. > > * why long? i suspect it's simpler to use a fix

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-17 Thread via GitHub
yamt commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2481754028 * it seems a bit wasteful to mechanically replace short with long to me. especially where structure fields are arranged for a short. * why long? i suspect it's simpler to use a fixed sized

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-17 Thread via GitHub
zyfeier commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2481801100 > * it seems a bit wasteful to mechanically replace short with long to me. especially where structure fields are arranged for a short. > * why long? i suspect it's simpler to use a fixe

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-17 Thread via GitHub
zyfeier commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1845421767 ## include/nuttx/atomic.h: ## @@ -86,11 +86,6 @@ extern "C++" #ifndef ATOMIC_VAR_INIT # define ATOMIC_VAR_INIT(value) (value) #endif Review Comment:

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-17 Thread via GitHub
zyfeier commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1845421728 ## arch/sim/src/sim/sim_heap.c: ## @@ -30,7 +30,7 @@ #include #include -#include +#include Review Comment: done ## include/nuttx/lib/atomic_long.

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-16 Thread via GitHub
xiaoxiang781216 commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1845313749 ## include/nuttx/atomic.h: ## @@ -86,11 +86,6 @@ extern "C++" #ifndef ATOMIC_VAR_INIT # define ATOMIC_VAR_INIT(value) (value) #endif Review Com

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-16 Thread via GitHub
xiaoxiang781216 commented on code in PR #14827: URL: https://github.com/apache/nuttx/pull/14827#discussion_r1845299304 ## arch/sim/src/sim/sim_heap.c: ## @@ -30,7 +30,7 @@ #include #include -#include +#include Review Comment: let's keep atomic.h header file ```sug

[PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-16 Thread via GitHub
zyfeier opened a new pull request, #14827: URL: https://github.com/apache/nuttx/pull/14827 ## Summary Modify the kernel to use only the long type atomic interfaces, avoiding the use of sizeof or typeof to determine the type of atomic operations, thereby simplifying the kernel's atomi

Re: [PR] arch_atomic: nx only use atomic_long_xxx function [nuttx]

2024-11-16 Thread via GitHub
nuttxpr commented on PR #14827: URL: https://github.com/apache/nuttx/pull/14827#issuecomment-2480939379 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues) No, this PR description does not adequately meet the Nu