Skip to content

Commit

Permalink
Merge pull request #415 from skliper/fix366-dep-fpu-except
Browse files Browse the repository at this point in the history
Fix #366, Deprecated exception handling APIs
  • Loading branch information
astrogeco committed Apr 23, 2020
2 parents 592fd3c + f45f565 commit 9ffab35
Show file tree
Hide file tree
Showing 17 changed files with 21 additions and 502 deletions.
4 changes: 2 additions & 2 deletions src/os/inc/osapi-os-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,8 @@ int32 OS_GetLocalTime (OS_time_t *time_struct);
int32 OS_SetLocalTime (OS_time_t *time_struct);
/**@}*/

#ifndef OSAL_OMIT_DEPRECATED

/**
* @defgroup OSAPIExc OSAL Exception APIs
*
Expand Down Expand Up @@ -1194,8 +1196,6 @@ int32 OS_FPUExcSetMask (uint32 mask);
int32 OS_FPUExcGetMask (uint32 *mask);
/**@}*/

#ifndef OSAL_OMIT_DEPRECATED

/** @defgroup OSAPIInterrupt OSAL Interrupt APIs
* @{
* @deprecated Platform dependencies
Expand Down
4 changes: 4 additions & 0 deletions src/os/posix/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2300,6 +2300,8 @@ static int OS_PriorityRemap(uint32 InputPri)

return OutputPri;
} /* end OS_PriorityRemap */

#ifndef OSAL_OMIT_DEPRECATED

/*----------------------------------------------------------------
*
Expand Down Expand Up @@ -2385,6 +2387,8 @@ int32 OS_FPUExcGetMask_Impl(uint32 *mask)
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_FPUExcGetMask_Impl */

#endif /* OSAL_OMIT_DEPRECATED */

/********************************************************************/
/* CONSOLE OUTPUT */
/********************************************************************/
Expand Down
4 changes: 4 additions & 0 deletions src/os/rtems/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,8 @@ int32 OS_HeapGetInfo_Impl (OS_heap_prop_t *heap_prop)
return (OS_SUCCESS);
} /* end OS_HeapGetInfo_Impl */

#ifndef OSAL_OMIT_DEPRECATED

/*----------------------------------------------------------------
*
* Function: OS_FPUExcAttachHandler_Impl
Expand Down Expand Up @@ -1679,6 +1681,8 @@ int32 OS_FPUExcGetMask_Impl(uint32 *mask)
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_FPUExcGetMask_Impl */

#endif /* OSAL_OMIT_DEPRECATED */

/********************************************************************/
/* CONSOLE OUTPUT */
/********************************************************************/
Expand Down
4 changes: 1 addition & 3 deletions src/os/shared/os-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1859,8 +1859,6 @@ int32 OS_IntSetMask_Impl ( uint32 MaskSetting );
------------------------------------------------------------------*/
int32 OS_IntGetMask_Impl ( uint32 * MaskSettingPtr );

#endif /* OSAL_OMIT_DEPRECATED */

/****************************************************************************************
FLOATING POINT CONFIG/EXCEPTION API LOW-LEVEL IMPLEMENTATION FUNCTIONS
****************************************************************************************/
Expand Down Expand Up @@ -1892,7 +1890,7 @@ int32 OS_FPUExcSetMask_Impl(uint32 mask);
------------------------------------------------------------------*/
int32 OS_FPUExcGetMask_Impl(uint32 *mask);


#endif /* OSAL_OMIT_DEPRECATED */

/****************************************************************************************
MEMORY HEAP API LOW-LEVEL IMPLEMENTATION FUNCTIONS
Expand Down
3 changes: 2 additions & 1 deletion src/os/shared/osapi-fpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <stdlib.h>
#include <string.h>

#ifndef OSAL_OMIT_DEPRECATED

/*
* User defined include files
Expand Down Expand Up @@ -110,4 +111,4 @@ int32 OS_FPUExcDisable (int32 ExceptionNumber)
return OS_FPUExcDisable_Impl(ExceptionNumber);
} /* end OS_FPUExcDisable */


#endif /* OSAL_OMIT_DEPRECATED */
4 changes: 4 additions & 0 deletions src/os/vxworks/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1532,6 +1532,8 @@ int32 OS_HeapGetInfo_Impl (OS_heap_prop_t *heap_prop)

return (OS_SUCCESS);
} /* end OS_HeapGetInfo_Impl */

#ifndef OSAL_OMIT_DEPRECATED

/*----------------------------------------------------------------
*
Expand Down Expand Up @@ -1631,6 +1633,8 @@ int32 OS_FPUExcGetMask_Impl(uint32 *mask)
return Status;
} /* end OS_FPUExcGetMask_Impl */

#endif /* OSAL_OMIT_DEPRECATED */

/********************************************************************/
/* CONSOLE OUTPUT */
/********************************************************************/
Expand Down
46 changes: 0 additions & 46 deletions src/unit-test-coverage/posix/src/coveragetest-osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,47 +408,6 @@ void Test_OS_CompAbsDelayTime(void)
*/
}

void Test_OS_FPUExcAttachHandler_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcAttachHandler_Impl(uint32 ExceptionNumber, void * ExceptionHandler,
* int32 parameter)
*/
}

void Test_OS_FPUExcEnable_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcEnable_Impl(int32 ExceptionNumber)
*/
}

void Test_OS_FPUExcDisable_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcDisable_Impl(int32 ExceptionNumber)
*/
}

void Test_OS_FPUExcSetMask_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcSetMask_Impl(uint32 mask)
*/
}

void Test_OS_FPUExcGetMask_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcGetMask_Impl(uint32 *mask)
*/
}

/* ------------------- End of test cases --------------------------------------*/

/* Osapi_Task_Setup
Expand Down Expand Up @@ -528,11 +487,6 @@ void UtTest_Setup(void)
ADD_TEST(OS_MutSemGetInfo_Impl);
ADD_TEST(OS_HeapGetInfo_Impl);
ADD_TEST(OS_CompAbsDelayTime);
ADD_TEST(OS_FPUExcAttachHandler_Impl);
ADD_TEST(OS_FPUExcEnable_Impl);
ADD_TEST(OS_FPUExcDisable_Impl);
ADD_TEST(OS_FPUExcSetMask_Impl);
ADD_TEST(OS_FPUExcGetMask_Impl);
}


134 changes: 0 additions & 134 deletions src/unit-test-coverage/shared/src/coveragetest-fpu.c

This file was deleted.

2 changes: 2 additions & 0 deletions src/unit-test-coverage/ut-stubs/src/osapi-base-impl-stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ void OS_ApplicationExit_Impl(int32 Status)
*/
UT_DEFAULT_STUB(OS_HeapGetInfo_Impl,(OS_heap_prop_t *heap_prop))

#ifndef OSAL_OMIT_DEPRECATED
/*
* FPU API low-level handlers
*/
Expand All @@ -159,4 +160,5 @@ UT_DEFAULT_STUB(OS_FPUExcEnable_Impl,(int32 ExceptionNumber))
UT_DEFAULT_STUB(OS_FPUExcDisable_Impl,(int32 ExceptionNumber))
UT_DEFAULT_STUB(OS_FPUExcSetMask_Impl,(uint32 mask))
UT_DEFAULT_STUB(OS_FPUExcGetMask_Impl,(uint32 *mask))
#endif /* OSAL_OMIT_DEPRECATED */

51 changes: 0 additions & 51 deletions src/unit-test-coverage/vxworks/src/coveragetest-osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,52 +589,6 @@ void Test_OS_HeapGetInfo_Impl(void)
OSAPI_TEST_FUNCTION_RC(OS_HeapGetInfo_Impl(&heap_prop), OS_ERROR);
}

void Test_OS_FPUExcAttachHandler_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcAttachHandler_Impl(uint32 ExceptionNumber, void * ExceptionHandler,
* int32 parameter)
*/
OSAPI_TEST_FUNCTION_RC(OS_FPUExcAttachHandler_Impl(0, NULL, 0), OS_ERR_NOT_IMPLEMENTED);
}

void Test_OS_FPUExcEnable_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcEnable_Impl(int32 ExceptionNumber)
*/
OSAPI_TEST_FUNCTION_RC(OS_FPUExcEnable_Impl(0), OS_SUCCESS);
}

void Test_OS_FPUExcDisable_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcDisable_Impl(int32 ExceptionNumber)
*/
OSAPI_TEST_FUNCTION_RC(OS_FPUExcDisable_Impl(0), OS_SUCCESS);
}

void Test_OS_FPUExcSetMask_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcSetMask_Impl(uint32 mask)
*/
OSAPI_TEST_FUNCTION_RC(OS_FPUExcSetMask_Impl(0), OS_ERR_NOT_IMPLEMENTED);
}

void Test_OS_FPUExcGetMask_Impl(void)
{
/*
* Test Case For:
* int32 OS_FPUExcGetMask_Impl(uint32 *mask)
*/
OSAPI_TEST_FUNCTION_RC(OS_FPUExcGetMask_Impl(0), OS_ERR_NOT_IMPLEMENTED);
}

/* ------------------- End of test cases --------------------------------------*/

/* Osapi_Task_Setup
Expand Down Expand Up @@ -710,11 +664,6 @@ void UtTest_Setup(void)
ADD_TEST(OS_MutSemTake_Impl);
ADD_TEST(OS_MutSemGetInfo_Impl);
ADD_TEST(OS_HeapGetInfo_Impl);
ADD_TEST(OS_FPUExcAttachHandler_Impl);
ADD_TEST(OS_FPUExcEnable_Impl);
ADD_TEST(OS_FPUExcDisable_Impl);
ADD_TEST(OS_FPUExcSetMask_Impl);
ADD_TEST(OS_FPUExcGetMask_Impl);
}


1 change: 0 additions & 1 deletion src/unit-tests/oscore-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set(TEST_MODULE_FILES
ut_oscore_countsem_test.c
ut_oscore_mutex_test.c
ut_oscore_task_test.c
ut_oscore_exception_test.c
ut_oscore_test.c
)

Expand Down
Loading

0 comments on commit 9ffab35

Please sign in to comment.