ghaerr commented on issue #18566:
URL: https://github.com/apache/nuttx/issues/18566#issuecomment-5152445560

   > I found that the existing Microwindows eCos support already contains 
solutions to both of these problems,
   >  I used the POSIX per-thread key mechanism to keep a pointer to the 
per-client data in each task's own TLS. What do you think of this approach 
   
   Pretty cool!! Given that this is/was already made to work for eCOS (albeit 
years ago), I am glad to see it resurrected as a way to implement 
mulitple-application connections to the Nano-X server, all in a single address 
space, rather than than using normally required separate processes (or 
LINK_APP_INTO_SERVER/NONETWORK approach, which allows only a single client).
   
   I would suggest that rather than using \#if ECOS || NUTTX for this TLS 
approach, creating a new define (e.g. MULTITHREAD_SERVER) be used, so that its 
resurrection becomes a standard feature if enabled. During this process, I 
would not worry as much about keeping eCos working, instead getting it working 
well on NuttX and cleaning up the previous source where appropriate. If/when 
eCos maintainers want to update their decades-old port, they can build on what 
you've got working with the current source tree and NuttX.
   
   > As for examples, I ported nxcalc and nxterm. nxterm turns into a terminal 
emulator running NSH over a pseudo terminal, and I made nxterm the init entry 
point
   
   This is very nice. You may also consider using `nxstart` as the entry point, 
which allows for menu selection of the demo applications to run, although that 
might require some ifdefs within nxstart.c, which would be OK.
   
   > when the calculator opens it overlaps the nxterm window and the text in 
nxterm disappears.
   
   This is a known problem: nxterm doesn't keep a copy of the text/attributes 
displayed, so the screen is blanked instead. This is on the list to be fixed, 
but is a bit complicated due to nxterm's internal design. I have slowly been 
working on thoughts of a replacement terminal emulator, but have not had time.


-- 
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