Commit Graph

77 Commits

Author SHA1 Message Date
Gregory Nutt a0f567f4a3 Update TODO, cosmetic changes, spelling -- US English spells it canceled and canceling vs cancelled and cancelling. No idea why. 2016-12-09 18:39:40 -06:00
Gregory Nutt a76e729b0d Trivial, cosmetic 2016-12-09 17:27:57 -06:00
Gregory Nutt 78cdc9f113 Fix a typo in a debug assertion. 2016-12-09 16:59:10 -06:00
Gregory Nutt 7ee0862e67 Merge remote-tracking branch 'origin/master' into cancelpt 2016-12-09 16:54:15 -06:00
Gregory Nutt b07964461e pthread_mutex_destroy(): Fix an error in destorynig a mutex which can occur after a pthread has been canceled while holding the mutex. 2016-12-09 16:53:29 -06:00
Gregory Nutt 7fce8022c6 Finishes all cancellation point logic 2016-12-09 16:50:34 -06:00
Gregory Nutt d8783a7345 Update Documentation 2016-12-09 14:41:54 -06:00
Gregory Nutt c9ca97b4b5 cancellation points are basically function. More tested is needed and additional cancellation points must be implemented before this can be merged back to master. 2016-12-09 12:01:18 -06:00
Gregory Nutt 018db84567 Flesh out more cancellation point logic. 2016-12-09 10:31:40 -06:00
Gregory Nutt d35e589d56 Flesh basic cancellation point support 2016-12-09 09:44:23 -06:00
Gregory Nutt 82a79b9c1b Add framework for cancellation point support. 2016-12-09 08:13:28 -06:00
Gregory Nutt acaae12e8b Add pthread_testcancel(), pthread_testcancel(), and definitiions for cancellation types. 2016-12-09 07:23:00 -06:00
Gregory Nutt 6224e47533 pthread cleanup stack: Replace critical section with sched_lock/unlock(). The cleanup stack modification only needs to have the TCB stationary. The stack is never modified from interrupt level logic 2016-12-08 14:33:02 -06:00
Gregory Nutt ab43681f15 Update TODO and some comments. 2016-12-08 10:24:40 -06:00
Gregory Nutt a1fbc2ad0d pthreads: Add pthread_cleanup_push() and pthread_cleanup_pop() 2016-12-08 09:27:13 -06:00
Gregory Nutt 796969f6b6 Update TODO. Provide do-nothing stubs for mutex attribute interfaces if features not enabled. pthread_cond includes a signaling semaphore and should call sem_setprotocol. 2016-11-05 11:06:52 -06:00
Gregory Nutt 0d5bd30943 Fix a type in include file name 2016-11-03 12:58:02 -06:00
Gregory Nutt 1da3a5fa61 sched: Disable priority inheritance on all semaphores used for signaling 2016-11-03 12:42:02 -06:00
Gregory Nutt d5b4d848d3 Move protoypes for the non-standard include/semaphore.h file to the non-standard include/nuttx/semaphore.h with the other non-standard semaphore interfaces. 2016-11-02 14:43:03 -06:00
Gregory Nutt 92d3022411 Add pthread_mutexattr_get/set_protocol and non-standard sem_get/set_protocol. These may use to enable or disable priority inheritance on a single semaphore. 2016-11-02 09:05:18 -06:00
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 18ce4ff57b sched/: Review and correct some stylistic inconsistencies 2016-08-07 08:25:30 -06:00
Gregory Nutt 830af912a1 Add sig_raise() 2016-07-04 09:32:36 -06:00
Gregory Nutt f3ec664f63 Debug output level (error, warning, info) is now selectable on a per-subsystem, per-driver basis 2016-06-12 13:08:23 -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 fc3540cffe Replace all occurrences of vdbg with vinfo 2016-06-11 11:59:51 -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 5a590e99b9 Add SYSCALLS for pthread_setaffinity() and pthread_getaffinity() 2016-02-19 18:13:06 -06:00
Gregory Nutt 1b5e296cf2 Add pthread_setaffinity() and pthread_getaffinity() 2016-02-19 17:59:19 -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 3994b094c5 Remove some empty C file section comments; Update some text in TODO file 2016-02-19 10:01:15 -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 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 48da5aa496 sched/pthread/: CRITICAL BUGFIX: Logic was wiping out the indication that of the type of a pthread. Hence, it could be confused as a task. Found because this was causing a crash when /proc/nnn/cmdline was printed. 2015-11-28 10:05:36 -06:00
Gregory Nutt 78ae661223 One more trivial spacing issue 2015-10-07 20:13:49 -06:00
Gregory Nutt 79d554939e sched/: Fix some spacing issues 2015-10-07 19:59:14 -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
Gregory Nutt 768d892188 Add si_errno to siginfo_t 2015-08-14 10:10:32 -06:00
Anton D. Kachalov 4a16bc6924 [sched/pthread/pthread_kill] Add missed header for enabled CONFIG_SCHED_HAVE_PARENT
Signed-off-by: Anton D. Kachalov <mouse@yandex-team.ru>
2015-07-30 18:51:37 +03:00
Gregory Nutt 27e21710fd This is basically a complete redesign of the sporadic scheduling logic due to limitations in the initial design 2015-07-25 12:50:53 -06:00
Gregory Nutt a1031417e8 Comment out part of sporadic scheduler logic: Part of replenishment logic is bogus 2015-07-24 18:18:58 -06:00
Gregory Nutt ea7dbc984b Add basic sporadic schedule state machine 2015-07-24 09:03:21 -06:00
Gregory Nutt 3b1306078b Sporadic Scheduler: Ensure that the replenishment period is greater than or equal to the budget period 2015-07-23 15:08:41 -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 aa90da2bc8 pthread_create: Fix an (unlikely) error in fallback value in the event of a failure (which should never occur) 2015-07-23 11:25:25 -06:00
Gregory Nutt 146bdc3c93 TCB: Increase the size of the scheduling policy field from 1 to 2 bits to allow additional, planned scheduling policies 2015-07-23 10:15:07 -06:00