summaryrefslogtreecommitdiffstats
path: root/baseline/source
diff options
context:
space:
mode:
authorJoshua Bakita <jbakita@cs.unc.edu>2020-10-19 01:09:53 -0400
committerJoshua Bakita <jbakita@cs.unc.edu>2020-10-19 01:09:53 -0400
commita71fc97fd262e1b5770f827047ea60bbaf38d9a2 (patch)
treeb45ef48c63a35817f2db93dd2fec718778f58b99 /baseline/source
parent41358857592f1908d0c0f9898b6c9acabc1ad161 (diff)
Unify all the versions of extra.h into a single multipurpose header
There was previously a huge amount of shared code that had to be copied back and forth. This should reduce the maintenance burden by containing all future changes to a single file. New unified library is fully backwards-compatible but also introduces and the easy-to-use `for_each_job` macro which replaces the specific `for(...) START_LOOP ... STOP_LOOP` format requirement and is generally much harder to abuse. New unified library also automatically cleans up its shared memory and semaphores, so this commit also removes the separate `cleanupSemaphores` binary. I also found a precursor of `extra.h` written by Sims in `litmusStuff.h`. This code is only interesting for historical purposes, so it is also removed in this commit. This commit also adds debug options to all the Makefiles and silences rm's complaints about non-existent files in make clean.
Diffstat (limited to 'baseline/source')
-rw-r--r--baseline/source/adpcm_dec/adpcm_dec.c2
-rw-r--r--baseline/source/adpcm_enc/adpcm_enc.c2
-rw-r--r--baseline/source/ammunition/ammunition.c2
-rw-r--r--baseline/source/anagram/anagram.c2
-rw-r--r--baseline/source/audiobeam/audiobeam.c2
-rw-r--r--baseline/source/cjpeg_transupp/cjpeg_transupp.c2
-rw-r--r--baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c2
-rw-r--r--baseline/source/dijkstra/dijkstra.c2
-rw-r--r--baseline/source/epic/epic.c2
-rw-r--r--baseline/source/extra.h350
-rw-r--r--baseline/source/fmref/fmref.c2
-rw-r--r--baseline/source/g723_enc/g723_enc.c2
-rw-r--r--baseline/source/gsm_dec/gsm_dec.c2
-rw-r--r--baseline/source/gsm_enc/gsm_enc.c2
-rw-r--r--baseline/source/h264_dec/h264_dec.c2
-rw-r--r--baseline/source/huff_dec/huff_dec.c2
-rw-r--r--baseline/source/huff_enc/huff_enc.c2
-rw-r--r--baseline/source/litmusStuff.h80
-rw-r--r--baseline/source/mpeg2/mpeg2.c2
-rw-r--r--baseline/source/ndes/ndes.c2
-rw-r--r--baseline/source/petrinet/petrinet.c2
-rw-r--r--baseline/source/rijndael_dec/rijndael_dec.c2
-rw-r--r--baseline/source/rijndael_enc/rijndael_enc.c2
-rw-r--r--baseline/source/statemate/statemate.c2
-rw-r--r--baseline/source/susan/susan.c2
25 files changed, 23 insertions, 453 deletions
diff --git a/baseline/source/adpcm_dec/adpcm_dec.c b/baseline/source/adpcm_dec/adpcm_dec.c
index 04a5746..368e98d 100644
--- a/baseline/source/adpcm_dec/adpcm_dec.c
+++ b/baseline/source/adpcm_dec/adpcm_dec.c
@@ -35,7 +35,7 @@
35 Forward declaration of functions 35 Forward declaration of functions
36*/ 36*/
37 37
38#include "../extra.h" 38#include "extra.h"
39 39
40void adpcm_dec_decode( int ); 40void adpcm_dec_decode( int );
41int adpcm_dec_filtez( int *bpl, int *dlt ); 41int adpcm_dec_filtez( int *bpl, int *dlt );
diff --git a/baseline/source/adpcm_enc/adpcm_enc.c b/baseline/source/adpcm_enc/adpcm_enc.c
index 464768f..777aaf5 100644
--- a/baseline/source/adpcm_enc/adpcm_enc.c
+++ b/baseline/source/adpcm_enc/adpcm_enc.c
@@ -29,7 +29,7 @@
29 29
30/* common sampling rate for sound cards on IBM/PC */ 30/* common sampling rate for sound cards on IBM/PC */
31 31
32#include "../extra.h" 32#include "extra.h"
33#define SAMPLE_RATE 11025 33#define SAMPLE_RATE 11025
34 34
35#define PI 3141 35#define PI 3141
diff --git a/baseline/source/ammunition/ammunition.c b/baseline/source/ammunition/ammunition.c
index 269f4c0..052520e 100644
--- a/baseline/source/ammunition/ammunition.c
+++ b/baseline/source/ammunition/ammunition.c
@@ -24,7 +24,7 @@
24 24
25*/ 25*/
26 26
27#include "../extra.h" 27#include "extra.h"
28#include "bits.h" 28#include "bits.h"
29#include "arithm.h" 29#include "arithm.h"
30#include "ammunition_stdlib.h" 30#include "ammunition_stdlib.h"
diff --git a/baseline/source/anagram/anagram.c b/baseline/source/anagram/anagram.c
index b458fd2..5c1f29a 100644
--- a/baseline/source/anagram/anagram.c
+++ b/baseline/source/anagram/anagram.c
@@ -157,7 +157,7 @@
157 steps to FindAnagram. 157 steps to FindAnagram.
158*/ 158*/
159 159
160#include "../extra.h" 160#include "extra.h"
161#include "anagram_ctype.h" 161#include "anagram_ctype.h"
162#include "anagram_stdlib.h" 162#include "anagram_stdlib.h"
163#include "anagram_strings.h" 163#include "anagram_strings.h"
diff --git a/baseline/source/audiobeam/audiobeam.c b/baseline/source/audiobeam/audiobeam.c
index 208de80..50ebfff 100644
--- a/baseline/source/audiobeam/audiobeam.c
+++ b/baseline/source/audiobeam/audiobeam.c
@@ -23,7 +23,7 @@
23 Include section 23 Include section
24*/ 24*/
25 25
26#include "../extra.h" 26#include "extra.h"
27#include "audiobeamlibm.h" 27#include "audiobeamlibm.h"
28#include "audiobeamlibmalloc.h" 28#include "audiobeamlibmalloc.h"
29#include "audiobeam.h" 29#include "audiobeam.h"
diff --git a/baseline/source/cjpeg_transupp/cjpeg_transupp.c b/baseline/source/cjpeg_transupp/cjpeg_transupp.c
index 3f48539..5ec7e5e 100644
--- a/baseline/source/cjpeg_transupp/cjpeg_transupp.c
+++ b/baseline/source/cjpeg_transupp/cjpeg_transupp.c
@@ -29,7 +29,7 @@
29 Include section 29 Include section
30*/ 30*/
31 31
32#include "../extra.h" 32#include "extra.h"
33#include "jpeglib.h" 33#include "jpeglib.h"
34 34
35 35
diff --git a/baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c b/baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c
index 278725c..3c8d7ec 100644
--- a/baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c
+++ b/baseline/source/cjpeg_wrbmp/cjpeg_wrbmp.c
@@ -24,7 +24,7 @@
24 24
25*/ 25*/
26 26
27#include "../extra.h" 27#include "extra.h"
28#include "cdjpeg.h" 28#include "cdjpeg.h"
29 29
30#ifdef CJPEG_WRBMP_BMP_SUPPORTED 30#ifdef CJPEG_WRBMP_BMP_SUPPORTED
diff --git a/baseline/source/dijkstra/dijkstra.c b/baseline/source/dijkstra/dijkstra.c
index 1b6a52f..333fd43 100644
--- a/baseline/source/dijkstra/dijkstra.c
+++ b/baseline/source/dijkstra/dijkstra.c
@@ -17,7 +17,7 @@
17 17
18*/ 18*/
19 19
20#include "../extra.h" 20#include "extra.h"
21#include "input.h" 21#include "input.h"
22 22
23/* 23/*
diff --git a/baseline/source/epic/epic.c b/baseline/source/epic/epic.c
index e258a4a..a1e344c 100644
--- a/baseline/source/epic/epic.c
+++ b/baseline/source/epic/epic.c
@@ -35,7 +35,7 @@
35*/ 35*/
36 36
37 37
38#include "../extra.h" 38#include "extra.h"
39#include "epic.h" 39#include "epic.h"
40 40
41#define X_SIZE 64 41#define X_SIZE 64
diff --git a/baseline/source/extra.h b/baseline/source/extra.h
deleted file mode 100644
index e8f3d18..0000000
--- a/baseline/source/extra.h
+++ /dev/null
@@ -1,350 +0,0 @@
1/**
2 * Copyright 2019 Sims Hill Osborne and Joshua Bakita
3 *
4 * This header provides facilities by which to separably run and time TACLeBench
5 **/
6#define _GNU_SOURCE
7#include <time.h>
8#include <sys/mman.h>
9#include <stdlib.h>
10#include <stdio.h>
11#include <string.h>
12#include <signal.h>
13#include <limits.h>
14#include <fcntl.h>
15#include <stdint.h>
16#include <sched.h>
17
18// This is only visible if _GNU_SOURCE is defined, and that define does not
19// come along to places where this file is included. Address this by manually
20// forcing it into the global namespace.
21extern int sched_getcpu();
22
23// These constants correspond to the imx6q-sabredb platform
24#define LINE_SIZE 32
25#define L2_SIZE 16*2048*32
26
27#if __arm__
28#include <unistd.h>
29#include <sys/syscall.h>
30#endif
31
32#define LITMUS 0
33#define MC2 0
34#define MMDC_PROF 0
35
36#if LITMUS
37#include <litmus.h>
38#endif
39
40#if MMDC_PROF
41#include "/media/speedy/litmus/tools/mmdc/mmdc.h"