You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "tmedicci (via GitHub)" <gi...@apache.org> on 2024/07/02 16:56:51 UTC
[PR] espressif: Fix error while evaluating Wi-Fi task ID [nuttx]
tmedicci opened a new pull request, #12560:
URL: https://github.com/apache/nuttx/pull/12560
## Summary
* espressif: Fix error while evaluating Wi-Fi task ID
Use `nxsched_gettid` instead of `nxsched_getpid`. Previously each kernel thread was modeled as a task, so the pid is the same of the kthread id. Now, with shared kthread group (introduced by #12320), the pid of all kthreads will be 0 by design in shared group.
## Impact
Fix Wi-Fi-related configurations that are failing.
## Testing
Internal CI testing
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] espressif: Fix error while evaluating Wi-Fi task ID [nuttx]
Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 commented on PR #12560:
URL: https://github.com/apache/nuttx/pull/12560#issuecomment-2211013476
what's thread/task call newdata_notify?
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] espressif: Fix error while evaluating Wi-Fi task ID [nuttx]
Posted by "TimJTi (via GitHub)" <gi...@apache.org>.
TimJTi commented on PR #12560:
URL: https://github.com/apache/nuttx/pull/12560#issuecomment-2213709232
> what's thread/task call newdata_notify?
@xiaoxiang781216 - wasn't following this and wasn't mentioned so didn't see your question. Not sure I understand what you're asking? I have 6 threads call from my App main: the second thread started has the newdata_notify function, then the last thread started makes a call to it as it is interested in data from that second thread.
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] espressif: Fix error while evaluating Wi-Fi task ID [nuttx]
Posted by "TimJTi (via GitHub)" <gi...@apache.org>.
TimJTi commented on PR #12560:
URL: https://github.com/apache/nuttx/pull/12560#issuecomment-2210990493
@xiaoxiang781216 @yf13
This is what fails for me (on a SAMA5D27 processor)
This is in one thread:
```
typedef struct
{
pid_t pid;
uint8_t signo;
} notify_t;
static notify_t g_notify[CONFIG_MAX_NEWDATA_SIGS];
int newdata_notify(void *callback)
{
int ret;
int idx = 0;
struct sigaction act;
while ((idx < CONFIG_MAX_NEWDATA_SIGS) && g_notify[idx].pid)
{
idx++;
}
if (idx >= CONFIG_MAX_NEWDATA_SIGS)
{
ret = -EINVAL;
goto errout;
}
g_notify[idx].pid = getpid(); // <-------------------- This returns 0 since the PR commit
g_notify[idx].signo = CONFIG_NEWDATA_SIGNO;
/* then code to set up the required sigaction and error handling */
return ret;
}
```
This is in another thread:
` ret = newdata_notify(callback_fn); `
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] espressif: Fix error while evaluating Wi-Fi task ID [nuttx]
Posted by "acassis (via GitHub)" <gi...@apache.org>.
acassis commented on PR #12560:
URL: https://github.com/apache/nuttx/pull/12560#issuecomment-2211004465
@tmedicci please thank a look, seems like a side effect
--
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-unsubscribe@nuttx.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org