summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-259-8/+12
| | | | updates #2745
* posix: refactor cond wait support to defer abstime conversionGedare Bloom2016-07-253-30/+32
| | | | 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-242-10/+1
| | | | | | | | 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-225-30/+46
| | | | | | | | | | | 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-226-26/+34
| | | | Move POSIX API priority validation into _POSIX_Priority_To_core().
* posix: Make POSIX API aware of scheduler instancesSebastian Huber2016-06-229-36/+63
|
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-226-170/+232
| | | | | | | | | | | | | | 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-225-11/+14
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::schedpolicySebastian Huber2016-06-224-7/+4
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::ss_high_prioritySebastian Huber2016-06-221-4/+0
| | | | This field was unused.
* posix: _POSIX_Mutex_Default_attributesSebastian Huber2016-06-224-33/+34
| | | | | | 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-162-0/+84
| | | | updates #2608.
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-152-10/+7
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-152-14/+2
|
* posix: sched_get_priority_max()Sebastian Huber2016-06-141-2/+10
| | | | | | Enable for all configurations since it pulls in no additional dependencies. Return value of the scheduler instance of the executing thread.
* posix: Add pthread_setschedprio()Sebastian Huber2016-06-131-0/+54
| | | | 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-306-42/+124
| | | | | | | | 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-301-2/+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-304-6/+8
|
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-309-45/+58
| | | | | | | | | | | 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 Status_Control for all APIsSebastian Huber2016-05-2628-472/+125
| | | | | | | | | | | 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.
* posix: Fix sem_init() with too large initial valueSebastian Huber2016-05-261-1/+6
| | | | Close #2721.
* Fix semaphore post overflow statusSebastian Huber2016-05-262-6/+13
| | | | Close #2720.
* posix: Fix pthread_spin_unlock() error statusSebastian Huber2016-05-251-2/+1
| | | | Close #2719.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-2536-177/+160
| | | | | | | | Drop the multiprocessing (MP) dependent callout parameter from the thread queue extract, dequeue, flush and unblock methods. Merge this parameter with the lock context into new structure Thread_queue_Context. This helps to gets rid of the conditionally compiled method call helpers.
* score: Get rid of mp_id parameterSebastian Huber2016-05-259-9/+0
| | | | | Get rid of the mp_id parameter used for some thread queue methods. Use THREAD_QUEUE_QUEUE_TO_OBJECT() instead.
* score: Move thread queue object supportSebastian Huber2016-05-256-17/+7
|
* score: Fix blocking _CORE_message_queue_Submit()Sebastian Huber2016-05-242-13/+1
| | | | Close #2718.
* score: _CORE_message_queue_Seize()Sebastian Huber2016-05-241-1/+0
| | | | Delete unused parameter.
* score: _CORE_semaphore_Seize()Sebastian Huber2016-05-201-1/+0
| | | | Delete unused parameter.
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-2016-17/+17
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* posix: Remove dead code and shrink commentSebastian Huber2016-05-201-35/+3
|
* posix: Add and use _POSIX_Get_object_body()Sebastian Huber2016-05-203-111/+21
|
* posix: Avoid Giant lock for pthread_kill()Sebastian Huber2016-05-201-33/+22
| | | | Update #2555.
* posix: Rework thread cancellationSebastian Huber2016-05-209-190/+80
| | | | | | | | Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX thread cancellation to use the thread life states. Update #2555. Update #2626.
* score: Avoid Giant lock for _Thread_Start()Sebastian Huber2016-05-201-6/+2
| | | | Update #2555.
* posix: Rework pthread_join()Sebastian Huber2016-05-206-162/+107
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.