summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (follow)
Commit message (Collapse)AuthorAgeFilesLines
* score: Introduce _Thread_Get_priority()Sebastian Huber2016-09-084-11/+11
| | | | Avoid direct access to thread internal data fields.
* score: Move thread wait node to scheduler nodeSebastian Huber2016-09-081-1/+4
| | | | Update #2556.
* score: Introduce Thread_queue_Lock_contextSebastian Huber2016-09-0810-19/+33
| | | | | | Introduce Thread_queue_Lock_context to contain the context necessary for thread queue lock and thread wait lock acquire/release operations to reduce the Thread_Control size.
* score: Simplify thread queue acquire/releaseSebastian Huber2016-09-082-13/+4
|
* score: Fix warningSebastian Huber2016-09-081-1/+1
|
* posix: nanosleep: adjust elapsed time calculationGedare Bloom2016-08-101-39/+39
| | | | | | | Use clock_gettime before and after sleep to calculate the time spent asleep, and the amount of time remaining. updates #2732
* score: Add debug support to red-black treesSebastian Huber2016-08-081-0/+2
| | | | This helps to detect double insert and extract errors.
* posix: Fix for RTEMS_DEBUGSebastian Huber2016-08-081-0/+1
|
* posix: Fix for RTEMS_DEBUGSebastian Huber2016-08-031-2/+8
|
* posix: nanosleep: optimize away a time conversionGedare Bloom2016-07-291-2/+1
| | | | updates #2732
* score: Turn thread lock into thread wait lockSebastian Huber2016-07-271-4/+4
| | | | | | | | | The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
* posix: Fix error statusSebastian Huber2016-07-271-2/+3
|
* cpukit: refactor nanosleep and use 64-bit timeout for threadqGedare Bloom2016-07-261-57/+67
| | | | | | | | | | * Fixes a bug with elapsed time calculations misusing absolute time arguments in nanosleep_helper by passing the requested relative interval. * Fixes a bug with truncation of absolute timeouts by passing the full 64-bit value to Thread_queue_Enqueue. * Share yield logic between nanosleep and clock_nanosleep. updates #2732
* posix: fix clock_nanosleep and nanosleep clock useGedare Bloom2016-07-251-25/+68
| | | | | | | | | | Sleeping with CLOCK_REALTIME should use the WATCHDOG_ABSOLUTE clock discipline for the threadq so that the timeout interval may change in case the clock source changes. Similarly, CLOCK_MONOTONIC uses the WATCHDOG_RELATIVE threadq that will only wakeup the thread after the requested count of ticks elapse. updates #2732
* posix: cond_timedwait remember and use clock from condattrGedare Bloom2016-07-2511-9/+16
| | | | updates #2745
* posix: refactor cond wait support to defer abstime conversionGedare Bloom2016-07-254-32/+33
| | | | updates #2745
* posix: add clock_nanosleep and testsGedare Bloom2016-07-251-9/+46
| | | | updates #2732
* cpukit: Add and use Watchdog_Discipline.Gedare Bloom2016-07-2515-15/+14
| | | | | | | | | Clock disciplines may be WATCHDOG_RELATIVE, WATCHDOG_ABSOLUTE, or WATCHDOG_NO_TIMEOUT. A discipline of WATCHDOG_RELATIVE with a timeout of WATCHDOG_NO_TIMEOUT is equivalent to a discipline of WATCHDOG_NO_TIMEOUT. updates #2732
* score: Add debug support to chainsSebastian Huber2016-07-221-1/+3
| | | | | | | This helps to detect * double insert, append, prepend errors, and * get from empty chain errors.
* posix: Fix double chain extractSebastian Huber2016-07-211-5/+2
|
* score: Change Priority_Control to 64-bitSebastian Huber2016-06-243-11/+9
| | | | | | | | A 32-bit Priority_Control limits the uptime to 49 days with a 1ms clock tick in case the EDF scheduler is used. Increase it to 64-bit to enable proper operation of the EDF scheduler, Close 2173.
* posix: Fix pthread_create()Sebastian Huber2016-06-241-4/+7
| | | | Do not access data of the executing thread without proper locks.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-226-35/+48
| | | | | | | | | | | Introduce map/unmap priority scheduler operations to map thread priority values from/to the user domain to/from the scheduler domain. Use the map priority operation to validate the thread priority. The EDF schedulers use this new operation to distinguish between normal priorities and priorities obtain through a job release. Update #2173. Update #2556.
* posix: Generalize _POSIX_Priority_To_core()Sebastian Huber2016-06-227-32/+44
| | | | Move POSIX API priority validation into _POSIX_Priority_To_core().
* posix: Make POSIX API aware of scheduler instancesSebastian Huber2016-06-2210-93/+91
|
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-228-192/+253
| | | | | | | | | | | | | | Instead of lowering the priority in case the initial budget is consumed raise the priority for each new period. Restore the normal priority once the initial budget is consumed. This makes it later easier to combine the high priority phase with temporary priority boosts (e.g. via priority ceiling and inheritance). Use the thread lock to protect the POSIX thread attributes instead of the thread state lock. This makes it easier to change the thread priority and keep the POSIX attributes consistent. Fixes a false positive use of uninitialized variable warning.
* posix: Delete POSIX_API_Control::schedparamSebastian Huber2016-06-226-13/+16
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::schedpolicySebastian Huber2016-06-225-9/+4
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::ss_high_prioritySebastian Huber2016-06-222-9/+0
| | | | This field was unused.
* posix: _POSIX_Mutex_Default_attributesSebastian Huber2016-06-228-39/+50
| | | | | | Make _POSIX_Mutex_Default_attributes constant and independent of the scheduler instance. Use INT_MAX to indicate the default ceiling priority.
* posix: pthread_mutexattr_setprioceiling()Sebastian Huber2016-06-222-17/+11
| | | | | | | Accept all priority values in pthread_mutexattr_setprioceiling(). This is in line with POSIX and FreeBSD. The priority is validated in pthread_mutex_init(). Validate the priority only for priority ceiling mutexes.
* Add pthread_condattr_getclock() and pthread_condattr_setclock()Joel Sherrill2016-06-163-1/+87
| | | | updates #2608.
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-153-10/+11
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-153-15/+16
|
* posix: Remove superfluous codeSebastian Huber2016-06-151-61/+0
| | | | Remove double declarations, useless comments and unused functions.
* posix: sched_get_priority_max()Sebastian Huber2016-06-142-3/+12
| | | | | | Enable for all configurations since it pulls in no additional dependencies. Return value of the scheduler instance of the executing thread.
* posix: sched_get_priority_min()Sebastian Huber2016-06-141-1/+3
| | | | | Enable for all configurations since it pulls in no additional dependencies.
* posix: Add pthread_setschedprio()Sebastian Huber2016-06-132-0/+55
| | | | Close #2734.
* posix: Fix pthread_setschedparam()Sebastian Huber2016-06-131-1/+1
| | | | Close #2735.
* posix: Fix pthread_getschedparam()Sebastian Huber2016-06-131-1/+1
| | | | | | Return the unmodified thread priority value according to POSIX. Close #2736.
* score: Rework CORE inherit priority mutexSebastian Huber2016-05-303-31/+22
| | | | | Provide dedicated seize and surrender methods for inherit priority mutexes. This eliminates CORE_mutex_Attributes.
* score: Rework CORE priority ceiling mutexSebastian Huber2016-05-305-14/+28
| | | | | Rework seize and surrender methods to use CORE_ceiling_mutex_Control. This eliminates CORE_mutex_Disciplines.
* score: Add CORE mutex variantsSebastian Huber2016-05-308-48/+186
| | | | | | | | Add CORE_recursive_mutex_Control and CORE_ceiling_mutex_Control to avoid the run-time evaluation of attributes to figure out how a particular mutex methods should behave. Start with the no protocol variants. This eliminates the CORE_MUTEX_DISCIPLINES_FIFO and CORE_MUTEX_DISCIPLINES_PRIORITY disciplines.
* posix: Delete POSIX_Mutex_Protocol::process_sharedSebastian Huber2016-05-302-4/+0
|
* posix: Avoid use of internal mutex methodsSebastian Huber2016-05-301-21/+10
| | | | Avoid use of internal mutex methods for pthread_mutex_setprioceiling().
* posix: Avoid use of internal mutex methodsSebastian Huber2016-05-301-23/+13
| | | | Avoid use of internal mutex methods for condition variables.
* score: Add semaphore variantsSebastian Huber2016-05-305-6/+10
|
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-3010-50/+77
| | | | | | | | | | | Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical().
* score: Add _Thread_queue_Context_set_MP_callout()Sebastian Huber2016-05-303-3/+3
| | | | | | Add _Thread_queue_Context_set_MP_callout() to simplify _Thread_queue_Context_initialize(). This makes it possible to more easily add additional fields to Thread_queue_Context.
* score: Add Status_Control for all APIsSebastian Huber2016-05-2636-607/+156
| | | | | | | | | | | Unify the status codes of the Classic and POSIX API to use the new enum Status_Control. This eliminates the Thread_Control::Wait::timeout_code field and the timeout parameter of _Thread_queue_Enqueue_critical() and _MPCI_Send_request_packet(). It gets rid of the status code translation tables and instead uses simple bit operations to get the status for a particular API. This enables translation of status code constants at compile time. Add _Thread_Wait_get_status() to avoid direct access of thread internal data structures.