Hi, This is what i came up with in response to the presence of a number of macros to access ptid members and to do ptid-related checks. I've dropped all the macros and used the underlying implementation where suitable. New functions were created (ptid_is_lwp, ptid_is_tid) to do additional checks without the need of macros. I've grouped the null_ptid and minus_one_ptid checks inside ptid_is_invalid to reuse existing code. A run from the testsuite tells me there are no regressions. I've been extra careful to convert from the ptid-building macros to the ptid_build function since sol-thread.c and aix-thread.c had some variations regarding the position of TID/LWP inside the ptid. Please double check. Luis