Re: a few more patches
Craig Small <[email protected]> Sun, 26 Sep 2021 21:05:34 +1000
| Newsgroups | gmane.linux.procps.devel |
|---|---|
| Message-ID | <CALy8Cw4yLBDUcQFF0c=8p+pzsqKTN8Lp2LkApUFk_WGvuQ7bcg@mail.gmail.com> |
Hi Jim, I'm not really sure why I put that there. I generally don't like static buffers as a rule. - Craig On Sun, 26 Sept 2021 at 18:31, Jim Warner <[email protected]> wrote: > On 9/25/21 11:48 PM, Craig Small wrote: > > newlib is pushed and I've ignored all the patches for master as > > requested. > > Hi Craig, > > Thanks for the push. > > I had to give up on implementing threads under the master branch top. > > I don't know what inspired you to employ the '__thread' attribute for > those newlib uptime buffers way back in 2015. But that provision is key > to why any multi-threaded program had better stay away from our current > libprocps. > > Nowhere under the master branch is that attribute used. In top's case, > three different threads were directly or indirectly trying to use the > single static global buffer in sysinfo.c shared by the loadavg(), > meminfo() and uptime() functions. > > There is one additional newlib buffer that deserves '__thread'. I'll > send a patch for that eventually. > > Regards, > > Jim >