Is there any API that returns the thread state?

I want to know if there is any POSIX API that takes thread id as input and returns the thread state for OMThread and OMOSThread.

use the pidin command to see the state of the thread.

pidin -p <process_id> -f J displays the thread state of the specified process_id. If no POSIX API is there use this in system call

What is OMThread and OMOSThread?