shithub: riscv

Download patch

ref: eef4565003def0a1e72bf381665027ebe0420c6f
parent: 440202d029af36e5e52545a3badd1ea459961f84
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri May 23 14:56:20 EDT 2014

libc: avoid static table and supurious reads in nsec()

use two per process memory slots, one for the
pid and one for the fd instead of a global table
avoiding the case when the table gets full.

instead of calling pread() on the cached fd
(dangerous as it has side effects when the
fd was not closed), we check if the cached fd
is still good  using fd2path() when called
the first time in this process.