diff options
| author | leochanj <jbakita@cs.unc.edu> | 2020-10-20 21:46:20 -0400 |
|---|---|---|
| committer | leochanj <jbakita@cs.unc.edu> | 2020-10-20 21:46:20 -0400 |
| commit | e2b50015cebdfba68699abd6e8575e38230f5a78 (patch) | |
| tree | 8bc28e082ad58e5fec07de81fd7c7f9bd9db2686 /baseline/source/rijndael_enc/rijndael_enc.c | |
| parent | 79f30887129145e15e5172e36a7d7602859fc932 (diff) | |
| parent | dd606a16e840880e7617b140f6083af8ea83b6b7 (diff) | |
Merge branch 'rtas20-wip' into sd-vbs
Diffstat (limited to 'baseline/source/rijndael_enc/rijndael_enc.c')
| -rw-r--r-- | baseline/source/rijndael_enc/rijndael_enc.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/baseline/source/rijndael_enc/rijndael_enc.c b/baseline/source/rijndael_enc/rijndael_enc.c index 6c85eee..f0582c9 100644 --- a/baseline/source/rijndael_enc/rijndael_enc.c +++ b/baseline/source/rijndael_enc/rijndael_enc.c | |||
| @@ -68,6 +68,7 @@ void rijndael_enc_init( void ) | |||
| 68 | rijndael_enc_fin.data = rijndael_enc_data; | 68 | rijndael_enc_fin.data = rijndael_enc_data; |
| 69 | rijndael_enc_fin.size = 31369; | 69 | rijndael_enc_fin.size = 31369; |
| 70 | rijndael_enc_fin.cur_pos = 0; | 70 | rijndael_enc_fin.cur_pos = 0; |
| 71 | rijndael_enc_checksum = 0; | ||
| 71 | 72 | ||
| 72 | unsigned i; | 73 | unsigned i; |
| 73 | volatile int x = 0; | 74 | volatile int x = 0; |
| @@ -225,14 +226,17 @@ void _Pragma( "entrypoint" ) rijndael_enc_main( void ) | |||
| 225 | 226 | ||
| 226 | int main( int argc, char** argv ) | 227 | int main( int argc, char** argv ) |
| 227 | { | 228 | { |
| 228 | SET_UP | 229 | int exit_code = -1; |
| 229 | for (jobsComplete=0; jobsComplete<maxJobs; jobsComplete++){ | 230 | SET_UP |
| 230 | START_LOOP | 231 | for_each_job { |
| 231 | rijndael_enc_init(); | 232 | rijndael_enc_init(); |
| 232 | rijndael_enc_main(); | 233 | rijndael_enc_main(); |
| 233 | STOP_LOOP | 234 | // This checks the checksum is as expected. |
| 234 | } | 235 | // This is `&` as only the first job will match |
| 235 | WRITE_TO_FILE | 236 | // (PRNG state persists between jobs). |
| 236 | return ( rijndael_enc_return() ); | 237 | exit_code &= rijndael_enc_return(); |
| 238 | } | ||
| 239 | WRITE_TO_FILE | ||
| 240 | return ( exit_code ); | ||
| 237 | } | 241 | } |
| 238 | 242 | ||
