diff --git a/arch/mips/src/mips32/mips_vfork.c b/arch/mips/src/mips32/mips_vfork.c index 31a01cadc6f..fe791ff2a28 100644 --- a/arch/mips/src/mips32/mips_vfork.c +++ b/arch/mips/src/mips32/mips_vfork.c @@ -1,35 +1,20 @@ /**************************************************************************** * arch/mips/src/mips32/mips_vfork.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ @@ -98,7 +83,8 @@ * 5) up_vfork() then calls nxtask_start_vfork() * 6) nxtask_start_vfork() then executes the child thread. * - * nxtask_abort_vfork() may be called if an error occurs between steps 3 and 6 + * nxtask_abort_vfork() may be called if an error occurs between steps 3 + * and 6 * * Input Parameters: * context - Caller context information saved by vfork() diff --git a/sched/group/group_childstatus.c b/sched/group/group_childstatus.c index 300b22cc7e5..a1952c23626 100644 --- a/sched/group/group_childstatus.c +++ b/sched/group/group_childstatus.c @@ -38,10 +38,10 @@ ****************************************************************************/ /* Note that there cannot be more that CONFIG_MAX_TASKS tasks in total. - * However, the number of child status structures may need to be significantly - * larger because this number includes the maximum number of tasks that are - * running PLUS the number of tasks that have exit'ed without having their - * exit status reaped (via wait(), waitid(), or waitpid()). + * However, the number of child status structures may need to be + * significantly larger because this number includes the maximum number of + * tasks that are running PLUS the number of tasks that have exit'ed without + * having their exit status reaped (via wait(), waitid(), or waitpid()). * * Obviously, if tasks spawn children indefinitely and never have the exit * status reaped, then you have a memory leak! @@ -165,7 +165,8 @@ void task_initialize(void) * * Returned Value: * On success, a non-NULL pointer to a child status structure. NULL is - * returned if there are no remaining, pre-allocated child status structures. + * returned if there are no remaining, pre-allocated child status + * structures. * * Assumptions: * Called during task creation in a safe context. No special precautions @@ -413,7 +414,9 @@ void group_remove_children(FAR struct task_group_s *group) FAR struct child_status_s *curr; FAR struct child_status_s *next; - /* Remove all child structures for the TCB and return them to the freelist */ + /* Remove all child structures for the TCB and return them to the + * freelist. + */ for (curr = group->tg_children; curr; curr = next) { diff --git a/sched/init/nx_bringup.c b/sched/init/nx_bringup.c index 61067ee2292..e7fcdec5c6b 100644 --- a/sched/init/nx_bringup.c +++ b/sched/init/nx_bringup.c @@ -1,39 +1,20 @@ /**************************************************************************** * sched/init/nx_bringup.c * - * Copyright (C) 2011-2012, 2019 Gregory Nutt. All rights reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * With extensions by: + * http://www.apache.org/licenses/LICENSE-2.0 * - * Author: Uros Platise - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ @@ -202,8 +183,8 @@ static inline void nx_workqueues(void) #endif /* CONFIG_SCHED_HPWORK */ #ifdef CONFIG_SCHED_LPWORK - /* Start the low-priority worker thread for other, non-critical continuation - * tasks + /* Start the low-priority worker thread for other, non-critical + * continuation tasks */ work_start_lowpri(); diff --git a/sched/pthread/pthread_create.c b/sched/pthread/pthread_create.c index 9c59fe8582a..00ccd307e2d 100644 --- a/sched/pthread/pthread_create.c +++ b/sched/pthread/pthread_create.c @@ -1,36 +1,20 @@ /**************************************************************************** * sched/pthread/pthread_create.c * - * Copyright (C) 2007-2009, 2011, 2013-2018 Gregory Nutt. All rights - * reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ @@ -421,7 +405,7 @@ int pthread_create(FAR pthread_t *thread, FAR const pthread_attr_t *attr, /* Initialize the task control block */ ret = pthread_setup_scheduler(ptcb, param.sched_priority, pthread_start, - start_routine); + start_routine); if (ret != OK) { errcode = EBUSY; diff --git a/sched/task/exit.c b/sched/task/exit.c index b827871020c..1ebf075e8b6 100644 --- a/sched/task/exit.c +++ b/sched/task/exit.c @@ -1,36 +1,20 @@ /**************************************************************************** * sched/exit.c * - * Copyright (C) 2007-2008, 2011-2012, 2018 Gregory Nutt. All rights - * reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ @@ -95,7 +79,9 @@ void exit(int status) nxtask_exithook(tcb, status, false); - /* Then "really" exit. Only the lower 8 bits of the exit status are used. */ + /* Then "really" exit. Only the lower 8 bits of the exit status are + * used. + */ _exit(status); } diff --git a/sched/task/task_create.c b/sched/task/task_create.c index b2bc4eb2b1b..b0c5b8edd2c 100644 --- a/sched/task/task_create.c +++ b/sched/task/task_create.c @@ -148,7 +148,9 @@ static int nxthread_create(FAR const char *name, uint8_t ttype, ret = task_activate((FAR struct tcb_s *)tcb); if (ret < OK) { - /* The TCB was added to the active task list by nxtask_setup_scheduler() */ + /* The TCB was added to the active task list by + * nxtask_setup_scheduler() + */ dq_rem((FAR dq_entry_t *)tcb, (FAR dq_queue_t *)&g_inactivetasks); goto errout_with_tcb; diff --git a/sched/task/task_exit.c b/sched/task/task_exit.c index c7317865781..72dd1ea9e3b 100644 --- a/sched/task/task_exit.c +++ b/sched/task/task_exit.c @@ -1,36 +1,20 @@ /**************************************************************************** * sched/task/task_exit.c * - * Copyright (C) 2008-2009, 2012-2014, 2016, 2018 Gregory Nutt. All - * rights reserved. - * Author: Gregory Nutt + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. The + * ASF licenses this file to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * http://www.apache.org/licenses/LICENSE-2.0 * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * 3. Neither the name NuttX nor the names of its contributors may be - * used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED - * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations + * under the License. * ****************************************************************************/ diff --git a/sched/task/task_init.c b/sched/task/task_init.c index 04aea3f9020..dabac852380 100644 --- a/sched/task/task_init.c +++ b/sched/task/task_init.c @@ -66,8 +66,8 @@ * * Returned Value: * OK on success; negative error value on failure appropriately. (See - * nxtask_setup_scheduler() for possible failure conditions). On failure, the - * caller is responsible for freeing the stack memory and for calling + * nxtask_setup_scheduler() for possible failure conditions). On failure, + * the caller is responsible for freeing the stack memory and for calling * nxsched_release_tcb() to free the TCB (which could be in most any * state). * diff --git a/sched/task/task_setup.c b/sched/task/task_setup.c index 471d44d8b2f..335dac8d1ad 100644 --- a/sched/task/task_setup.c +++ b/sched/task/task_setup.c @@ -464,10 +464,10 @@ static void nxtask_setup_name(FAR struct task_tcb_s *tcb, * Name: nxtask_setup_stackargs * * Description: - * This functions is called only from nxtask_setup_arguments() It will allocate - * space on the new task's stack and will copy the argv[] array and all - * strings to the task's stack where it is readily accessible to the - * task. Data on the stack, on the other hand, is guaranteed to be + * This functions is called only from nxtask_setup_arguments() It will + * allocate space on the new task's stack and will copy the argv[] array + * and all strings to the task's stack where it is readily accessible to + * the task. Data on the stack, on the other hand, is guaranteed to be * accessible no matter what privilege mode the task runs in. * * Input Parameters: @@ -629,8 +629,8 @@ int nxtask_setup_scheduler(FAR struct task_tcb_s *tcb, int priority, { /* Perform common thread setup */ - return nxthread_setup_scheduler((FAR struct tcb_s *)tcb, priority, start, - (CODE void *)main, ttype); + return nxthread_setup_scheduler((FAR struct tcb_s *)tcb, priority, + start, (CODE void *)main, ttype); } /**************************************************************************** @@ -663,8 +663,9 @@ int pthread_setup_scheduler(FAR struct pthread_tcb_s *tcb, int priority, { /* Perform common thread setup */ - return nxthread_setup_scheduler((FAR struct tcb_s *)tcb, priority, start, - (CODE void *)entry, TCB_FLAG_TTYPE_PTHREAD); + return nxthread_setup_scheduler((FAR struct tcb_s *)tcb, priority, + start, (CODE void *)entry, + TCB_FLAG_TTYPE_PTHREAD); } #endif @@ -675,9 +676,9 @@ int pthread_setup_scheduler(FAR struct pthread_tcb_s *tcb, int priority, * This functions sets up parameters in the Task Control Block (TCB) in * preparation for starting a new thread. * - * nxtask_setup_arguments() is called only from task_init() and nxtask_start() to - * create a new task. In the "normal" case, the argv[] array is a - * structure in the TCB, the arguments are cloned via strdup. + * nxtask_setup_arguments() is called only from task_init() and + * nxtask_start() to create a new task. In the "normal" case, the argv[] + * array is a structure in the TCB, the arguments are cloned via strdup. * * In the kernel build case, the argv[] array and all strings are copied * to the task's stack. This is done because the TCB (and kernel allocated