Skip to content

Commit

Permalink
Merge pull request #773 from skliper/fix769-apply_formatting
Browse files Browse the repository at this point in the history
Fix #769, Apply standard formatting
  • Loading branch information
astrogeco authored Feb 12, 2021
2 parents 842fe88 + 831100a commit 28e60f3
Show file tree
Hide file tree
Showing 343 changed files with 636 additions and 699 deletions.
2 changes: 1 addition & 1 deletion src/bsp/generic-linux/src/generic_linux_bsp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ typedef struct
*/
extern OS_BSP_GenericLinuxGlobalData_t OS_BSP_GenericLinuxGlobal;

#endif /* GENERIC_LINUX_BSP_INTERNAL_H */
#endif /* GENERIC_LINUX_BSP_INTERNAL_H */
2 changes: 1 addition & 1 deletion src/bsp/generic-vxworks/src/generic_vxworks_bsp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
*/
#include "bsp-impl.h"

#endif /* GENERIC_VXWORKS_BSP_INTERNAL_H */
#endif /* GENERIC_VXWORKS_BSP_INTERNAL_H */
16 changes: 8 additions & 8 deletions src/bsp/pc-rtems/src/bsp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,16 @@ rtems_task Init(rtems_task_argument ignored)
* 16 internal semaphores
*
*/
#define CONFIGURE_MAXIMUM_TASKS (OS_MAX_TASKS + 8)
#define CONFIGURE_MAXIMUM_TIMERS (OS_MAX_TIMERS + 2)
#define CONFIGURE_MAXIMUM_SEMAPHORES (OS_MAX_BIN_SEMAPHORES + OS_MAX_COUNT_SEMAPHORES + OS_MAX_MUTEXES + 16)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES (OS_MAX_QUEUES + 4)
#define CONFIGURE_MAXIMUM_DRIVERS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 4
#define CONFIGURE_MAXIMUM_TASKS (OS_MAX_TASKS + 8)
#define CONFIGURE_MAXIMUM_TIMERS (OS_MAX_TIMERS + 2)
#define CONFIGURE_MAXIMUM_SEMAPHORES (OS_MAX_BIN_SEMAPHORES + OS_MAX_COUNT_SEMAPHORES + OS_MAX_MUTEXES + 16)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES (OS_MAX_QUEUES + 4)
#define CONFIGURE_MAXIMUM_DRIVERS 10
#define CONFIGURE_MAXIMUM_POSIX_KEYS 4
#ifdef _RTEMS_5_
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS (OS_MAX_NUM_OPEN_FILES + 8)
#define CONFIGURE_MAXIMUM_FILE_DESCRIPTORS (OS_MAX_NUM_OPEN_FILES + 8)
#else
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS (OS_MAX_NUM_OPEN_FILES + 8)
#define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS (OS_MAX_NUM_OPEN_FILES + 8)
#endif

#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
Expand Down
6 changes: 3 additions & 3 deletions src/bsp/pc-rtems/src/pcrtems_bsp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@
* Handle the differences between RTEMS 5 and 4.11 copyright notice
*/
#ifdef _RTEMS_5_
#define OSAL_BSP_COPYRIGHT_NOTICE rtems_get_copyright_notice()
#define OSAL_BSP_COPYRIGHT_NOTICE rtems_get_copyright_notice()
#else
#define OSAL_BSP_COPYRIGHT_NOTICE _Copyright_Notice
#define OSAL_BSP_COPYRIGHT_NOTICE _Copyright_Notice
#endif

/*
Expand Down Expand Up @@ -73,4 +73,4 @@ typedef struct
*/
extern OS_BSP_PcRtemsGlobalData_t OS_BSP_PcRtemsGlobal;

#endif /* PCRTEMS_BSP_INTERNAL_H */
#endif /* PCRTEMS_BSP_INTERNAL_H */
2 changes: 0 additions & 2 deletions src/os/inc/osapi-binsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,13 @@
#include "osconfig.h"
#include "common_types.h"


/** @defgroup OSSemaphoreStates OSAL Semaphore State Defines
* @{
*/
#define OS_SEM_FULL 1 /**< @brief Semaphore full state */
#define OS_SEM_EMPTY 0 /**< @brief Semaphore empty state */
/**@}*/


/** @brief OSAL binary semaphore properties */
typedef struct
{
Expand Down
1 change: 0 additions & 1 deletion src/os/inc/osapi-bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "osconfig.h"
#include "common_types.h"


/****************************************************************************************
BSP LOW-LEVEL IMPLEMENTATION FUNCTIONS
****************************************************************************************/
Expand Down
17 changes: 6 additions & 11 deletions src/os/inc/osapi-clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,17 @@
*/
typedef struct
{
int64 ticks; /**< Ticks elapsed since reference point */
int64 ticks; /**< Ticks elapsed since reference point */
} OS_time_t;


/**
* @brief Multipliers/divisors to convert ticks into standardized units
*
*
* Various fixed conversion factor constants used by the conversion routines
*
*
* A 100ns tick time allows max intervals of about +/- 14000 years in
* a 64-bit signed integer value.
*
*
* @note Applications should not directly use these values, but rather use
* conversion routines below to obtain standardized units (seconds/microseconds/etc).
*/
Expand Down Expand Up @@ -99,7 +98,6 @@ int32 OS_GetLocalTime(OS_time_t *time_struct);
*/
int32 OS_SetLocalTime(const OS_time_t *time_struct);


/*-------------------------------------------------------------------------------------*/
/*
* Accessor / Unit Conversion routines for OS_time_t
Expand Down Expand Up @@ -217,7 +215,6 @@ static inline uint32 OS_TimeGetSubsecondsPart(OS_time_t tm)
return (uint32)((frac - 1) / (OS_TIME_TICKS_PER_SECOND >> 2));
}


/*-------------------------------------------------------------------------------------*/
/**
* @brief Get milliseconds portion (fractional part only) from an OS_time_t object
Expand Down Expand Up @@ -351,7 +348,6 @@ static inline OS_time_t OS_TimeAssembleFromMilliseconds(int64 seconds, uint32 mi
return result;
}


/*-------------------------------------------------------------------------------------*/
/**
* @brief Assemble/Convert a number of seconds + subseconds into an OS_time_t interval
Expand Down Expand Up @@ -387,7 +383,7 @@ static inline OS_time_t OS_TimeAssembleFromSubseconds(int64 seconds, uint32 subs
*/
static inline OS_time_t OS_TimeAdd(OS_time_t time1, OS_time_t time2)
{
return ((OS_time_t) { time1.ticks + time2.ticks });
return ((OS_time_t) {time1.ticks + time2.ticks});
}

/*-------------------------------------------------------------------------------------*/
Expand All @@ -401,10 +397,9 @@ static inline OS_time_t OS_TimeAdd(OS_time_t time1, OS_time_t time2)
*/
static inline OS_time_t OS_TimeSubtract(OS_time_t time1, OS_time_t time2)
{
return ((OS_time_t) { time1.ticks - time2.ticks });
return ((OS_time_t) {time1.ticks - time2.ticks});
}


/**@}*/

#endif
2 changes: 0 additions & 2 deletions src/os/inc/osapi-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "osconfig.h"
#include "common_types.h"


/**
* @brief A set of events that can be used with BSP event callback routines
*/
Expand Down Expand Up @@ -98,7 +97,6 @@ typedef enum
*/
typedef int32 (*OS_EventHandler_t)(OS_Event_t event, osal_id_t object_id, void *data);


/** @defgroup OSAPICore OSAL Core Operation APIs
*
* These are for OSAL core operations for startup/initialization, running, and shutdown.
Expand Down
2 changes: 0 additions & 2 deletions src/os/inc/osapi-constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#define OS_PEND (-1)
#define OS_CHECK (0)


/**
* @brief Initializer for the osal_id_t type which will not match any valid value
*/
Expand All @@ -54,5 +53,4 @@
*/
#define OS_MAX_LOCAL_PATH_LEN (OS_MAX_PATH_LEN + OS_FS_PHYS_NAME_LEN)


#endif
2 changes: 0 additions & 2 deletions src/os/inc/osapi-dir.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
#include "osconfig.h"
#include "common_types.h"



/** @brief Directory entry */
typedef struct
{
Expand Down
5 changes: 1 addition & 4 deletions src/os/inc/osapi-error.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ typedef char os_err_name_t[OS_ERROR_NAME_LENGTH];
#define OS_ERR_INCORRECT_OBJ_STATE (-35) /**< @brief Incorrect object state */
#define OS_ERR_INCORRECT_OBJ_TYPE (-36) /**< @brief Incorrect object type */
#define OS_ERR_STREAM_DISCONNECTED (-37) /**< @brief Stream disconnected */
#define OS_ERR_OPERATION_NOT_SUPPORTED (-38) /**< @brief Requested operation is not support on the supplied object(s) */
#define OS_ERR_OPERATION_NOT_SUPPORTED (-38) /**< @brief Requested operation not support on supplied object(s) */
#define OS_ERR_INVALID_SIZE (-40) /**< @brief Invalid Size */

/*
Expand All @@ -99,10 +99,8 @@ typedef char os_err_name_t[OS_ERROR_NAME_LENGTH];
#define OS_FS_ERR_DEVICE_NOT_FREE (-107) /**< @brief FS device not free */
#define OS_FS_ERR_PATH_INVALID (-108) /**< @brief FS path invalid */


/**@}*/


/** @defgroup OSAPIError OSAL Error Info APIs
* @{
*/
Expand All @@ -119,5 +117,4 @@ typedef char os_err_name_t[OS_ERROR_NAME_LENGTH];
int32 OS_GetErrorName(int32 error_num, os_err_name_t *err_name);
/**@}*/


#endif
1 change: 0 additions & 1 deletion src/os/inc/osapi-file.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "common_types.h"
#include "osapi-clock.h"


/** @defgroup OSFileAccess OSAL File Access Option Defines
* @{
*/
Expand Down
12 changes: 5 additions & 7 deletions src/os/inc/osapi-filesys.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#define OS_CHK_ONLY 0 /**< Unused, API takes bool */
#define OS_REPAIR 1 /**< Unused, API takes bool */


/** @brief OSAL file system info */
typedef struct
{
Expand Down Expand Up @@ -203,10 +202,10 @@ int32 OS_unmount(const char *mountpoint);
* @retval #OS_INVALID_POINTER if name is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if the name is too long
* @retval #OS_ERROR if the OS call failed
*
*
* @deprecated Replaced by OS_FileSysStatVolume() -
* Value can be obtained by reading the "blocks_free" struct member.
*
*
*/
int32 OS_fsBlocksFree(const char *name);

Expand All @@ -227,13 +226,13 @@ int32 OS_fsBlocksFree(const char *name);
* @retval #OS_INVALID_POINTER if name is NULL
* @retval #OS_FS_ERR_PATH_TOO_LONG if the name is too long
* @retval #OS_ERROR if the OS call failed
*
* @deprecated Replaced by OS_FileSysStatVolume().
*
* @deprecated Replaced by OS_FileSysStatVolume().
* Value can be obtained by multiplying the "blocks_free" by the "block_size" struct members.
*/
int32 OS_fsBytesFree(const char *name, uint64 *bytes_free);

#endif /* OSAL_OMIT_DEPRECATED */
#endif /* OSAL_OMIT_DEPRECATED */

/*-------------------------------------------------------------------------------------*/
/**
Expand Down Expand Up @@ -326,5 +325,4 @@ int32 OS_TranslatePath(const char *VirtualPath, char *LocalPath);
int32 OS_GetFsInfo(os_fsinfo_t *filesys_info);
/**@}*/


#endif
5 changes: 2 additions & 3 deletions src/os/inc/osapi-module.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#ifndef OSAPI_MODULE_H
#define OSAPI_MODULE_H


#include "osconfig.h"
#include "common_types.h"

Expand All @@ -47,7 +46,7 @@
* to unload the module in the future, if the symbols are in use by other entities.
*
*/
#define OS_MODULE_FLAG_GLOBAL_SYMBOLS 0x00
#define OS_MODULE_FLAG_GLOBAL_SYMBOLS 0x00

/**
* @brief Requests OS_ModuleLoad() to keep the symbols local/private to this module
Expand All @@ -69,7 +68,7 @@
* application must ensure that all references obtained in this manner have
* been cleaned up/released before unloading the module.
*/
#define OS_MODULE_FLAG_LOCAL_SYMBOLS 0x01
#define OS_MODULE_FLAG_LOCAL_SYMBOLS 0x01

/*
** Typedefs
Expand Down
1 change: 0 additions & 1 deletion src/os/inc/osapi-mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "osconfig.h"
#include "common_types.h"


/** @brief OSAL mutex properties */
typedef struct
{
Expand Down
1 change: 0 additions & 1 deletion src/os/inc/osapi-os-net.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@
#include "osapi-sockets.h"
#include "osapi-network.h"


#endif
1 change: 0 additions & 1 deletion src/os/inc/osapi-os-timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,4 @@
#include "osapi-timebase.h"
#include "osapi-timer.h"


#endif
1 change: 0 additions & 1 deletion src/os/inc/osapi-queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ typedef struct
osal_id_t creator;
} OS_queue_prop_t;


/** @defgroup OSAPIMsgQueue OSAL Message Queue APIs
* @{
*/
Expand Down
2 changes: 1 addition & 1 deletion src/os/inc/osapi-timebase.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
/*
** Typedefs
*/
typedef uint32 (*OS_TimerSync_t)(osal_id_t timer_id); /**< @brief Timer sync */
typedef uint32 (*OS_TimerSync_t)(osal_id_t timer_id); /**< @brief Timer sync */

/** @brief Time base properties */
typedef struct
Expand Down
6 changes: 4 additions & 2 deletions src/os/inc/osapi-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
*/
#define OS_MAJOR_VERSION 5 /*!< @brief ONLY APPLY for OFFICIAL releases. Major version number. */
#define OS_MINOR_VERSION 0 /*!< @brief ONLY APPLY for OFFICIAL releases. Minor version number. */
#define OS_REVISION 99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased development version. */
#define OS_REVISION \
99 /*!< @brief ONLY APPLY for OFFICIAL releases. Revision version number. A value of "99" indicates an unreleased \
development version. */

#define OS_MISSION_REV 0 /*!< @brief ONLY USED by MISSION Implementations. Mission revision */

Expand Down Expand Up @@ -70,7 +72,7 @@ OSAL 4.1 is present.
*/
#define OSAL_API_VERSION ((OS_MAJOR_VERSION * 10000) + (OS_MINOR_VERSION * 100) + OS_REVISION)

#endif /* OSAPI_VERSION_H */
#endif /* OSAPI_VERSION_H */

/************************/
/* End of File Comment */
Expand Down
1 change: 0 additions & 1 deletion src/os/inc/osapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ extern "C"

#include "osapi-bsp.h"


#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 0 additions & 3 deletions src/os/portable/os-impl-no-symtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
int32 OS_GlobalSymbolLookup_Impl(cpuaddr *SymbolAddress, const char *SymbolName)
{
return OS_ERR_NOT_IMPLEMENTED;

}

/*----------------------------------------------------------------
Expand All @@ -49,7 +48,6 @@ int32 OS_GlobalSymbolLookup_Impl(cpuaddr *SymbolAddress, const char *SymbolName)
int32 OS_ModuleSymbolLookup_Impl(const OS_object_token_t *token, cpuaddr *SymbolAddress, const char *SymbolName)
{
return OS_ERR_NOT_IMPLEMENTED;

}

/*----------------------------------------------------------------
Expand All @@ -60,5 +58,4 @@ int32 OS_ModuleSymbolLookup_Impl(const OS_object_token_t *token, cpuaddr *Symbol
int32 OS_SymbolTableDump_Impl(const char *filename, size_t SizeLimit)
{
return (OS_ERR_NOT_IMPLEMENTED);

}
2 changes: 1 addition & 1 deletion src/os/posix/inc/os-impl-binsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ typedef struct
/* Tables where the OS object information is stored */
extern OS_impl_binsem_internal_record_t OS_impl_bin_sem_table[OS_MAX_BIN_SEMAPHORES];

#endif /* OS_IMPL_BINSEM_H */
#endif /* OS_IMPL_BINSEM_H */
2 changes: 1 addition & 1 deletion src/os/posix/inc/os-impl-console.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ typedef struct

extern OS_impl_console_internal_record_t OS_impl_console_table[OS_MAX_CONSOLES];

#endif /* OS_IMPL_CONSOLE_H */
#endif /* OS_IMPL_CONSOLE_H */
2 changes: 1 addition & 1 deletion src/os/posix/inc/os-impl-countsem.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ typedef struct
/* Tables where the OS object information is stored */
extern OS_impl_countsem_internal_record_t OS_impl_count_sem_table[OS_MAX_COUNT_SEMAPHORES];

#endif /* OS_IMPL_COUNTSEM_H */
#endif /* OS_IMPL_COUNTSEM_H */
Loading

0 comments on commit 28e60f3

Please sign in to comment.