sched: nxstyle fixes
nxstyle fixes to pass CI Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
parent
8935ac4cc3
commit
dee641828f
13 changed files with 38 additions and 25 deletions
|
@ -35,7 +35,9 @@
|
|||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/* Configuration ************************************************************/
|
||||
|
||||
/* If CONFIG_SYSTEM_TIME64 is selected and the CPU supports long long types,
|
||||
* then a 64-bit system time will be used.
|
||||
*/
|
||||
|
|
|
@ -79,14 +79,16 @@ int clock_timespec_compare(FAR const struct timespec *a,
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int clock_abstime2ticks(clockid_t clockid, FAR const struct timespec *abstime,
|
||||
int clock_abstime2ticks(clockid_t clockid,
|
||||
FAR const struct timespec *abstime,
|
||||
FAR sclock_t *ticks)
|
||||
{
|
||||
struct timespec currtime;
|
||||
struct timespec reltime;
|
||||
int ret;
|
||||
|
||||
/* Convert the timespec to clock ticks. NOTE: Here we use internal knowledge
|
||||
/* Convert the timespec to clock ticks.
|
||||
* NOTE: Here we use internal knowledge
|
||||
* that CLOCK_REALTIME is defined to be zero!
|
||||
*/
|
||||
|
||||
|
|
|
@ -68,5 +68,6 @@ static const uint8_t g_lookup[12] =
|
|||
int clock_dow(int year, int month, int day)
|
||||
{
|
||||
day += month < 2 ? year-- : year - 2;
|
||||
return ((int)g_lookup[month] + day + 4 + year / 4 - year / 100 + year / 400) % 7;
|
||||
return ((int)g_lookup[month] + day + 4 + year / 4 -
|
||||
year / 100 + year / 400) % 7;
|
||||
}
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
*
|
||||
* Description:
|
||||
* Copy the internal environment structure of a task. This is the action
|
||||
* that is performed when a new task is created: The new task has a private,
|
||||
* exact duplicate of the parent task's environment.
|
||||
* that is performed when a new task is created: The new task has a
|
||||
* private, exact duplicate of the parent task's environment.
|
||||
*
|
||||
* Input Parameters:
|
||||
* group - The child task group to receive the newly allocated copy of the
|
||||
|
|
|
@ -60,7 +60,9 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int env_foreach(FAR struct task_group_s *group, env_foreach_t cb, FAR void *arg)
|
||||
int env_foreach(FAR struct task_group_s *group,
|
||||
env_foreach_t cb,
|
||||
FAR void *arg)
|
||||
{
|
||||
FAR char *ptr;
|
||||
FAR char *end;
|
||||
|
|
|
@ -41,7 +41,8 @@
|
|||
* Name: putenv
|
||||
*
|
||||
* Description:
|
||||
* The putenv() function adds or changes the value of environment variables.
|
||||
* The putenv() function adds or changes the value of environment
|
||||
* variables.
|
||||
* The argument string is of the form name=value. If name does not already
|
||||
* exist in the environment, then string is added to the environment. If
|
||||
* name does exist, then the value of name in the environment is changed to
|
||||
|
|
|
@ -96,7 +96,9 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite)
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Otherwise, it is a request to remove a variable without altering it? */
|
||||
/* Otherwise, it is a request to remove a variable without
|
||||
* altering it?
|
||||
*/
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
@ -131,8 +133,8 @@ int setenv(FAR const char *name, FAR const char *value, int overwrite)
|
|||
env_removevar(group, pvar);
|
||||
}
|
||||
|
||||
/* Get the size of the new name=value string. The +2 is for the '=' and for
|
||||
* null terminator
|
||||
/* Get the size of the new name=value string.
|
||||
* The +2 is for the '=' and for null terminator
|
||||
*/
|
||||
|
||||
varlen = strlen(name) + strlen(value) + 2;
|
||||
|
|
|
@ -58,8 +58,9 @@ extern "C"
|
|||
*
|
||||
* Description:
|
||||
* Copy the internal environment structure of a task. This is the action
|
||||
* that is performed when a new task is created: The new task has a private,
|
||||
* exact duplicate of the parent task's environment.
|
||||
* that is performed when a new task is created:
|
||||
* The new task has a private, exact duplicate of the parent task's
|
||||
* environment.
|
||||
*
|
||||
* Input Parameters:
|
||||
* group - The child task group to receive the newly allocated copy of the
|
||||
|
|
|
@ -59,9 +59,9 @@ grpid_t g_grpid_current;
|
|||
* the head of the ready to run list.
|
||||
*
|
||||
* This function is called from platform-specific code after any context
|
||||
* switch (i.e., after any change in the thread at the head of the ready-to-
|
||||
* run list). This function will change the address environment if the
|
||||
* new thread is part of a different task group.
|
||||
* switch (i.e., after any change in the thread at the head of the
|
||||
* ready-to-run list). This function will change the address environment
|
||||
* if the new thread is part of a different task group.
|
||||
*
|
||||
* Input Parameters:
|
||||
* tcb - The TCB of thread that needs an address environment. This should
|
||||
|
|
|
@ -46,8 +46,9 @@
|
|||
* Description:
|
||||
* Given a group ID, find the group task structure with that ID. IDs are
|
||||
* used instead of pointers to group structures. This is done because a
|
||||
* group can disappear at any time leaving a stale pointer; an ID is cleaner
|
||||
* because if the group disappears, this function will fail gracefully.
|
||||
* group can disappear at any time leaving a stale pointer; an ID is
|
||||
* cleaner because if the group disappears, this function will fail
|
||||
* gracefully.
|
||||
*
|
||||
* Input Parameters:
|
||||
* grpid - The group ID to find.
|
||||
|
|
|
@ -128,7 +128,7 @@ static inline int group_addmember(FAR struct task_group_s *group, pid_t pid)
|
|||
* Name: group_bind
|
||||
*
|
||||
* Description:
|
||||
* A thread joins the group when it is created. This is a two step process,
|
||||
* A thread joins the group when it is created. This is a two step process,
|
||||
* first, the group must bound to the new threads TCB. group_bind() does
|
||||
* this (at the return from group_join, things are a little unstable: The
|
||||
* group has been bound, but tg_nmembers has not yet been incremented).
|
||||
|
@ -165,7 +165,7 @@ int group_bind(FAR struct pthread_tcb_s *tcb)
|
|||
* Name: group_join
|
||||
*
|
||||
* Description:
|
||||
* A thread joins the group when it is created. This is a two step process,
|
||||
* A thread joins the group when it is created. This is a two step process,
|
||||
* first, the group must bound to the new threads TCB. group_bind() does
|
||||
* this (at the return from group_join, things are a little unstable: The
|
||||
* group has been bound, but tg_nmembers has not yet been incremented).
|
||||
|
|
|
@ -204,8 +204,9 @@ int pthread_mutex_unlock(FAR pthread_mutex_t *mutex)
|
|||
/* This is either a non-recursive mutex or is the outermost unlock of
|
||||
* a recursive mutex.
|
||||
*
|
||||
* In the case where the calling thread is NOT the holder of the thread,
|
||||
* the behavior is undefined per POSIX. Here we do the same as GLIBC:
|
||||
* In the case where the calling thread is NOT the holder of the
|
||||
* thread, the behavior is undefined per POSIX.
|
||||
* Here we do the same as GLIBC:
|
||||
* We allow the other thread to release the mutex even though it does
|
||||
* not own it.
|
||||
*/
|
||||
|
|
|
@ -38,10 +38,10 @@
|
|||
* Description:
|
||||
* This function is used to destroy the un-named semaphore indicated by
|
||||
* 'sem'. Only a semaphore that was created using nxsem_init() may be
|
||||
* destroyed using nxsem_destroy(); the effect of calling nxsem_destroy() with
|
||||
* a named semaphore is undefined. The effect of subsequent use of the
|
||||
* semaphore sem is undefined until sem is re-initialized by another call
|
||||
* to nxsem_init().
|
||||
* destroyed using nxsem_destroy(); the effect of calling nxsem_destroy()
|
||||
* with a named semaphore is undefined. The effect of subsequent use of
|
||||
* the semaphore sem is undefined until sem is re-initialized by another
|
||||
* call to nxsem_init().
|
||||
*
|
||||
* The effect of destroying a semaphore upon which other processes are
|
||||
* currently blocked is undefined.
|
||||
|
|
Loading…
Reference in a new issue