tests: posix: eventfd: Move thread from stack to data section

The test case allocate struct k_thread thread in the stack. This will
lead the random initial value of thread and thus cause the test cases
randomly hang. To fix such issue, move the declartion of struct k_thread
thread outside the function as a stacic variable.

Signed-off-by: Jaxson Han <jaxson.han@arm.com>
1 file changed