なるほど
Windows だと getcurrentthreaid か