Revert "All CMP platforms: Apply same fix verified on other platforms found on Xtensa."

This reverts commit fb146abee0.
This commit is contained in:
Gregory Nutt 2016-12-25 07:08:44 -06:00
parent 9aedf1bdec
commit 49fae0ac6b
3 changed files with 141 additions and 207 deletions

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/armv7-a/arm_releasepending.c * arch/arm/src/armv7-a/arm_releasepending.c
* *
* Copyright (C) 2013-2016 Gregory Nutt. All rights reserved. * Copyright (C) 2013-2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,10 +39,8 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdbool.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
@ -68,24 +66,9 @@
void up_release_pending(void) void up_release_pending(void)
{ {
struct tcb_s *rtcb = this_task(); struct tcb_s *rtcb = this_task();
#ifdef CONFIG_SMP
static bool busy = false;
#endif
sinfo("From TCB=%p\n", rtcb); sinfo("From TCB=%p\n", rtcb);
/* In SMP configurations, this function will be called as part of leaving
* the critical section. In that case, it may be re-entered as part of
* the sched_addreadytorun() processing. We have to guard against that
* case.
*/
#ifdef CONFIG_SMP
if (!busy)
{
busy = true;
#endif
/* Merge the g_pendingtasks list into the ready-to-run task list */ /* Merge the g_pendingtasks list into the ready-to-run task list */
/* sched_lock(); */ /* sched_lock(); */
@ -158,9 +141,4 @@ void up_release_pending(void)
up_fullcontextrestore(rtcb->xcp.regs); up_fullcontextrestore(rtcb->xcp.regs);
} }
} }
#ifdef CONFIG_SMP
busy = false;
}
#endif
} }

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/arm/src/armv7-m/up_releasepending.c * arch/arm/src/armv7-m/up_releasepending.c
* *
* Copyright (C) 2007-2009, 2012, 2015-2016 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009, 2012, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,10 +39,8 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdbool.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
@ -67,24 +65,9 @@
void up_release_pending(void) void up_release_pending(void)
{ {
struct tcb_s *rtcb = this_task(); struct tcb_s *rtcb = this_task();
#ifdef CONFIG_SMP
static bool busy = false;
#endif
sinfo("From TCB=%p\n", rtcb); sinfo("From TCB=%p\n", rtcb);
/* In SMP configurations, this function will be called as part of leaving
* the critical section. In that case, it may be re-entered as part of
* the sched_addreadytorun() processing. We have to guard against that
* case.
*/
#ifdef CONFIG_SMP
if (!busy)
{
busy = true;
#endif
/* Merge the g_pendingtasks list into the ready-to-run task list */ /* Merge the g_pendingtasks list into the ready-to-run task list */
/* sched_lock(); */ /* sched_lock(); */
@ -146,9 +129,4 @@ void up_release_pending(void)
*/ */
} }
} }
#ifdef CONFIG_SMP
busy = false;
}
#endif
} }

View File

@ -1,7 +1,7 @@
/**************************************************************************** /****************************************************************************
* arch/sim/src/up_releasepending.c * arch/sim/src/up_releasepending.c
* *
* Copyright (C) 2007-2009, 2015-2016 Gregory Nutt. All rights reserved. * Copyright (C) 2007-2009, 2015 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
@ -39,10 +39,8 @@
#include <nuttx/config.h> #include <nuttx/config.h>
#include <stdbool.h>
#include <sched.h> #include <sched.h>
#include <debug.h> #include <debug.h>
#include <nuttx/arch.h> #include <nuttx/arch.h>
#include <nuttx/sched.h> #include <nuttx/sched.h>
@ -67,24 +65,9 @@
void up_release_pending(void) void up_release_pending(void)
{ {
FAR struct tcb_s *rtcb = this_task(); FAR struct tcb_s *rtcb = this_task();
#ifdef CONFIG_SMP
static bool busy = false;
#endif
sinfo("From TCB=%p\n", rtcb); sinfo("From TCB=%p\n", rtcb);
/* In SMP configurations, this function will be called as part of leaving
* the critical section. In that case, it may be re-entered as part of
* the sched_addreadytorun() processing. We have to guard against that
* case.
*/
#ifdef CONFIG_SMP
if (!busy)
{
busy = true;
#endif
/* Merge the g_pendingtasks list into the ready-to-run task list */ /* Merge the g_pendingtasks list into the ready-to-run task list */
/* sched_lock(); */ /* sched_lock(); */
@ -133,9 +116,4 @@ void up_release_pending(void)
up_longjmp(rtcb->xcp.regs, 1); up_longjmp(rtcb->xcp.regs, 1);
} }
} }
#ifdef CONFIG_SMP
busy = false;
}
#endif
} }