Assert ruby thread

Hello,
is there a portable way to assert in a C extension that the current
thread is a ruby thread?

Kind regards,
Torsten