3c3,4
< * Copyright (c) 2012 Mark D. Hill and David A. Wood
---
> * Copyright (c) 2012-2013 Mark D. Hill and David A. Wood
> * Copyright (c) 2013 Advanced Micro Devices, Inc.
41c42
< EventQueue::schedule(Event *event, Tick when)
---
> EventQueue::schedule(Event *event, Tick when, bool global)
48c49,60
< insert(event);
---
>
> // The check below is to make sure of two things
> // a. a thread schedules local events on other queues through the asyncq
> // b. a thread schedules global events on the asyncq, whether or not
> // this event belongs to this eventq. This is required to maintain
> // a total order amongst the global events. See global_event.{cc,hh}
> // for more explanation.
> if (inParallelMode && (this != curEventQueue() || global)) {
> asyncInsert(event);
> } else {
> insert(event);
> }
50,53d61
< if (this == &mainEventQueue)
< event->flags.set(Event::IsMainQueue);
< else
< event->flags.clear(Event::IsMainQueue);
63a72
> assert(!inParallelMode || this == curEventQueue());
82a92
> assert(!inParallelMode || this == curEventQueue());
91,94d100
< if (this == &mainEventQueue)
< event->flags.set(Event::IsMainQueue);
< else
< event->flags.clear(Event::IsMainQueue);