renamed "function"

This commit is contained in:
Lenni Hein 2025-02-25 16:11:17 +01:00
parent b672bb0906
commit 54d3b00d54
4 changed files with 7 additions and 7 deletions

View File

@ -30,7 +30,7 @@ void signal_handler(int signo) {
uint8_t byte = 0; uint8_t byte = 0;
for (int i = 0; i < BITS; i++) 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) if (time < threshold)
{ {
// set the ith bit of byte to 1 if it was a cache hit // 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 // flush the cache
for (int i = 0; i < BITS; i++) for (int i = 0; i < BITS; i++)
{ {
flush((void *) function + (i << 9)); flush((void *) myStupidNOPFunction + (i << 9));
} }
buffer[byte_index++] = byte; // Store received byte buffer[byte_index++] = byte; // Store received byte
@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
// Flush the cache once before starting // Flush the cache once before starting
for (int i = 0; i < BITS; i++) for (int i = 0; i < BITS; i++)
{ {
flush((void *) function + (i << 9)); flush((void *) myStupidNOPFunction + (i << 9));
} }
signal(SIGALRM, signal_handler); signal(SIGALRM, signal_handler);

View File

@ -51,11 +51,11 @@ int main(int argc, char *argv[])
{ {
if (byte_to_send & (1 << i)) if (byte_to_send & (1 << i))
{ {
maccess((void *) function + (i<<9)); maccess((void *) myStupidNOPFunction + (i<<9));
} }
else else
{ {
flush((void *) function + (i<<9)); flush((void *) myStupidNOPFunction + (i<<9));
} }
} }
} }

View File

@ -68,7 +68,7 @@ void padding_before(void) { asm volatile (
::: :::
); } ); }
void function(void) void myStupidNOPFunction(void)
{ asm volatile ( { asm volatile (
"nop\n\t" "nop\n\t"
"nop\n\t" "nop\n\t"

View File

@ -3,7 +3,7 @@
// Function declarations // Function declarations
void padding_before(void); void padding_before(void);
void function(void); void myStupidNOPFunction(void);
void padding_after(void); void padding_after(void);
#endif // SHAREDLIB_H #endif // SHAREDLIB_H