Change regcache list to be an hash map
[deliverable/binutils-gdb.git] / gdb / gdbsupport / ptid.h
index f5625a61387b5bfd44b88f464571b5ace1de921f..d00a0964bb992ad6ac2349b4056cc482ecc11633 100644 (file)
@@ -32,6 +32,8 @@
    thread_stratum target that might want to sit on top.
 */
 
+#include <functional>
+
 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> 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;
This page took 0.025222 seconds and 4 git commands to generate.