base.cc (2665:a124942bacb8) base.cc (2667:fe64b8353b1c)
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;

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

88 for (int i = 0; i < number_of_threads; ++i)
89 comInstEventQueue[i] = new EventQueue("instruction-based event queue");
90
91 //
92 // set up instruction-count-based termination events, if any
93 //
94 if (p->max_insts_any_thread != 0)
95 for (int i = 0; i < number_of_threads; ++i)
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;

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

88 for (int i = 0; i < number_of_threads; ++i)
89 comInstEventQueue[i] = new EventQueue("instruction-based event queue");
90
91 //
92 // set up instruction-count-based termination events, if any
93 //
94 if (p->max_insts_any_thread != 0)
95 for (int i = 0; i < number_of_threads; ++i)
96 new SimExitEvent(comInstEventQueue[i], p->max_insts_any_thread,
97 "a thread reached the max instruction count");
96 new SimLoopExitEvent(comInstEventQueue[i], p->max_insts_any_thread,
97 "a thread reached the max instruction count");
98
99 if (p->max_insts_all_threads != 0) {
100 // allocate & initialize shared downcounter: each event will
101 // decrement this when triggered; simulation will terminate
102 // when counter reaches 0
103 int *counter = new int;
104 *counter = number_of_threads;
105 for (int i = 0; i < number_of_threads; ++i)

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

113 for (int i = 0; i < number_of_threads; ++i)
114 comLoadEventQueue[i] = new EventQueue("load-based event queue");
115
116 //
117 // set up instruction-count-based termination events, if any
118 //
119 if (p->max_loads_any_thread != 0)
120 for (int i = 0; i < number_of_threads; ++i)
98
99 if (p->max_insts_all_threads != 0) {
100 // allocate & initialize shared downcounter: each event will
101 // decrement this when triggered; simulation will terminate
102 // when counter reaches 0
103 int *counter = new int;
104 *counter = number_of_threads;
105 for (int i = 0; i < number_of_threads; ++i)

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

113 for (int i = 0; i < number_of_threads; ++i)
114 comLoadEventQueue[i] = new EventQueue("load-based event queue");
115
116 //
117 // set up instruction-count-based termination events, if any
118 //
119 if (p->max_loads_any_thread != 0)
120 for (int i = 0; i < number_of_threads; ++i)
121 new SimExitEvent(comLoadEventQueue[i], p->max_loads_any_thread,
122 "a thread reached the max load count");
121 new SimLoopExitEvent(comLoadEventQueue[i], p->max_loads_any_thread,
122 "a thread reached the max load count");
123
124 if (p->max_loads_all_threads != 0) {
125 // allocate & initialize shared downcounter: each event will
126 // decrement this when triggered; simulation will terminate
127 // when counter reaches 0
128 int *counter = new int;
129 *counter = number_of_threads;
130 for (int i = 0; i < number_of_threads; ++i)

--- 275 unchanged lines hidden ---
123
124 if (p->max_loads_all_threads != 0) {
125 // allocate & initialize shared downcounter: each event will
126 // decrement this when triggered; simulation will terminate
127 // when counter reaches 0
128 int *counter = new int;
129 *counter = number_of_threads;
130 for (int i = 0; i < number_of_threads; ++i)

--- 275 unchanged lines hidden ---