1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 42 unchanged lines hidden (view full) --- 51PCEventQueue::~PCEventQueue() 52{} 53 54bool 55PCEventQueue::remove(PCEvent *event) 56{ 57 int removed = 0; 58 range_t range = equal_range(event); |
59 iterator i = range.first; 60 while (i != range.second && 61 i != pc_map.end()) { |
62 if (*i == event) { 63 DPRINTF(PCEvent, "PC based event removed at %#x: %s\n", 64 event->pc(), event->descr()); |
65 i = pc_map.erase(i); |
66 ++removed; |
67 } else { 68 i++; |
69 } |
70 |
71 } 72 73 return removed > 0; 74} 75 76bool 77PCEventQueue::schedule(PCEvent *event) 78{ --- 83 unchanged lines hidden --- |