diff --git a/src/recv.c b/src/recv.c index 49398c1..d1d0418 100644 --- a/src/recv.c +++ b/src/recv.c @@ -30,7 +30,7 @@ void signal_handler(int signo) { uint8_t byte = 0; for (int i = 0; i < BITS; i++) { - size_t time = time_maccess((void *) function + (i << 9)); + size_t time = time_maccess((void *) myStupidNOPFunction + (i << 9)); if (time < threshold) { // set the ith bit of byte to 1 if it was a cache hit @@ -41,7 +41,7 @@ void signal_handler(int signo) { // flush the cache for (int i = 0; i < BITS; i++) { - flush((void *) function + (i << 9)); + flush((void *) myStupidNOPFunction + (i << 9)); } buffer[byte_index++] = byte; // Store received byte @@ -63,7 +63,7 @@ int main(int argc, char *argv[]) { // Flush the cache once before starting for (int i = 0; i < BITS; i++) { - flush((void *) function + (i << 9)); + flush((void *) myStupidNOPFunction + (i << 9)); } signal(SIGALRM, signal_handler); diff --git a/src/send.c b/src/send.c index d6ded57..f17ce05 100644 --- a/src/send.c +++ b/src/send.c @@ -51,11 +51,11 @@ int main(int argc, char *argv[]) { if (byte_to_send & (1 << i)) { - maccess((void *) function + (i<<9)); + maccess((void *) myStupidNOPFunction + (i<<9)); } else { - flush((void *) function + (i<<9)); + flush((void *) myStupidNOPFunction + (i<<9)); } } } diff --git a/src/sharedlib.c b/src/sharedlib.c index 3471ab4..5d33124 100644 --- a/src/sharedlib.c +++ b/src/sharedlib.c @@ -68,7 +68,7 @@ void padding_before(void) { asm volatile ( ::: ); } -void function(void) +void myStupidNOPFunction(void) { asm volatile ( "nop\n\t" "nop\n\t" diff --git a/src/sharedlib.h b/src/sharedlib.h index 5aa0071..81d9ef2 100644 --- a/src/sharedlib.h +++ b/src/sharedlib.h @@ -3,7 +3,7 @@ // Function declarations void padding_before(void); -void function(void); +void myStupidNOPFunction(void); void padding_after(void); #endif // SHAREDLIB_H \ No newline at end of file