Skip to content

Commit

Permalink
Fix nasa#299, Sleep before exit when printing
Browse files Browse the repository at this point in the history
  • Loading branch information
pavll committed Aug 29, 2021
1 parent 6d40816 commit 95c59f9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions fsw/pc-linux/src/cfe_psp_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ void CFE_PSP_InitCDS(void)
if ((key = ftok(CFE_PSP_CDS_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create CDS Shared memory key!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -152,6 +153,7 @@ void CFE_PSP_InitCDS(void)
if ((CDSShmId = shmget(key, CFE_PSP_CDS_SIZE, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget CDS Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -162,6 +164,7 @@ void CFE_PSP_InitCDS(void)
if (CFE_PSP_ReservedMemoryMap.CDSMemory.BlockPtr == (void *)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to CDS Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand Down Expand Up @@ -347,6 +350,7 @@ void CFE_PSP_InitResetArea(void)
if ((key = ftok(CFE_PSP_RESET_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create Reset Area Shared memory key!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -369,6 +373,7 @@ void CFE_PSP_InitResetArea(void)
if ((ResetAreaShmId = shmget(key, total_size, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget Reset Area Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -379,6 +384,7 @@ void CFE_PSP_InitResetArea(void)
if (block_addr == (cpuaddr)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to Reset Area Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand Down Expand Up @@ -485,6 +491,7 @@ void CFE_PSP_InitUserReservedArea(void)
if ((key = ftok(CFE_PSP_RESERVED_KEY_FILE, 'R')) == -1)
{
OS_printf("CFE_PSP: Cannot Create User Reserved Area Shared memory key!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -494,6 +501,7 @@ void CFE_PSP_InitUserReservedArea(void)
if ((UserShmId = shmget(key, CFE_PSP_USER_RESERVED_SIZE, 0644 | IPC_CREAT)) == -1)
{
OS_printf("CFE_PSP: Cannot shmget User Reserved Area Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand All @@ -504,6 +512,7 @@ void CFE_PSP_InitUserReservedArea(void)
if (CFE_PSP_ReservedMemoryMap.UserReservedMemory.BlockPtr == (void *)(-1))
{
OS_printf("CFE_PSP: Cannot shmat to User Reserved Area Shared memory Segment!\n");
OS_TaskDelay(1000);
exit(-1);
}

Expand Down

0 comments on commit 95c59f9

Please sign in to comment.