Skip to content

Commit

Permalink
Fix #1308, Comments and empty lines cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thnkslprpt committed Oct 13, 2022
1 parent b8e9b83 commit 662fda0
Show file tree
Hide file tree
Showing 159 changed files with 519 additions and 1,867 deletions.
1 change: 0 additions & 1 deletion src/bsp/generic-linux/src/bsp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ void OS_BSP_Shutdown_Impl(void)
}

/******************************************************************************
** Function: main()
**
** Purpose:
** BSP Application entry point.
Expand Down
1 change: 0 additions & 1 deletion src/bsp/generic-vxworks/src/bsp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ void OS_BSP_Shutdown_Impl(void)
}

/******************************************************************************
** Function: OS_BSPMain()
**
** Purpose:
** vxWorks/BSP Application entry point.
Expand Down
1 change: 0 additions & 1 deletion src/bsp/generic-vxworks/src/generic_vxworks_bsp_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ typedef struct
{
SEM_ID AccessMutex;
VX_MUTEX_SEMAPHORE(AccessMutexMem);

} OS_BSP_GenericVxWorksGlobalData_t;

/*
Expand Down
6 changes: 0 additions & 6 deletions src/bsp/shared/inc/bsp-impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ typedef struct
* feature.
*/
uint32 ResoureConfig[OS_OBJECT_TYPE_USER];

} OS_BSP_GlobalData_t;

/*
Expand All @@ -116,7 +115,6 @@ extern OS_BSP_GlobalData_t OS_BSP_Global;
/********************************************************************/

/*----------------------------------------------------------------
Function: OS_BSP_Lock_Impl
Purpose: Get exclusive access to a BSP-provided service or object
Expand All @@ -127,7 +125,6 @@ extern OS_BSP_GlobalData_t OS_BSP_Global;
void OS_BSP_Lock_Impl(void);

/*----------------------------------------------------------------
Function: OS_BSP_Unlock_Impl
Purpose: Release exclusive access to a BSP-provided service or object
Expand All @@ -138,7 +135,6 @@ void OS_BSP_Lock_Impl(void);
void OS_BSP_Unlock_Impl(void);

/*----------------------------------------------------------------
Function: OS_BSP_ConsoleOutput_Impl
Purpose: Low level raw console data output. Writes a sequence of
characters directly to the BSP debug terminal or console device.
Expand All @@ -153,7 +149,6 @@ void OS_BSP_Unlock_Impl(void);
void OS_BSP_ConsoleOutput_Impl(const char *Str, size_t DataLen);

/*----------------------------------------------------------------
Function: OS_BSP_ConsoleSetMode_Impl
Purpose: Set the console output mode, if supported by the BSP.
Expand All @@ -171,7 +166,6 @@ void OS_BSP_ConsoleOutput_Impl(const char *Str, size_t DataLen);
void OS_BSP_ConsoleSetMode_Impl(uint32 ModeBits);

/*----------------------------------------------------------------
Function: OS_BSP_Shutdown_Impl
Purpose: Causes the calling task to abort in a BSP-safe way.
This may map to the abort() system call, but on some systems
Expand Down
1 change: 0 additions & 1 deletion src/examples/tasking-example/tasking-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ void task_2(void)

void task_3(void)
{

uint32 data_received;
uint32 data_size;
uint32 status;
Expand Down
5 changes: 0 additions & 5 deletions src/os/inc/osapi-bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,20 @@
*/

/*----------------------------------------------------------------
Function: OS_BSP_SetResourceTypeConfig
Purpose: Sets BSP/platform-specific flags for the given resource type
Flags and bit meanings are all platform defined.
------------------------------------------------------------------*/
void OS_BSP_SetResourceTypeConfig(uint32 ResourceType, uint32 ConfigOptionValue);

/*----------------------------------------------------------------
Function: OS_BSP_SetResourceTypeConfig
Purpose: Gets BSP/platform-specific flags for the given resource type
Flags and bit meanings are all platform defined.
------------------------------------------------------------------*/
uint32 OS_BSP_GetResourceTypeConfig(uint32 ResourceType);

/*----------------------------------------------------------------
Function: OS_BSP_GetArgC
Purpose: Obtain the number of boot arguments passed from the bootloader
or shell if supported by the platform
Expand All @@ -70,7 +67,6 @@ uint32 OS_BSP_GetResourceTypeConfig(uint32 ResourceType);
uint32 OS_BSP_GetArgC(void);

/*----------------------------------------------------------------
Function: OS_BSP_GetArgV
Purpose: Obtain an array of boot argument strings passed from the bootloader
or shell if supported by the platform
Expand All @@ -83,7 +79,6 @@ uint32 OS_BSP_GetArgC(void);
char *const *OS_BSP_GetArgV(void);

/*----------------------------------------------------------------
Function: OS_BSP_SetExitCode
Purpose: Sets the status to be returned to the shell or bootloader
if supported by the platform. The value is an integer with
Expand Down
1 change: 0 additions & 1 deletion src/os/inc/osapi-timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ typedef struct
uint32 start_time;
uint32 interval_time;
uint32 accuracy;

} OS_timer_prop_t;

/** @defgroup OSAPITimer OSAL Timer APIs
Expand Down
16 changes: 5 additions & 11 deletions src/os/portable/os-impl-bsd-select.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
***************************************************************************************/

/*----------------------------------------------------------------
* Function: OS_FdSet_ConvertIn_Impl
*
* Purpose: Local helper routine, not part of OSAL API.
*
Expand Down Expand Up @@ -113,7 +112,7 @@ static int32 OS_FdSet_ConvertIn_Impl(int *os_maxfd, fd_set *os_set, const OS_FdS
}

return status;
} /* end OS_FdSet_ConvertIn_Impl */
}

/*----------------------------------------------------------------*/
/**
Expand Down Expand Up @@ -155,10 +154,9 @@ static void OS_FdSet_ConvertOut_Impl(fd_set *OS_set, OS_FdSet *OSAL_set)
objids >>= 1;
}
}
} /* end OS_FdSet_ConvertOut_Impl */
}

/*----------------------------------------------------------------
* Function: OS_DoSelect
*
* Purpose: Local helper routine, not part of OSAL API.
*
Expand Down Expand Up @@ -243,15 +241,13 @@ static int32 OS_DoSelect(int maxfd, fd_set *rd_set, fd_set *wr_set, int32 msecs)
}

return return_code;
} /* end OS_DoSelect */
}

/****************************************************************************************
SELECT API
***************************************************************************************/

/*----------------------------------------------------------------
*
* Function: OS_SelectSingle_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -319,11 +315,9 @@ int32 OS_SelectSingle_Impl(const OS_object_token_t *token, uint32 *SelectFlags,
}

return return_code;
} /* end OS_SelectSingle_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SelectMultiple_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -382,4 +376,4 @@ int32 OS_SelectMultiple_Impl(OS_FdSet *ReadSet, OS_FdSet *WriteSet, int32 msecs)
}

return return_code;
} /* end OS_SelectMultiple_Impl */
}
51 changes: 13 additions & 38 deletions src/os/portable/os-impl-bsd-sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ void OS_SetSocketDefaultFlags_Impl(const OS_object_token_t *token)
***************************************************************************************/

/*----------------------------------------------------------------
*
* Function: OS_SocketOpen_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -208,11 +206,9 @@ int32 OS_SocketOpen_Impl(const OS_object_token_t *token)
OS_IMPL_SET_SOCKET_FLAGS(token);

return OS_SUCCESS;
} /* end OS_SocketOpen_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketBind_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -269,11 +265,9 @@ int32 OS_SocketBind_Impl(const OS_object_token_t *token, const OS_SockAddr_t *Ad
}
}
return OS_SUCCESS;
} /* end OS_SocketBind_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketConnect_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -367,10 +361,9 @@ int32 OS_SocketConnect_Impl(const OS_object_token_t *token, const OS_SockAddr_t
}
}
return return_code;
} /* end OS_SocketConnect_Impl */
}

/*----------------------------------------------------------------
Function: OS_SocketShutdown_Impl
Purpose: Connects the socket to a remote address.
Socket must be of the STREAM variety.
Expand Down Expand Up @@ -410,11 +403,9 @@ int32 OS_SocketShutdown_Impl(const OS_object_token_t *token, OS_SocketShutdownMo
}

return return_code;
} /* end OS_SocketShutdown_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAccept_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -466,11 +457,9 @@ int32 OS_SocketAccept_Impl(const OS_object_token_t *sock_token, const OS_object_
}

return return_code;
} /* end OS_SocketAccept_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketRecvFrom_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -558,11 +547,9 @@ int32 OS_SocketRecvFrom_Impl(const OS_object_token_t *token, void *buffer, size_
}

return return_code;
} /* end OS_SocketRecvFrom_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketSendTo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -607,11 +594,9 @@ int32 OS_SocketSendTo_Impl(const OS_object_token_t *token, const void *buffer, s
}

return os_result;
} /* end OS_SocketSendTo_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketGetInfo_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand All @@ -620,11 +605,9 @@ int32 OS_SocketSendTo_Impl(const OS_object_token_t *token, const void *buffer, s
int32 OS_SocketGetInfo_Impl(const OS_object_token_t *token, OS_socket_prop_t *sock_prop)
{
return OS_SUCCESS;
} /* end OS_SocketGetInfo_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAddrInit_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -666,11 +649,9 @@ int32 OS_SocketAddrInit_Impl(OS_SockAddr_t *Addr, OS_SocketDomain_t Domain)
Accessor->sa.sa_family = sa_family;

return OS_SUCCESS;
} /* end OS_SocketAddrInit_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAddrToString_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -704,11 +685,9 @@ int32 OS_SocketAddrToString_Impl(char *buffer, size_t buflen, const OS_SockAddr_
}

return OS_SUCCESS;
} /* end OS_SocketAddrToString_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAddrFromString_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -743,11 +722,9 @@ int32 OS_SocketAddrFromString_Impl(OS_SockAddr_t *Addr, const char *string)
}

return OS_SUCCESS;
} /* end OS_SocketAddrFromString_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAddrGetPort_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -778,11 +755,9 @@ int32 OS_SocketAddrGetPort_Impl(uint16 *PortNum, const OS_SockAddr_t *Addr)
*PortNum = ntohs(sa_port);

return OS_SUCCESS;
} /* end OS_SocketAddrGetPort_Impl */
}

/*----------------------------------------------------------------
*
* Function: OS_SocketAddrSetPort_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -811,4 +786,4 @@ int32 OS_SocketAddrSetPort_Impl(OS_SockAddr_t *Addr, uint16 PortNum)
}

return OS_SUCCESS;
} /* end OS_SocketAddrSetPort_Impl */
}
4 changes: 1 addition & 3 deletions src/os/portable/os-impl-console-bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
***************************************************************************************/

/*----------------------------------------------------------------
*
* Function: OS_ConsoleOutput_Impl
*
* Purpose: Implemented per internal OSAL API
* See prototype for argument/return detail
Expand Down Expand Up @@ -92,4 +90,4 @@ void OS_ConsoleOutput_Impl(const OS_object_token_t *token)

/* Update the global with the new read location */
console->ReadPos = StartPos;
} /* end OS_ConsoleOutput_Impl */
}
Loading

0 comments on commit 662fda0

Please sign in to comment.