A function is considered threadsafe if you can start it simultaneously in multiple threads within the same process.
A function is threadsafe if and only if all the functions it calls are threadsafe also. Socket APIs are comprised of system and network functions, which are both threadsafe.
All network functions with names that end in "_r" have similar semantics and are also threadsafe.
The other resolver routines are threadsafe with each other but they use the _res data structure. This data structure is shared between all threads in a process and can be changed by an application during a resolver call.