tests: mutex: fixed a testcase assert failure

Modify the testcase design to solve some threads
can't lock mutex. Using array index to detect the order
of threads getting mutex instead of delaying.

Fixed #34116

Signed-off-by: Ningx Zhao <ningx.zhao@intel.com>
1 file changed