Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-14 Thread via GitHub
yamt commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2478034941 > > But the problem might be that the iram is not compatiable with `s32c1i` instruction. @tmedicci you may need to check this with the IC designer. > > @tmedicci Found this statement i

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-14 Thread via GitHub
chirping78 commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2477830420 > But the problem might be that the iram is not compatiable with `s32c1i` instruction. @tmedicci you may need to check this with the IC designer. > @tmedicci Found t

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-14 Thread via GitHub
chirping78 commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2476403424 Using JTAG to single step through the `nxsem_wait` function, it shows that it's not an alignment issue, but the `s32c1i` instruction caused the exception. ```

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-12 Thread via GitHub
yamt commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1839502661 ## sched/semaphore/sem_post.c: ## @@ -78,21 +78,20 @@ int nxsem_post(FAR sem_t *sem) uint8_t proto; #endif - DEBUGASSERT(sem != NULL); - /* The following operati

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-12 Thread via GitHub
yamt commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1839500844 ## sched/semaphore/sem_post.c: ## @@ -78,21 +78,20 @@ int nxsem_post(FAR sem_t *sem) uint8_t proto; #endif - DEBUGASSERT(sem != NULL); - /* The following operati

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-03 Thread via GitHub
zyfeier commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2453964517 @tmedicci Could you please help test if this patch #14625 can fix the issue? Thanks. -- This is an automated message from the Apache Git Service. To respond to the message, please log

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-01 Thread via GitHub
tmedicci commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2452092699 > @tmedicci We cannot reproduce this issue with other boards and qemu which use xtensa arch, and we also do not have an ESP32 board. Could you provide the ELF file, or could you help deb

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-11-01 Thread via GitHub
zyfeier commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2451477049 @tmedicci We cannot reproduce this issue with other boards and qemu, and we also do not have an ESP32 board. Could you provide the ELF file, or could you help debug using J-Link to gather

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-31 Thread via GitHub
zyfeier commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2451282738 > Hi @zyfeier , this PR broke `esp32-devkitc:sotest` . The device can't boot anymore: > > ## Steps to reproduce > ``` > make -j distclean && ./tools/configure.sh esp32-devkitc

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-31 Thread via GitHub
tmedicci commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2450804245 Hi @zyfeier , this PR broke `esp32-devkitc:sotest` . The device can't boot anymore: ## Steps to reproduce ``` make -j distclean && ./tools/configure.sh esp32-devkitc:sote

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-29 Thread via GitHub
xiaoxiang781216 merged PR #14465: URL: https://github.com/apache/nuttx/pull/14465 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nu

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-29 Thread via GitHub
pussuw commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2444829110 > @pussuw should we merge this patch and optimize priority inheritance and semaphore later? Fine by me -- This is an automated message from the Apache Git Service. To respond to t

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-29 Thread via GitHub
xiaoxiang781216 commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2444657762 @pussuw should we merge this patch and optimize priority inheritance and semaphore later? -- This is an automated message from the Apache Git Service. To respond to the message,

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812583298 ## sched/semaphore/semaphore.h: ## @@ -31,10 +31,17 @@ #include #include #include +#include #include #include +/**

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812585535 ## sched/semaphore/sem_wait.c: ## @@ -224,6 +213,65 @@ int nxsem_wait(FAR sem_t *sem) return ret; } +/*

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812583298 ## sched/semaphore/semaphore.h: ## @@ -31,10 +31,17 @@ #include #include #include +#include #include #include +/**

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
zyfeier commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812582686 ## sched/semaphore/sem_wait.c: ## @@ -224,6 +213,65 @@ int nxsem_wait(FAR sem_t *sem) return ret; } +/

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
zyfeier commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812561451 ## sched/semaphore/semaphore.h: ## @@ -31,10 +31,17 @@ #include #include #include +#include #include #include +/*

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
zyfeier commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812534128 ## sched/semaphore/sem_destroy.c: ## @@ -72,10 +74,18 @@ int nxsem_destroy(FAR sem_t *sem) * leave the count unchanged but still return OK. */ - if (sem->sem

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
zyfeier commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812531878 ## sched/semaphore/sem_post.c: ## @@ -217,3 +214,60 @@ int nxsem_post(FAR sem_t *sem) return OK; } + +/***

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812206869 ## sched/semaphore/sem_destroy.c: ## @@ -72,10 +74,18 @@ int nxsem_destroy(FAR sem_t *sem) * leave the count unchanged but still return OK. */ - if (sem->semc

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812182144 ## sched/semaphore/sem_wait.c: ## @@ -224,6 +213,65 @@ int nxsem_wait(FAR sem_t *sem) return ret; } +/*

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812176461 ## sched/semaphore/sem_wait.c: ## @@ -69,17 +68,12 @@ * / -int nxsem_wait(FAR sem_t *se

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812176461 ## sched/semaphore/sem_wait.c: ## @@ -69,17 +68,12 @@ * / -int nxsem_wait(FAR sem_t *se

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812161905 ## sched/semaphore/semaphore.h: ## @@ -31,10 +31,17 @@ #include #include #include +#include #include #include +/**

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-23 Thread via GitHub
pussuw commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r1812161905 ## sched/semaphore/semaphore.h: ## @@ -31,10 +31,17 @@ #include #include #include +#include #include #include +/**

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-22 Thread via GitHub
anchao commented on code in PR #14465: URL: https://github.com/apache/nuttx/pull/14465#discussion_r181174 ## sched/semaphore/sem_post.c: ## @@ -217,3 +214,60 @@ int nxsem_post(FAR sem_t *sem) return OK; } + +/

Re: [PR] sem: change sem wait to atomic operation [nuttx]

2024-10-22 Thread via GitHub
nuttxpr commented on PR #14465: URL: https://github.com/apache/nuttx/pull/14465#issuecomment-2430640628 [**\[Experimental Bot, please feedback here\]**](https://github.com/search?q=repo%3Aapache%2Fnuttx+13552&type=issues) The PR summary is somewhat informative, but the rest of

[PR] sem: change sem wait to atomic operation [nuttx]

2024-10-22 Thread via GitHub
zyfeier opened a new pull request, #14465: URL: https://github.com/apache/nuttx/pull/14465 ## Summary Add sem_wait fast operations, use atomic to ensure atomicity of semcount operations, and do not depend on critical section. Test with robot board: before modify: nxmu