Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration Candidate 2020-04-01 #408

Merged
merged 10 commits into from
Apr 9, 2020
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
os: linux
dist: bionic
sudo: required
language:
- c
language: c
compiler:
- gcc
addons:
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ This distribution contains:
2. Tests and example applications
3. A directory structure and makefiles to manage it all.

Version Notes:
==============
## Version Notes:

- 5.0.11: DEVELOPMENT
- The more descriptive return value OS_ERR_NAME_NOT_FOUND (instead of OS_FS_ERROR) will now be returned from the following functions (): OS_rmfs, OS_mount, OS_unmount, OS_FS_GetPhysDriveName
- Wraps OS_ShMem* prototype and unit test wrapper additions in OSAL_OMIT_DEPRECATED
- Minor updates (see https://github.com/nasa/osal/pull/408)
- 5.0.10: DEVELOPMENT
- Minor updates (see https://github.com/nasa/osal/pull/401)
- 5.0.9: DEVELOPMENT
Expand Down
50 changes: 36 additions & 14 deletions src/os/inc/osapi-os-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -1180,13 +1180,18 @@ int32 OS_FPUExcSetMask (uint32 mask);
int32 OS_FPUExcGetMask (uint32 *mask);
/**@}*/

#ifndef OSAL_OMIT_DEPRECATED

/** @defgroup OSAPIInterrupt OSAL Interrupt APIs
* @{
* @deprecated Platform dependencies
*/

/*-------------------------------------------------------------------------------------*/
/**
* @brief Associate an interrupt number to a specified handler routine
* @brief DEPRECATED; Associate an interrupt number to a specified handler routine
*
* @deprecated platform dependencies, removing from OSAL
*
* The call associates a specified C routine to a specified interrupt
* number. Upon occurring of the InterruptNumber, the InerruptHandler
Expand All @@ -1205,7 +1210,9 @@ int32 OS_IntAttachHandler (uint32 InterruptNumber, osal_task_entry InterruptHan

/*-------------------------------------------------------------------------------------*/
/**
* @brief Enable interrupts
* @brief DEPRECATED; Enable interrupts
*
* @deprecated platform dependencies, removing from OSAL
*
* @param[in] IntLevel value from previous call to OS_IntLock()
*
Expand All @@ -1217,7 +1224,9 @@ int32 OS_IntUnlock (int32 IntLevel);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Disable interrupts
* @brief DEPRECATED; Disable interrupts
*
* @deprecated platform dependencies, removing from OSAL
*
* @return An key value to be passed to OS_IntUnlock() to restore interrupts or error
* status, see @ref OSReturnCodes
Expand All @@ -1228,7 +1237,9 @@ int32 OS_IntLock (void);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Enables interrupts through Level
* @brief DEPRECATED; Enables interrupts through Level
*
* @deprecated platform dependencies, removing from OSAL
*
* @param[in] Level the interrupts to enable
*
Expand All @@ -1240,7 +1251,9 @@ int32 OS_IntEnable (int32 Level);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Disable interrupts through Level
* @brief DEPRECATED; Disable interrupts through Level
*
* @deprecated platform dependencies, removing from OSAL
*
* @param[in] Level the interrupts to disable
*
Expand All @@ -1252,7 +1265,9 @@ int32 OS_IntDisable (int32 Level);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Set the CPU interrupt mask register
* @brief DEPRECATED; Set the CPU interrupt mask register
*
* @deprecated platform dependencies, removing from OSAL
*
* @note The interrupt bits are architecture-specific.
*
Expand All @@ -1266,7 +1281,9 @@ int32 OS_IntSetMask (uint32 mask);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Get the CPU interrupt mask register
* @brief DEPRECATED; Get the CPU interrupt mask register
*
* @deprecated platform dependencies, removing from OSAL
*
* @note The interrupt bits are architecture-specific.
*
Expand All @@ -1280,7 +1297,9 @@ int32 OS_IntGetMask (uint32 *mask);

/*-------------------------------------------------------------------------------------*/
/**
* @brief Acknowledge the corresponding interrupt number.
* @brief DEPRECATED; Acknowledge the corresponding interrupt number.
*
* @deprecated platform dependencies, removing from OSAL
*
* @note: placeholder; not currently implemented in sample implementations
*
Expand All @@ -1294,6 +1313,7 @@ int32 OS_IntGetMask (uint32 *mask);
int32 OS_IntAck (int32 InterruptNumber);
/**@}*/


/**
* @defgroup OSAPIShMem OSAL Shared memory APIs
* @deprecated Not in current implementations
Expand All @@ -1302,42 +1322,44 @@ int32 OS_IntAck (int32 InterruptNumber);
*/

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemInit (void);

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemCreate (uint32 *Id, uint32 NBytes, const char* SegName);

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemSemTake (uint32 Id);

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemSemGive (uint32 Id);

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemAttach (cpuaddr * Address, uint32 Id);

/*-------------------------------------------------------------------------------------*/
/** @brief placeholder; not currently implemented
/** @brief DEPRECATED - platform dependent, never implemented in framework OSALs
* @deprecated Never implemented
*/
int32 OS_ShMemGetIdByName (uint32 *ShMemId, const char *SegName );
/**@}*/

#endif /* OSAL_OMIT_DEPRECATED */

/** @defgroup OSAPIHeap OSAL Heap APIs
* @{
*/
Expand Down
2 changes: 1 addition & 1 deletion src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#define OS_MAJOR_VERSION 5 /**< @brief Major version number */
#define OS_MINOR_VERSION 0 /**< @brief Minor version number */
#define OS_REVISION 10 /**< @brief Revision number */
#define OS_REVISION 11 /**< @brief Revision number */
#define OS_MISSION_REV 0 /**< @brief Mission revision */

/**
Expand Down
34 changes: 18 additions & 16 deletions src/os/posix/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2131,6 +2131,7 @@ int32 OS_MutSemGetInfo_Impl (uint32 sem_id, OS_mut_sem_prop_t *mut_prop)

} /* end OS_MutSemGetInfo_Impl */

#ifndef OSAL_OMIT_DEPRECATED

/****************************************************************************************
INT API
Expand Down Expand Up @@ -2208,48 +2209,49 @@ int32 OS_IntDisable_Impl(int32 Level)

/*----------------------------------------------------------------
*
* Function: OS_HeapGetInfo_Impl
* Function: OS_IntSetMask_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_HeapGetInfo_Impl(OS_heap_prop_t *heap_prop)
int32 OS_IntSetMask_Impl ( uint32 MaskSetting )
{
/*
** Not implemented yet
*/
return (OS_ERR_NOT_IMPLEMENTED);
} /* end OS_HeapGetInfo_Impl */
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_IntSetMask_Impl */


/*----------------------------------------------------------------
*
* Function: OS_IntSetMask_Impl
* Function: OS_IntGetMask_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_IntSetMask_Impl ( uint32 MaskSetting )
int32 OS_IntGetMask_Impl ( uint32 * MaskSettingPtr )
{
*MaskSettingPtr = 0;
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_IntSetMask_Impl */
} /* end OS_IntGetMask_Impl */

#endif /* OSAL_OMIT_DEPRECATED */


/*----------------------------------------------------------------
*
* Function: OS_IntGetMask_Impl
* Function: OS_HeapGetInfo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_IntGetMask_Impl ( uint32 * MaskSettingPtr )
int32 OS_HeapGetInfo_Impl(OS_heap_prop_t *heap_prop)
{
*MaskSettingPtr = 0;
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_IntGetMask_Impl */
/*
** Not implemented yet
*/
return (OS_ERR_NOT_IMPLEMENTED);
} /* end OS_HeapGetInfo_Impl */

/*----------------------------------------------------------------
*
Expand Down
59 changes: 31 additions & 28 deletions src/os/rtems/osapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,8 @@ int32 OS_MutSemGetInfo_Impl (uint32 sem_id, OS_mut_sem_prop_t *mut_prop)
TICK API
***************************************************************************************/

#ifndef OSAL_OMIT_DEPRECATED

/****************************************************************************************
INT API
***************************************************************************************/
Expand Down Expand Up @@ -1539,60 +1541,61 @@ int32 OS_IntDisable_Impl (int32 Level)

/*----------------------------------------------------------------
*
* Function: OS_HeapGetInfo_Impl
* Function: OS_IntSetMask_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_HeapGetInfo_Impl (OS_heap_prop_t *heap_prop)
int32 OS_IntSetMask_Impl ( uint32 MaskSetting )
{
region_information_block info;
int status;

status = malloc_info( &info );

if ( status != 0 )
{
return(OS_ERROR);
}

heap_prop->free_bytes = (uint32) info.Free.total;
heap_prop->free_blocks = (uint32) info.Free.number;
heap_prop->largest_free_block = (uint32) info.Free.largest;

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


/*----------------------------------------------------------------
*
* Function: OS_IntSetMask_Impl
* Function: OS_IntGetMask_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_IntSetMask_Impl ( uint32 MaskSetting )
int32 OS_IntGetMask_Impl ( uint32 * MaskSettingPtr )
{
*MaskSettingPtr = 0;
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_IntSetMask_Impl */
} /* end OS_IntGetMask_Impl */

#endif /* OSAL_OMIT_DEPRECATED */


/*----------------------------------------------------------------
*
* Function: OS_IntGetMask_Impl
* Function: OS_HeapGetInfo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype in os-impl.h for argument/return detail
*
*-----------------------------------------------------------------*/
int32 OS_IntGetMask_Impl ( uint32 * MaskSettingPtr )
int32 OS_HeapGetInfo_Impl (OS_heap_prop_t *heap_prop)
{
*MaskSettingPtr = 0;
return(OS_ERR_NOT_IMPLEMENTED);
} /* end OS_IntGetMask_Impl */

region_information_block info;
int status;

status = malloc_info( &info );

if ( status != 0 )
{
return(OS_ERROR);
}

heap_prop->free_bytes = (uint32) info.Free.total;
heap_prop->free_blocks = (uint32) info.Free.number;
heap_prop->largest_free_block = (uint32) info.Free.largest;

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

/*----------------------------------------------------------------
*
* Function: OS_FPUExcAttachHandler_Impl
Expand Down
3 changes: 3 additions & 0 deletions src/os/shared/os-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1786,6 +1786,7 @@ int32 OS_SocketAddrGetPort_Impl(uint16 *PortNum, const OS_SockAddr_t *Addr);
------------------------------------------------------------------*/
int32 OS_SocketAddrSetPort_Impl(OS_SockAddr_t *Addr, uint16 PortNum);

#ifndef OSAL_OMIT_DEPRECATED

/****************************************************************************************
INTERRUPT API LOW-LEVEL IMPLEMENTATION FUNCTIONS
Expand Down Expand Up @@ -1866,6 +1867,8 @@ 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
Loading