Commit 14e2ab91 authored by Junjie Hu's avatar Junjie Hu
Browse files

android.openglperf.cts.GlVboPerfTest#testVboVsNonVboPerfGeometry0 seldom fail



The test case runs a GLThread and a UIThread simultaneously. But a race condition will happen on the following conditions.
1. GLThread is context switched out at the moment mSemaphore.release() in reset() (cts/libs/util/src/android/cts/util/WatchDog.java)
2. Then, UIThread is executed and calls stop() which will set mSemaphore as NULL (cts/libs/util/src/android/cts/util/WatchDog.java)
3. Finally, GLThread is context switched in and cause a java.lang.NullPointerException on mSemaphore.

This patch will make sure the exceution order of UIThread and GLThread correctly and safely.

Change-Id: I8b8c28b3af16c6a58cfcb16dc62439fd243d9c29
Signed-off-by: default avatarJunjie Hu <junjie.hu@mediatek.com>
parent 789364da
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment