Commit Graph

22 Commits

Author SHA1 Message Date
Gregory Nutt 8669183852 sched/pthread and task: When a pthread is started, there is a small bit of logic that will run on the thread of execution of the new pthread. In the case where the new pthread has a lower priority than the parent thread, then this could cause both the parent thread and the new pthread to be blocked at the priority of the lower priority pthread (assuming that CONFIG_PRIORITY_INHERITANCE is not selected).
This change temporarily boosts the priority of the new pthread to at least the priority of the new pthread to at least the priority of the parent thread.  When that bit of logic has executed on the thread of execution of the new pthread, it will then drop to the correct priority (if necessary) before calling into the new pthread's entry point.
2016-10-01 11:38:22 -06:00
Gregory Nutt 952268274a sched/: Fix misplaced right bracket; remove redundant assertion. 2016-09-06 12:27:12 -06:00
Gregory Nutt 7582c2344c sched/: Eliminate calculation of a possibly unused value. 2016-09-06 10:28:19 -06:00
Gregory Nutt e034c78516 improve some assertions; add some comments. 2016-09-06 10:21:41 -06:00
Gregory Nutt 27919549f1 sched/: Simplify some child/parent logic 2016-09-06 08:40:55 -06:00
Gregory Nutt 05aa586aa6 sched/: Move fields related to parent/child task relationship out of TCB into group structure. 2016-09-06 08:28:31 -06:00
Gregory Nutt 858af4295c The TCB nchildren field should not be incremented when pthreads are created. 2016-09-06 07:34:36 -06:00
Gregory Nutt 143d287f11 Fix some missing header file inclusions and a misplaced semi-colon from recent commits 2016-02-21 11:27:55 -06:00
Gregory Nutt a633353ec3 Add a CPU affinity set to the TCB if SMP is enable and use this CPU set as a mask for determining which CPUs the thread may run on. Add an affinity field to the attrributes to permit controlling which CPUs a pthread may run on. Implements pthread_att_setaffinity_np() and pthread_attr_getaffinity_np(). 2016-02-19 17:33:35 -06:00
Gregory Nutt c315479a04 SMP: Move IDLE thread init logic from sim to OS; need to assign unique IDs to each IDLE task 2016-02-11 14:11:26 -06:00
Gregory Nutt 74db48202e sched/: Replace explict references to g_readytorun with indirect references via the this_task() macro 2016-02-06 17:44:41 -06:00
Gregory Nutt 79d554939e sched/: Fix some spacing issues 2015-10-07 19:59:14 -06:00
Gregory Nutt cb9e27c3b0 Standardize naming used for public data and function groupings 2015-10-02 16:30:35 -06:00
Gregory Nutt 937f9f23f1 strncpy will not copy the terminating \0 into the destination if the source is larger than the size of the destination. Ensure that the last byte is always zero and let strncpy only copy CONFIG_TASK_NAME_SIZE bytes. The issue of unterminated names can be observed in ps when creating a pthread while CONFIG_TASK_NAME_SIZE is set to 8. 2014-12-17 12:24:02 -06:00
Gregory Nutt 838f2053e4 Fix some compile errors introduce in last commits 2014-11-13 07:44:45 -06:00
Gregory Nutt bc265d74e7 task_create: Don't even try if the accumulated size of the argument list is larger than the stack 2014-11-13 06:44:15 -06:00
Gregory Nutt ffbd6cf10a task_setup() no longer depends on CONFIG_MAX_TASK_ARGS 2014-11-12 18:49:58 -06:00
Gregory Nutt 64ab35b399 There used to be two ways to pass parameters to new tasks, depending upon the configuration: Either (1) argv[] as created as an array with each string strdup'ed. Or (1) argv[] array and strings were created on the stack before the new task was started. Now, there is only one way, way (1). Way (2) might be slightly more compact, but this is not worth carry the complexity of two different ways of doing the same thing. 2014-09-01 15:39:34 -06:00
Gregory Nutt 23147c40a5 Remove final traces of the 8015 from the NuttX source tree 2014-09-01 13:21:15 -06:00
Gregory Nutt e3ff0689bb Rename CONFIG_NUTTX_KERNEL to CONFIG_BUILD_PROTECTED; Partially integrate new CONFIG_BUILD_KERNEL 2014-08-29 14:47:22 -06:00
Gregory Nutt d798dd37a7 Replace os_internal.h with sched/sched.h in files that actually reference something in sched.h 2014-08-08 17:53:55 -06:00
Gregory Nutt 23a334c066 Move task control files from sched/ to sched/task 2014-08-08 16:44:08 -06:00