Re: avoiding pitfal of reuse of globals in FLAT mode?

2021-03-23 Thread Xiang Xiao
On Wed, Mar 24, 2021 at 9:18 AM Matias N. wrote: > > > On Tue, Mar 23, 2021, at 22:09, Nathan Hartman wrote: > > On Tue, Mar 23, 2021 at 8:39 PM Matias N. matias%40imap.cc>> wrote: > > > > > Hi, > > > while using getopt() from a task started from NSH I realized subsequent > > > calls reused the

Re: avoiding pitfal of reuse of globals in FLAT mode?

2021-03-23 Thread spudaneco
One option is to replace the globals with accessor functions and use TLS to hold the actua. data.Sent from my Galaxy Original message From: "Matias N." Date: 3/23/21 7:18 PM (GMT-06:00) To: dev@nuttx.apache.org Subject: Re: avoiding pitfal of reuse of globals in FLAT mode? On

Re: avoiding pitfal of reuse of globals in FLAT mode?

2021-03-23 Thread Matias N.
On Tue, Mar 23, 2021, at 22:09, Nathan Hartman wrote: > On Tue, Mar 23, 2021 at 8:39 PM Matias N. > wrote: > > > Hi, > > while using getopt() from a task started from NSH I realized subsequent > > calls reused the global optind and similar variables resulting in differe

Re: avoiding pitfal of reuse of globals in FLAT mode?

2021-03-23 Thread Nathan Hartman
On Tue, Mar 23, 2021 at 8:39 PM Matias N. wrote: > Hi, > while using getopt() from a task started from NSH I realized subsequent > calls reused the global optind and similar variables resulting in different > results each time. I'm aware this is expected in FLAT mode and is related > to the issue

avoiding pitfal of reuse of globals in FLAT mode?

2021-03-23 Thread Matias N.
Hi, while using getopt() from a task started from NSH I realized subsequent calls reused the global optind and similar variables resulting in different results each time. I'm aware this is expected in FLAT mode and is related to the issue of static C++ constructors (they would only be called onc

Re: [OT] Rust is landing on Linux

2021-03-23 Thread nuno felicio
Not really... The Rust thing ... is like "let's all do secure code by decree", almost looks like a Java/C# thing... It makes me think that making an embedded *BSD distro for embedded devices will probably be something that can have some future Secure code doesn't need to be done in a "secure" hal