[procps] Re: a few more patches

  • From: Jim Warner <james.warner@xxxxxxxxxxx>
  • To: Procps-ng Mail list <procps@xxxxxxxxxxxxx>
  • Date: Sun, 26 Sep 2021 03:31:02 -0500

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.



Other related posts: