X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbsupport%2Fptid.h;fp=gdb%2Fgdbsupport%2Fptid.h;h=d00a0964bb992ad6ac2349b4056cc482ecc11633;hb=42b502299d428786938f90363cbfb62ae768cadb;hp=f5625a61387b5bfd44b88f464571b5ace1de921f;hpb=4c449d978ae4916445678ca41993d280aa6854ed;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbsupport/ptid.h b/gdb/gdbsupport/ptid.h index f5625a6138..d00a0964bb 100644 --- a/gdb/gdbsupport/ptid.h +++ b/gdb/gdbsupport/ptid.h @@ -32,6 +32,8 @@ thread_stratum target that might want to sit on top. */ +#include + class ptid_t { public: @@ -143,6 +145,17 @@ private: long m_tid; }; +struct hash_ptid +{ + size_t operator() (const ptid_t &ptid) const + { + std::hash long_hash; + return (long_hash (ptid.pid ()) + + long_hash (ptid.lwp ()) + + long_hash (ptid.tid ())); + } +}; + /* The null or zero ptid, often used to indicate no process. */ extern const ptid_t null_ptid;