JianyuWang0623 opened a new pull request, #3569:
URL: https://github.com/apache/nuttx-apps/pull/3569

   *Note: Please adhere to [Contributing 
Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).*
   
   ## Summary
   
   Add a `-t` runtime option to `rexecd` to serve each accepted connection
   inline in the main task, instead of spawning a detached worker thread
   per connection.
   
   By default `rexecd` calls `pthread_create()` for every connection, with a
   `CONFIG_NETUTILS_REXECD_STACKSIZE` stack allocated from the heap, so that
   sessions can run concurrently. With `-t`, the thread attributes are
   skipped and `doit()` is called directly in the accept loop, avoiding the
   per-connection worker stack. This helps on low-memory targets with
   limited free heap. The trade-off is that connections are served one at a
   time. Without `-t`, the existing behaviour is unchanged.
   
   ## Impact
   
   - New opt-in `-t` flag; usage text updated.
   - Default behaviour and existing command lines are unaffected.
   - No new Kconfig options or dependencies; build process unchanged.
   - Backward compatible. Only trade-off with `-t` is loss of concurrency.
   
   ## Testing
   
   - `nuttx/tools/checkpatch.sh -f netutils/rexecd/rexecd.c` => all checks pass.
   - Default mode: `rexecd` + `rexec`, thread-per-connection path works.
   - Threadless mode: `rexecd -t` + `rexec`, command runs inline, single
     session works end to end.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to