I have a code in 32 bit in which int is used in place of pthread_t ? so while porting do i need to change to long in LP64 (64 bit). What is the datatype of pthread_t ?
pthread_t
is an implementation defined type; no assumption should be made on its underlying type.
POSIX.1-2008 adds that:
IEEE Std 1003.1-2001/Cor 2-2004, item XBD/TC2/D6/26 is applied, adding pthread_t to the list of types that are not required to be arithmetic types, thus allowing pthread_t to be defined as a structure.
Use pthread_t
like you are supposed to. Done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With