drain.hh (11800:54436a1784dc) drain.hh (11859:76c36516e0ae)
1/*
2 * Copyright (c) 2012, 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 28 unchanged lines hidden (view full) ---

37 * Authors: Andreas Sandberg
38 */
39
40#ifndef __SIM_DRAIN_HH__
41#define __SIM_DRAIN_HH__
42
43#include <atomic>
44#include <mutex>
1/*
2 * Copyright (c) 2012, 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 28 unchanged lines hidden (view full) ---

37 * Authors: Andreas Sandberg
38 */
39
40#ifndef __SIM_DRAIN_HH__
41#define __SIM_DRAIN_HH__
42
43#include <atomic>
44#include <mutex>
45#include <unordered_set>
45#include <vector>
46
47class Drainable;
48
49#ifndef SWIG // SWIG doesn't support strongly typed enums
50/**
51 * Object drain/handover states
52 *
53 * An object starts out in the Running state. When the simulator

--- 103 unchanged lines hidden (view full) ---

157 * objects in a system.
158 */
159 size_t drainableCount() const;
160
161 /** Lock protecting the set of drainable objects */
162 mutable std::mutex globalLock;
163
164 /** Set of all drainable objects */
46
47class Drainable;
48
49#ifndef SWIG // SWIG doesn't support strongly typed enums
50/**
51 * Object drain/handover states
52 *
53 * An object starts out in the Running state. When the simulator

--- 103 unchanged lines hidden (view full) ---

157 * objects in a system.
158 */
159 size_t drainableCount() const;
160
161 /** Lock protecting the set of drainable objects */
162 mutable std::mutex globalLock;
163
164 /** Set of all drainable objects */
165 std::unordered_set<Drainable *> _allDrainable;
165 std::vector<Drainable *> _allDrainable;
166
167 /**
168 * Number of objects still draining. This is flagged atomic since
169 * it can be manipulated by SimObjects living in different
170 * threads.
171 */
172 std::atomic_uint _count;
173

--- 134 unchanged lines hidden ---
166
167 /**
168 * Number of objects still draining. This is flagged atomic since
169 * it can be manipulated by SimObjects living in different
170 * threads.
171 */
172 std::atomic_uint _count;
173

--- 134 unchanged lines hidden ---