Skip to content

Commit bef4780

Browse files
Justin M WozniakJustin M Wozniak
Justin M Wozniak
authored and
Justin M Wozniak
committed
Make GDB variable volatile (closes #129)
1 parent feeea16 commit bef4780

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

turbine/code/src/turbine/turbine.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ check_versions()
9393
This is a separate function so we can set a function breakpoint
9494
*/
9595
static void
96-
gdb_sleep(int* t, int i)
96+
gdb_sleep(volatile int* t, int i)
9797
{
9898
sleep(1);
9999
DEBUG_TURBINE("gdb_check: %i %i\n", *t, i);
@@ -120,7 +120,7 @@ gdb_check(int rank)
120120
{
121121
pid_t pid = getpid();
122122
printf("Waiting for gdb: rank: %i pid: %i\n", rank, pid);
123-
int t = 0;
123+
volatile int t = 0;
124124
int i = 0;
125125
while (!t)
126126
// In GDB, set t=1 to break out

0 commit comments

Comments
 (0)