mmp / pbrt-v4

Source code to pbrt, the ray tracer described in the forthcoming 4th edition of the "Physically Based Rendering: From Theory to Implementation" book.
https://pbrt.org
Apache License 2.0
2.81k stars 433 forks source link

Remove needless lock from log.cpp/ElapsedSeconds #302

Closed Kerdek closed 1 year ago

Kerdek commented 1 year ago

Static local variable start was guarded by a mutex, but all concurrent accesses are reads.

mmp commented 1 year ago

Indeed, this is unnecessary, though looking at the commit logs, it looks like I added this to silence bogus warnings from helgrind. So I think it's worth keeping it in the interests of making helgrind use more pleasant, when it's necessary...