Skip to content

Commit 2bb21ab

Browse files
committed
Replace lf_print with LF_DEBUG_PRINT
1 parent 49d7f97 commit 2bb21ab

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/threaded/scheduler_QS.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4545
#include "scheduler.h"
4646
#include "scheduler_instance.h"
4747
#include "scheduler_sync_tag_advance.c"
48+
#include "../utils/vector.h"
4849

4950
#include "../../schedule.h" // Generated
5051

@@ -196,7 +197,7 @@ void set_static_schedule_from_file(
196197
int max_semaphore_id = 0;
197198

198199
while ((read = getline(&line, &len, static_schedule_fp)) != -1) {
199-
printf("Line: %s", line);
200+
LF_PRINT_DEBUG("Line: %s", line);
200201

201202
// Continue if the line is whitespace
202203
if (is_empty(line)) continue;
@@ -216,13 +217,13 @@ void set_static_schedule_from_file(
216217
_lf_sched_instance->schedule_lengths[0][current_worker] = length;
217218
_lf_sched_instance->static_schedules[0][current_worker] =
218219
(inst_t*) malloc(sizeof(inst_t) * length);
219-
lf_print("Schedule length for worker %d: %d", current_worker, length);
220+
LF_PRINT_DEBUG("Schedule length for worker %d: %d", current_worker, length);
220221
} else if (first != NULL && second != NULL) {
221222
char operator = first[0];
222223
int operand = atoi(second);
223224
_lf_sched_instance->static_schedules[0][current_worker][inst_index] =
224225
(inst_t) { .inst = operator, .op = operand };
225-
lf_print("Instruction parsed: %s %d", first, operand);
226+
LF_PRINT_DEBUG("Instruction parsed: %s %d", first, operand);
226227
if ((operator == 'w' || operator == 'n') && operand > max_semaphore_id) {
227228
max_semaphore_id = operand;
228229
}
@@ -232,7 +233,7 @@ void set_static_schedule_from_file(
232233
}
233234

234235
// Populate semaphores.
235-
lf_print("Number of semaphores needed: %d", max_semaphore_id);
236+
LF_PRINT_DEBUG("Number of semaphores needed: %d", max_semaphore_id);
236237
_lf_sched_instance->num_semaphores = max_semaphore_id + 1; // Semaphore id is 0-indexed.
237238
_lf_sched_instance->semaphores = calloc(_lf_sched_instance->num_semaphores, sizeof(semaphore_t));
238239
for (int i = 0; i < _lf_sched_instance->num_semaphores; i++) {

0 commit comments

Comments
 (0)