X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fgdbsupport%2Fptid.h;h=232593af5d2daf304b2d24306da0b6588b79de8f;hb=refs%2Fheads%2Finferior-thread-map-2020-01-16;hp=ef52d55512600c3b108dcdee8e029523c430501d;hpb=2301204a3b3cd6553f7490498b3adc5973157c1b;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/gdbsupport/ptid.h b/gdb/gdbsupport/ptid.h index ef52d55512..232593af5d 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;