pc_event.cc (8798:adaa92be9037) pc_event.cc (8991:69fad6658160)
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);
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 for (iterator i = range.first; i != range.second; ++i) {
59 iterator i = range.first;
60 while (i != range.second &&
61 i != pc_map.end()) {
60 if (*i == event) {
61 DPRINTF(PCEvent, "PC based event removed at %#x: %s\n",
62 event->pc(), event->descr());
62 if (*i == event) {
63 DPRINTF(PCEvent, "PC based event removed at %#x: %s\n",
64 event->pc(), event->descr());
63 pc_map.erase(i);
65 i = pc_map.erase(i);
64 ++removed;
66 ++removed;
67 } else {
68 i++;
65 }
69 }
70
66 }
67
68 return removed > 0;
69}
70
71bool
72PCEventQueue::schedule(PCEvent *event)
73{

--- 83 unchanged lines hidden ---
71 }
72
73 return removed > 0;
74}
75
76bool
77PCEventQueue::schedule(PCEvent *event)
78{

--- 83 unchanged lines hidden ---