diff --git a/arch/arm/src/arm/up_unblocktask.c b/arch/arm/src/arm/up_unblocktask.c index 824c52a679e..91dd890d3a6 100644 --- a/arch/arm/src/arm/up_unblocktask.c +++ b/arch/arm/src/arm/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/arm/src/armv6-m/up_unblocktask.c b/arch/arm/src/armv6-m/up_unblocktask.c index b42c3841d87..2389a1acac9 100644 --- a/arch/arm/src/armv6-m/up_unblocktask.c +++ b/arch/arm/src/armv6-m/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/arm/src/armv7-a/arm_unblocktask.c b/arch/arm/src/armv7-a/arm_unblocktask.c index 196dcf625a4..8e5c48b9673 100644 --- a/arch/arm/src/armv7-a/arm_unblocktask.c +++ b/arch/arm/src/armv7-a/arm_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/arm/src/armv7-m/up_unblocktask.c b/arch/arm/src/armv7-m/up_unblocktask.c index bc5548e1b7c..878e4a49fea 100644 --- a/arch/arm/src/armv7-m/up_unblocktask.c +++ b/arch/arm/src/armv7-m/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/avr/src/avr/up_unblocktask.c b/arch/avr/src/avr/up_unblocktask.c index 1558af1464c..b5e44786636 100644 --- a/arch/avr/src/avr/up_unblocktask.c +++ b/arch/avr/src/avr/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/avr/src/avr32/up_unblocktask.c b/arch/avr/src/avr32/up_unblocktask.c index d6e5ded763a..2fd062403b5 100644 --- a/arch/avr/src/avr32/up_unblocktask.c +++ b/arch/avr/src/avr32/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/hc/src/common/up_unblocktask.c b/arch/hc/src/common/up_unblocktask.c index 374d451edca..5a1e5bf00f0 100644 --- a/arch/hc/src/common/up_unblocktask.c +++ b/arch/hc/src/common/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/mips/src/mips32/up_unblocktask.c b/arch/mips/src/mips32/up_unblocktask.c index c68a62fd705..5c4d46a90a7 100644 --- a/arch/mips/src/mips32/up_unblocktask.c +++ b/arch/mips/src/mips32/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/rgmp/src/nuttx.c b/arch/rgmp/src/nuttx.c index 893ee5cc9fa..5b545597b37 100644 --- a/arch/rgmp/src/nuttx.c +++ b/arch/rgmp/src/nuttx.c @@ -330,14 +330,12 @@ void up_unblock_task(struct tcb_s *tcb) struct tcb_s *rtcb = current_task; /* Remove the task from the blocked task list */ + sched_removeblocked(tcb); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + /* Reset scheduler parameters */ + + sched_resume_scheduler(tcb); // Add the task in the correct location in the prioritized // g_readytorun task list. diff --git a/arch/sh/src/common/up_unblocktask.c b/arch/sh/src/common/up_unblocktask.c index 587eafe5d8c..8f46a596dc5 100644 --- a/arch/sh/src/common/up_unblocktask.c +++ b/arch/sh/src/common/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/sim/src/up_unblocktask.c b/arch/sim/src/up_unblocktask.c index 86edecbb52d..39d5dd37915 100644 --- a/arch/sim/src/up_unblocktask.c +++ b/arch/sim/src/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * Redistribution and use in source and binary forms, with or without @@ -47,18 +47,6 @@ #include "sched/sched.h" #include "up_internal.h" -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - /**************************************************************************** * Public Functions ****************************************************************************/ @@ -94,13 +82,9 @@ void up_unblock_task(struct tcb_s *tcb) sched_removeblocked(tcb); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/x86/src/common/up_unblocktask.c b/arch/x86/src/common/up_unblocktask.c index 518a1f1d9c8..92870c9aa63 100644 --- a/arch/x86/src/common/up_unblocktask.c +++ b/arch/x86/src/common/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/z16/src/common/up_unblocktask.c b/arch/z16/src/common/up_unblocktask.c index ee0f003eccc..6e82ce2b8f0 100644 --- a/arch/z16/src/common/up_unblocktask.c +++ b/arch/z16/src/common/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list diff --git a/arch/z80/src/common/up_unblocktask.c b/arch/z80/src/common/up_unblocktask.c index 9e05ff8bb2f..db613abbfe4 100644 --- a/arch/z80/src/common/up_unblocktask.c +++ b/arch/z80/src/common/up_unblocktask.c @@ -1,7 +1,7 @@ /**************************************************************************** * 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 * * 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); - /* Reset its timeslice. This is only meaningful for round - * robin tasks but it doesn't here to do it for everything - */ + /* Reset scheduler parameters */ -#if CONFIG_RR_INTERVAL > 0 - tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL); -#endif + sched_resume_scheduler(tcb); /* Add the task in the correct location in the prioritized * g_readytorun task list