renamed "function"
This commit is contained in:
parent
b672bb0906
commit
54d3b00d54
@ -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);
|
||||
|
||||
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ void padding_before(void) { asm volatile (
|
||||
:::
|
||||
); }
|
||||
|
||||
void function(void)
|
||||
void myStupidNOPFunction(void)
|
||||
{ asm volatile (
|
||||
"nop\n\t"
|
||||
"nop\n\t"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
// Function declarations
|
||||
void padding_before(void);
|
||||
void function(void);
|
||||
void myStupidNOPFunction(void);
|
||||
void padding_after(void);
|
||||
|
||||
#endif // SHAREDLIB_H
|
||||
Loading…
Reference in New Issue
Block a user