Add logic to reset the replenish the sporadic scheduler when a task is resumed
This commit is contained in:
parent
39192c3537
commit
9d98177daa
arch
arm/src
avr/src
hc/src/common
mips/src/mips32
rgmp/src
sh/src/common
sim/src
x86/src/common
z16/src/common
z80/src/common
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/arm/up_unblocktask.c
|
* arch/arm/src/arm/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 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
|
||||||
@ -93,13 +93,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv6-m/up_unblocktask.c
|
* arch/arm/src/armv6-m/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 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
|
||||||
@ -91,13 +91,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-a/arm_unblocktask.c
|
* arch/arm/src/armv7-a/arm_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013-2014 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
|
||||||
@ -93,13 +93,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/arm/src/armv7-m/up_unblocktask.c
|
* arch/arm/src/armv7-m/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2012 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
|
||||||
@ -92,13 +92,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr/up_unblocktask.c
|
* arch/avr/src/avr/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 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
|
||||||
@ -92,13 +92,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/avr/src/avr32/up_unblocktask.c
|
* arch/avr/src/avr32/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2010, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2010, 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
|
||||||
@ -93,13 +93,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/hc/src/common/up_unblocktask.c
|
* arch/hc/src/common/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 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
|
||||||
@ -93,13 +93,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/mips/src/mips32/up_unblocktask.c
|
* arch/mips/src/mips32/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 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
|
||||||
@ -95,13 +95,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -330,14 +330,12 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
struct tcb_s *rtcb = current_task;
|
struct tcb_s *rtcb = current_task;
|
||||||
|
|
||||||
/* Remove the task from the blocked task list */
|
/* Remove the task from the blocked task list */
|
||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
sched_resume_scheduler(tcb);
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Add the task in the correct location in the prioritized
|
// Add the task in the correct location in the prioritized
|
||||||
// g_readytorun task list.
|
// g_readytorun task list.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sh/src/common/up_unblocktask.c
|
* arch/sh/src/common/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 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
|
||||||
@ -93,13 +93,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/sim/src/up_unblocktask.c
|
* arch/sim/src/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 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
|
||||||
@ -47,18 +47,6 @@
|
|||||||
#include "sched/sched.h"
|
#include "sched/sched.h"
|
||||||
#include "up_internal.h"
|
#include "up_internal.h"
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Pre-processor Definitions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Data
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
|
||||||
* Private Functions
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@ -94,13 +82,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/x86/src/common/up_unblocktask.c
|
* arch/x86/src/common/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2011, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2011, 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
|
||||||
@ -92,13 +92,9 @@ void up_unblock_task(struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* common/up_unblocktask.c
|
* common/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008-2009, 2013 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008-2009, 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
|
||||||
@ -96,13 +96,9 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* arch/z80/src/common/up_unblocktask.c
|
* arch/z80/src/common/up_unblocktask.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 2007-2009, 2013-2014 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2007-2009, 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
|
||||||
@ -98,13 +98,9 @@ void up_unblock_task(FAR struct tcb_s *tcb)
|
|||||||
|
|
||||||
sched_removeblocked(tcb);
|
sched_removeblocked(tcb);
|
||||||
|
|
||||||
/* Reset its timeslice. This is only meaningful for round
|
/* Reset scheduler parameters */
|
||||||
* robin tasks but it doesn't here to do it for everything
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if CONFIG_RR_INTERVAL > 0
|
sched_resume_scheduler(tcb);
|
||||||
tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Add the task in the correct location in the prioritized
|
/* Add the task in the correct location in the prioritized
|
||||||
* g_readytorun task list
|
* g_readytorun task list
|
||||||
|
Loading…
x
Reference in New Issue
Block a user