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
75104b0808
Remove duplicate function prototype from wrong header file
2016-10-01 10:56:42 -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
13cac3b592
sched/: Change some *err() message to *info() messages if what was a *dbg() message does not indicate and error condition.
2016-06-11 16:42:42 -06:00
Gregory Nutt
a1469a3e95
Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err()
2016-06-11 15:50:49 -06:00
Gregory Nutt
86b79b33cf
Reserver the name 'err' for other purposes
2016-06-11 14:40:07 -06:00
Gregory Nutt
1cdc746726
Rename CONFIG_DEBUG to CONFIG_DEBUG_FEATURES
2016-06-11 14:14:08 -06:00
Gregory Nutt
fc3540cffe
Replace all occurrences of vdbg with vinfo
2016-06-11 11:59:51 -06:00
Gregory Nutt
6cfe56202d
Backout 3f731241cb
. It is a good idea, but has some unpleasant side effect... like SYSLOG and dbg() no longer work
2016-04-18 18:55:36 -06:00
Gregory Nutt
3f731241cb
fs/inode/, fs/vfs/, and sched/task/: File and socket descriptors are no longer allocated for kernel threads. They must use SYSLOG for output and the low-level psock interfaces for network I/O. This saves a little memory which might be important for small footprint configurations.
2016-04-14 10:14:38 -06:00
Gregory Nutt
3fba968bb0
Fix an error when a task with open message queue descriptors is killed via task_delete(). Noted by Anton Gropyanov.
2016-04-11 11:14:18 -06:00
Gregory Nutt
f0671bae2f
SMP: Reorder some logic related to task exit() and restart() for logic of SMP.
2016-03-22 18:19:57 -06:00
Gregory Nutt
7f19631338
sched/: Add option to buffer scheduler instrumentation data in memory.
2016-03-17 09:49:43 -06:00
Gregory Nutt
0fb035f76b
Standardize some naming in code section comments
2016-02-21 18:09:04 -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
b50325bb38
SMP: Add funtions to perform atomic bit set/clear operations; fix two errors in SMP macros
2016-02-17 13:20:01 -06:00
Gregory Nutt
3c46fa3f9f
Fix a contention problem in the previous critical section design
2016-02-15 08:50:20 -06:00
Gregory Nutt
6e3107650d
nuttx/sched: Replace irqsave() with enter_critical_section(); replace irqrestore() with leave_critical_section()
2016-02-14 08:17:46 -06:00
Gregory Nutt
85f663a8ee
SMP: Add non-reentrant spinlocks, fix pre-emption controls with SMP, and most of the basic scheduler support for SMP (still missing a few things)
2016-02-12 14:55:31 -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
49227fa554
Scheduler: Replace the boolean 'prioritized' with a uint8_t bit set so that additional attributes of a list can be specified without adding more boolean values.
2016-02-11 08:06:33 -06:00
Gregory Nutt
292d2fe648
Correct naming of a TCB flag; update some comments
2016-02-10 16:53:34 -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
0b12dbf95d
Fix some spacing problems
2015-10-04 15:04:00 -06:00
Gregory Nutt
16b32bbadd
Standardize the width of all comment boxes in C files
2015-10-03 07:25:53 -06:00
Gregory Nutt
5b51a9fcdd
Standardize the width of all comment boxes in C files
2015-10-02 17:43:18 -06:00
Gregory Nutt
cb9e27c3b0
Standardize naming used for public data and function groupings
2015-10-02 16:30:35 -06:00
Paul A. Patience
3b89eabd50
Correct #if to #ifdef when the macro can be undefined. Fix bug in AT24XX driver: it should compare AT24XX_ADDRSIZE to 2.
2015-09-01 13:52:29 -04:00
Gregory Nutt
51f386d08a
Fix more common typos
2015-08-16 11:07:23 -06:00
Gregory Nutt
768d892188
Add si_errno to siginfo_t
2015-08-14 10:10:32 -06:00
Gregory Nutt
12cdd2a8fe
Fix some bad conditional compilation
2015-07-24 12:27:15 -06:00
Gregory Nutt
ea7dbc984b
Add basic sporadic schedule state machine
2015-07-24 09:03:21 -06:00
Gregory Nutt
5baa738019
Most cosmetic, but includes some fixes to some range checking
2015-07-23 14:36:49 -06:00
Gregory Nutt
9095e8eab4
include/, sched/, and libc/: Add support for sporadic scheduling parameters in struct sched_param, posix_spawnattr_t, and pthread_attr_t. Update all user interfaces to pass sporadic scheduling parameters. Feature is dependent on EXPERIMENTAL and no changes have yet been made to core scheduling logic.
2015-07-23 13:16:32 -06:00
Gregory Nutt
f161a1d0f7
atexit: Fix reference to undefined variable in certain configurations. From Juha Niskanen
2015-04-14 07:31:35 -06:00
Gregory Nutt
b4423c1eed
Make some file section headers more consistent with standard
2015-04-08 06:47:36 -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
b3a1939020
Sempahores: Add logic to clean up after task_delete() or pthread_cancel() if the task happens to be waiting on a semaphore when it is cancelled
2014-12-13 12:02:25 -06:00
Gregory Nutt
1003ee3e9a
Costmetic change to a comment
2014-12-13 10:41:57 -06:00
Gregory Nutt
9e290c10b5
Fix some compile issues introduces with removal of CONFIG_MAX_TASK_ARGS
2014-11-14 09:53:11 -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
bb9b0f572d
vfork no longer depends on CONFIG_MAX_TASK_ARGS
2014-11-12 19:01:29 -06:00