mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
Run all .c and .h files modifed by the PR though nxstyle.
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
f92dba212d
commit
3ac629bdfb
@@ -82,8 +82,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* nxsched_remove_readytorun will return true if we just removed the head
|
* nxsched_remove_readytorun will return true if we just removed the
|
||||||
* of the ready to run list.
|
* head of the ready to run list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed = nxsched_remove_readytorun(tcb);
|
switch_needed = nxsched_remove_readytorun(tcb);
|
||||||
@@ -92,11 +92,12 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
tcb->sched_priority = (uint8_t)priority;
|
tcb->sched_priority = (uint8_t)priority;
|
||||||
|
|
||||||
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
|
/* Return the task to the ready-to-run task list.
|
||||||
* will return true if the task was added to the head of ready-to-run
|
* nxsched_add_readytorun() will return true if the task was added to
|
||||||
* list. We will need to perform a context switch only if the
|
* the head of ready-to-run list. We will need to perform a context
|
||||||
* EXCLUSIVE or of the two calls is non-zero (i.e., one and only one
|
* switch only if the EXCLUSIVE or of the two calls is non-zero (i.e.,
|
||||||
* the calls changes the head of the ready-to-run list).
|
* one and only one the calls changes the head of the ready-to-run
|
||||||
|
* list).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed ^= nxsched_add_readytorun(tcb);
|
switch_needed ^= nxsched_add_readytorun(tcb);
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* arch/arm/src/armv6-m/arm_saveusercontext.S
|
* arch/arm/src/armv6-m/arm_saveusercontext.S
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* nxsched_remove_readytorun will return true if we just removed the head
|
* nxsched_remove_readytorun will return true if we just removed the
|
||||||
* of the ready to run list.
|
* head of the ready to run list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed = nxsched_remove_readytorun(tcb);
|
switch_needed = nxsched_remove_readytorun(tcb);
|
||||||
@@ -92,11 +92,12 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
tcb->sched_priority = (uint8_t)priority;
|
tcb->sched_priority = (uint8_t)priority;
|
||||||
|
|
||||||
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
|
/* Return the task to the ready-to-run task list.
|
||||||
* will return true if the task was added to the head of ready-to-run
|
* nxsched_add_readytorun() will return true if the task was added to
|
||||||
* list. We will need to perform a context switch only if the
|
* the head of ready-to-run list. We will need to perform a context
|
||||||
* EXCLUSIVE or of the two calls is non-zero (i.e., one and only one
|
* switch only if the EXCLUSIVE or of the two calls is non-zero (i.e.,
|
||||||
* the calls changes the head of the ready-to-run list).
|
* one and only one the calls changes the head of the ready-to-run
|
||||||
|
* list).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed ^= nxsched_add_readytorun(tcb);
|
switch_needed ^= nxsched_add_readytorun(tcb);
|
||||||
|
|||||||
@@ -82,8 +82,8 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
sinfo("TCB=%p PRI=%d\n", tcb, priority);
|
||||||
|
|
||||||
/* Remove the tcb task from the ready-to-run list.
|
/* Remove the tcb task from the ready-to-run list.
|
||||||
* nxsched_remove_readytorun will return true if we just removed the head
|
* nxsched_remove_readytorun() will return true if we just removed the
|
||||||
* of the ready to run list.
|
* head of the ready to run list.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed = nxsched_remove_readytorun(tcb);
|
switch_needed = nxsched_remove_readytorun(tcb);
|
||||||
@@ -92,11 +92,12 @@ void up_reprioritize_rtr(struct tcb_s *tcb, uint8_t priority)
|
|||||||
|
|
||||||
tcb->sched_priority = (uint8_t)priority;
|
tcb->sched_priority = (uint8_t)priority;
|
||||||
|
|
||||||
/* Return the task to the ready-to-run task list. nxsched_add_readytorun
|
/* Return the task to the ready-to-run task list.
|
||||||
* will return true if the task was added to the head of ready-to-run
|
* nxsched_add_readytorun() will return true if the task was added to
|
||||||
* list. We will need to perform a context switch only if the
|
* the head of ready-to-run list. We will need to perform a context
|
||||||
* EXCLUSIVE or of the two calls is non-zero (i.e., one and only one
|
* switch only if the EXCLUSIVE or of the two calls is non-zero (i.e.,
|
||||||
* the calls changes the head of the ready-to-run list).
|
* one and only one the calls changes the head of the ready-to-run
|
||||||
|
* list).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
switch_needed ^= nxsched_add_readytorun(tcb);
|
switch_needed ^= nxsched_add_readytorun(tcb);
|
||||||
|
|||||||
+26
-37
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/irq/irq_csection.c
|
* sched/irq/irq_csection.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016-2018 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -295,8 +280,8 @@ try_again:
|
|||||||
|
|
||||||
g_cpu_nestcount[cpu] = 1;
|
g_cpu_nestcount[cpu] = 1;
|
||||||
|
|
||||||
/* Also set the CPU bit so that other CPUs will be aware that this
|
/* Also set the CPU bit so that other CPUs will be aware that
|
||||||
* CPU holds the critical section.
|
* this CPU holds the critical section.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spin_setbit(&g_cpu_irqset, cpu, &g_cpu_irqsetlock,
|
spin_setbit(&g_cpu_irqset, cpu, &g_cpu_irqsetlock,
|
||||||
@@ -322,8 +307,8 @@ try_again:
|
|||||||
/* Yes... make sure that the spinlock is set and increment the
|
/* Yes... make sure that the spinlock is set and increment the
|
||||||
* IRQ lock count.
|
* IRQ lock count.
|
||||||
*
|
*
|
||||||
* NOTE: If irqcount > 0 then (1) we are in a critical section, and
|
* NOTE: If irqcount > 0 then (1) we are in a critical section,
|
||||||
* (2) this CPU should hold the lock.
|
* and (2) this CPU should hold the lock.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DEBUGASSERT(spin_islocked(&g_cpu_irqlock) &&
|
DEBUGASSERT(spin_islocked(&g_cpu_irqlock) &&
|
||||||
@@ -544,13 +529,15 @@ void leave_critical_section(irqstate_t flags)
|
|||||||
|
|
||||||
if ((g_cpu_irqset & ~(1 << cpu)) == 0)
|
if ((g_cpu_irqset & ~(1 << cpu)) == 0)
|
||||||
{
|
{
|
||||||
/* Yes.. Check if there are pending tasks and that pre-emption
|
/* Yes.. Check if there are pending tasks and that pre-
|
||||||
* is also enabled. This is necessary because we may have
|
* emption is also enabled. This is necessary because we
|
||||||
* deferred the up_release_pending() call in sched_unlock()
|
* may have deferred the up_release_pending() call in
|
||||||
* because we were within a critical section then.
|
* sched_unlock() because we were within a critical
|
||||||
|
* section then.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (g_pendingtasks.head != NULL && !nxsched_islocked_global())
|
if (g_pendingtasks.head != NULL &&
|
||||||
|
!nxsched_islocked_global())
|
||||||
{
|
{
|
||||||
/* Release any ready-to-run tasks that have collected
|
/* Release any ready-to-run tasks that have collected
|
||||||
* in g_pendingtasks. NOTE: This operation has a very
|
* in g_pendingtasks. NOTE: This operation has a very
|
||||||
@@ -596,7 +583,9 @@ void leave_critical_section(irqstate_t flags)
|
|||||||
FAR struct tcb_s *rtcb = this_task();
|
FAR struct tcb_s *rtcb = this_task();
|
||||||
DEBUGASSERT(rtcb != NULL);
|
DEBUGASSERT(rtcb != NULL);
|
||||||
|
|
||||||
/* Have we left entered the critical section? Or are we still nested. */
|
/* Have we left entered the critical section? Or are we still
|
||||||
|
* nested.
|
||||||
|
*/
|
||||||
|
|
||||||
DEBUGASSERT(rtcb->irqcount > 0);
|
DEBUGASSERT(rtcb->irqcount > 0);
|
||||||
if (--rtcb->irqcount <= 0)
|
if (--rtcb->irqcount <= 0)
|
||||||
|
|||||||
@@ -1,35 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/sched/sched_reprioritize.c
|
* sched/sched/sched_reprioritize.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2009, 2012, 2018 Gregory Nutt. All rights reserved.
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -80,9 +65,9 @@
|
|||||||
|
|
||||||
int nxsched_reprioritize(FAR struct tcb_s *tcb, int sched_priority)
|
int nxsched_reprioritize(FAR struct tcb_s *tcb, int sched_priority)
|
||||||
{
|
{
|
||||||
/* This function is equivalent to nxsched_set_priority() BUT it also has the
|
/* This function is equivalent to nxsched_set_priority() BUT it also has
|
||||||
* side effect of discarding all priority inheritance history. This is
|
* the side effect of discarding all priority inheritance history. This
|
||||||
* done only on explicit, user-initiated reprioritization.
|
* is done only on explicit, user-initiated reprioritization.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ret = nxsched_set_priority(tcb, sched_priority);
|
int ret = nxsched_set_priority(tcb, sched_priority);
|
||||||
|
|||||||
@@ -725,13 +725,13 @@ void nxsched_resume_timer(void)
|
|||||||
* - When pre-emption is re-enabled. A previous time slice may have
|
* - When pre-emption is re-enabled. A previous time slice may have
|
||||||
* expired while pre-emption was enabled and now needs to be executed.
|
* expired while pre-emption was enabled and now needs to be executed.
|
||||||
*
|
*
|
||||||
* In the original design, it was also planned that nxsched_reassess_timer()
|
* In the original design, it was also planned that
|
||||||
* be called whenever there was a change at the head of the ready-to-run
|
* nxsched_reassess_timer() be called whenever there was a change at the
|
||||||
* list. That call was intended to establish a new time-slice for the
|
* head of the ready-to-run list. That call was intended to establish a
|
||||||
* newly activated task or to stop the timer if time-slicing is no longer
|
* new time-slice for the newly activated task or to stop the timer if
|
||||||
* needed. However, it turns out that that solution is too fragile: The
|
* time-slicing is no longer needed. However, it turns out that that
|
||||||
* system is too vulnerable at the time that the ready-to-run list is
|
* solution is too fragile: The system is too vulnerable at the time
|
||||||
* modified in order to muck with timers.
|
* that the ready-to-run list is modified in order to muck with timers.
|
||||||
*
|
*
|
||||||
* The kludge/work-around is simple to keep the timer running all of the
|
* The kludge/work-around is simple to keep the timer running all of the
|
||||||
* time with an interval of no more than the timeslice interval. If we
|
* time with an interval of no more than the timeslice interval. If we
|
||||||
|
|||||||
+15
-30
@@ -1,36 +1,20 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* sched/sched/sched_unlock.c
|
* sched/sched/sched_unlock.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007, 2009, 2014, 2016, 2018 Gregory Nutt. All rights
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
* reserved.
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* 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
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
* modification, are permitted provided that the following conditions
|
|
||||||
* are met:
|
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
* notice, this list of conditions and the following disclaimer.
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
* notice, this list of conditions and the following disclaimer in
|
* License for the specific language governing permissions and limitations
|
||||||
* the documentation and/or other materials provided with the
|
* under the License.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
@@ -142,8 +126,9 @@ int sched_unlock(void)
|
|||||||
* There are certain conditions that we must avoid by preventing
|
* There are certain conditions that we must avoid by preventing
|
||||||
* releasing the pending tasks while within the critical section
|
* releasing the pending tasks while within the critical section
|
||||||
* of other CPUs. This logic does that and there is matching
|
* of other CPUs. This logic does that and there is matching
|
||||||
* logic in nxsched_add_readytorun to avoid starting new tasks within
|
* logic in nxsched_add_readytorun to avoid starting new tasks
|
||||||
* the critical section (unless the CPU is the holder of the lock).
|
* within the critical section (unless the CPU is the holder of
|
||||||
|
* the lock).
|
||||||
*
|
*
|
||||||
* REVISIT: If this CPU is only one that holds the IRQ lock, then
|
* REVISIT: If this CPU is only one that holds the IRQ lock, then
|
||||||
* we should go ahead and release the pending tasks. See the logic
|
* we should go ahead and release the pending tasks. See the logic
|
||||||
|
|||||||
Reference in New Issue
Block a user