[flashrom] Re: Why not use usleep() instead of clock_gettime() loop for delay ?

2021-07-13 Thread Daniel Thompson
On Tue, Jul 13, 2021 at 11:45:14AM +0800, Patrick Star wrote: > On Tue, Jul 13, 2021 at 12:42 AM Carl-Daniel Hailfinger < > c-d.hailfinger.devel.2...@gmx.net> wrote: > > > Hi, > > > > Am 12.07.21 um 13:14 schrieb Patrick Star: > > > On Mon, Jul 12, 2021 at 5:53 PM Daniel Thompson > > >

[flashrom] Re: Why not use usleep() instead of clock_gettime() loop for delay ?

2021-07-12 Thread Patrick Star
On Tue, Jul 13, 2021 at 12:42 AM Carl-Daniel Hailfinger < c-d.hailfinger.devel.2...@gmx.net> wrote: > Hi, > > Am 12.07.21 um 13:14 schrieb Patrick Star: > > On Mon, Jul 12, 2021 at 5:53 PM Daniel Thompson > > mailto:daniel.thomp...@linaro.org>> wrote: > > > > On Sat, Jul 10, 2021 at

[flashrom] Re: Why not use usleep() instead of clock_gettime() loop for delay ?

2021-07-12 Thread Carl-Daniel Hailfinger
Hi, Am 12.07.21 um 13:14 schrieb Patrick Star: > On Mon, Jul 12, 2021 at 5:53 PM Daniel Thompson > mailto:daniel.thomp...@linaro.org>> wrote: > > On Sat, Jul 10, 2021 at 11:45:19AM +0800, Patrick Star wrote: > > I saw flashrom process use too many cpu time when I use it to write > >

[flashrom] Re: Why not use usleep() instead of clock_gettime() loop for delay ?

2021-07-12 Thread Daniel Thompson
On Sat, Jul 10, 2021 at 11:45:19AM +0800, Patrick Star wrote: > I saw flashrom process use too many cpu time when I use it to write > flashchip. > Then I strace the process, and found too many > "clock_gettime(CLOCK_MONOTONIC...)" system call. This is odd. clock_gettime(CLOCK_MONOTONIC...)

[flashrom] Re: Why not use usleep() instead of clock_gettime() loop for delay ?

2021-07-11 Thread Jonathan A. Kollasch
On Sat, Jul 10, 2021 at 11:45:19AM +0800, Patrick Star wrote: > I saw flashrom process use too many cpu time when I use it to write > flashchip. > Then I strace the process, and found too many > "clock_gettime(CLOCK_MONOTONIC...)" system call. > And located it to udelay.c line 39, in function