VP8EncDspCostInit*: add missing TSan annotations

Change-Id: I4cdb84bc8c9a8c6aa34b5773c8fb69e5810a9809
This commit is contained in:
James Zern
2015-02-09 22:39:14 -08:00
parent d97c143da6
commit e3d9771aa1
4 changed files with 12 additions and 4 deletions

View File

@ -78,7 +78,12 @@ extern void VP8SetResidualCoeffsSSE2(const int16_t* const coeffs,
VP8Residual* const res);
#endif // WEBP_USE_SSE2
void VP8EncDspCostInit(void) {
static volatile VP8CPUInfo cost_last_cpuinfo_used =
(VP8CPUInfo)&cost_last_cpuinfo_used;
WEBP_TSAN_IGNORE_FUNCTION void VP8EncDspCostInit(void) {
if (cost_last_cpuinfo_used == VP8GetCPUInfo) return;
VP8GetResidualCost = GetResidualCost;
VP8SetResidualCoeffs = SetResidualCoeffs;
@ -100,6 +105,8 @@ void VP8EncDspCostInit(void) {
}
#endif
}
cost_last_cpuinfo_used = VP8GetCPUInfo;
}
//------------------------------------------------------------------------------