Commit Graph

60 Commits

Author SHA1 Message Date
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
Gregory Nutt
4638a97f97 task_start() no longer depends on CONFIG_MAX_TASK_ARGS 2014-11-12 18:54:35 -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
322f9f401c Simplify how C source files are selected in the build 2014-10-07 07:42:36 -06:00
Gregory Nutt
87eb1d47ed Fix some recently introduced typos, build problems, and warnings 2014-10-05 16:58:52 -06:00
Gregory Nutt
542e706d7d Fix a perverse case where vfork() is called from a pthread. Still not recommended 2014-09-29 12:21:34 -06:00
Gregory Nutt
1dc9768c1a Fix vfork(). Now that arguments are kept on the stack, the way that arguments are passed from parent to child in vfork() must change. This bug has always been present, but was not visible with the old strdup() way of passing arguments 2014-09-29 10:45:44 -06:00
Gregory Nutt
5d9276ed71 More changes so that the KNSH build survives the changes needed for the ELF build 2014-09-16 15:55:21 -06:00
Gregory Nutt
1ef758d67f A couple more changes for clean ELF build 2014-09-16 15:40:48 -06:00
Gregory Nutt
925fc9ad81 First round of changes to get the ELF configuration building again 2014-09-16 15:37:05 -06:00
Gregory Nutt
701719b2ca Don't release user stack in kernel build. Already destroyed with all of the address environment 2014-09-15 12:45:41 -06:00
Gregory Nutt
a5e30ac4a1 execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic 2014-09-15 10:16:20 -06:00
Gregory Nutt
da7a440b35 execv() is a basic system interface. It should not be in libc/ but rather in sched/task. Its symboltable helper logic also belongs in the kernel but belings in binfmt/ with the other symbol table logic 2014-09-15 10:15:19 -06:00
Gregory Nutt
e12213592b Don't build task_create() or task_spawn() interfaces if there is an addres environment 2014-09-14 08:22:21 -06:00
Gregory Nutt
eae146d641 Kernel proxy thread should be a kernel thread, not a user task 2014-09-14 08:20:40 -06:00
Gregory Nutt
b2a94b6f2b Fix more places where the user-mode allocator is used to allocate kernel thread resources -- before the user-mode allocator even exists 2014-09-03 14:58:24 -06:00
Gregory Nutt
c81093913a IDLE TCB setup needs to indicate the the IDLE thread is a privileged, kernel thread 2014-09-03 13:47:11 -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