summaryrefslogtreecommitdiffstats
path: root/extra.h
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2024-11-14 16:30:50 -0500
committerJoshua Bakita <jbakita@cs.unc.edu>2024-11-14 16:31:33 -0500
commitadca31b9bfa537da927a21fdb8e65891f0a02c53 (patch)
treef415caa5c2b9fb0950ef52e7c52a1a9d53c92c05 /extra.h
parent92df3dcae6747e4410574e7bf1f14dd1c07c3471 (diff)
Changes left by Tyler on tamartas22-casestudy
Found while cleaning up and removing his home directory
Diffstat (limited to 'extra.h')
-rw-r--r--extra.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/extra.h b/extra.h
index a4a3d9c..1fdbda7 100644
--- a/extra.h
+++ b/extra.h
@@ -163,6 +163,10 @@ static void _rt_load_params_itrl(int argc, char **argv) {
163 perror("Unable to allocate buffer for execution times"); 163 perror("Unable to allocate buffer for execution times");
164 exit(1); 164 exit(1);
165 } 165 }
166 memset(_rt_start_time, 0, _rt_max_jobs * _rt_will_output * sizeof(long long));
167 memset(_rt_end_time, 0, _rt_max_jobs * _rt_will_output * sizeof(long long));
168 memset(_rt_exec_time, 0, _rt_max_jobs * _rt_will_output * sizeof(long long));
169
166#ifdef PAIRED 170#ifdef PAIRED
167 // __rt_sem2_name happens to be the longest 171 // __rt_sem2_name happens to be the longest
168 if (strlen(pairId) + strlen(_rt_sem2_name) > _ID_SZ) { 172 if (strlen(pairId) + strlen(_rt_sem2_name) > _ID_SZ) {
@@ -370,6 +374,7 @@ static void _rt_save_job_result() {
370 374
371// Save all buffered timing results to disk 375// Save all buffered timing results to disk
372static void _rt_write_to_file() { 376static void _rt_write_to_file() {
377 fprintf(stderr, "finished\n");
373 char fileName[_RT_FILENAME_LEN]; 378 char fileName[_RT_FILENAME_LEN];
374 FILE *fp; 379 FILE *fp;
375 munlockall(); 380 munlockall();
@@ -432,9 +437,11 @@ static void _rt_start_loop() {
432 // FLUSH_CACHES 437 // FLUSH_CACHES
433 return; 438 return;
434 } 439 }
440
435#if LITMUS 441#if LITMUS
436 // static lt_t last = 0; 442 // static lt_t last = 0;
437 if (_rt_jobs_complete == 0) { 443 if (_rt_jobs_complete == 0) {
444 // fprintf(stderr, "beginning..\n");
438 if(wait_for_ts_release() != 0){ 445 if(wait_for_ts_release() != 0){
439 perror("Unable to wait for taskset release"); 446 perror("Unable to wait for taskset release");
440 exit(1); 447 exit(1);