summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* score: Avoid superfluous life protectionSebastian Huber2016-05-201-3/+0
| | | | | | | | Disable thread dispatching is enough to prevent deletion of the executing thread. There is no need for an additional life protection. Update #2555. Update #2626.
* score: Add _Thread_Exit()Sebastian Huber2016-05-201-1/+8
| | | | | | | | The goal is to make _Thread_Exit() a no-return function in follow up patches. Update #2555. Update #2626.
* posix: Fix return states of pthread_kill()Sebastian Huber2016-05-171-17/+11
| | | | | | POSIX mandates that an error code is returned and not -1 plus errno. Close #2715.
* posix: Fix return status of pthread_cancel()Sebastian Huber2016-05-171-1/+1
| | | | | | | POSIX recommends ESRCH in case no thread exists for the specified identifier. Close #2713.
* posix: Avoid Giant lock for some pthread functionsSebastian Huber2016-05-124-113/+98
| | | | | | | | Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555.
* score: Avoid Giant lock _Scheduler_Get_affinity()Sebastian Huber2016-05-121-24/+25
| | | | Update #2555.
* score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber2016-05-122-31/+36
| | | | Update #2555.
* score: Introduce thread state lockSebastian Huber2016-05-121-9/+11
| | | | Update #2556.
* posix: Make _POSIX_signals_Action_handler() staticSebastian Huber2016-05-122-135/+126
|
* posix: Avoid Giant lock in pthread_equal()Sebastian Huber2016-05-061-51/+9
| | | | Update #2555.
* score: Optimize _Objects_Get_local()Sebastian Huber2016-05-022-4/+4
| | | | | Make the interrupt lock context the second parameter to avoid register moves.
* posix: Avoid Giant lock in _POSIX_signals_Send()Sebastian Huber2016-05-021-5/+7
| | | | | Update #2555. Update #2690.
* posix: Remove superfluous thread dispatch disableSebastian Huber2016-05-021-14/+12
| | | | | | | The _Thread_queue_Enqueue_critical() already deals with thread dispatching. Update #2555.
* score: Delete __RTEMS_STRICT_ORDER_MUTEX__Sebastian Huber2016-05-021-3/+0
| | | | | | Remove support for strict order mutexes. Close #2124.
* score: Avoid Giant lock for set time of daySebastian Huber2016-05-022-6/+2
| | | | | Update #2555. Update #2630.
* score: Streamline set time of day functionsSebastian Huber2016-05-021-1/+1
| | | | | | | Rename _TOD_Set() into _TOD_Set_with_timespec(). Rename _TOD_Set_with_timestamp() into _TOD_Set(). This is now in line with _TOD_Get() and _TOD_Get_as_timespec(). The timestamp is the canonical format.
* posix: Simplify message queuesSebastian Huber2016-05-0210-540/+337
| | | | | | | | | | | | The mq_open() function returns a descriptor to a POSIX message queue object identified by a name. This is similar to sem_open(). In contrast to the POSIX semaphore the POSIX message queues use a separate object for the descriptor. This extra object is superfluous, since the object identifier can be used directly for this purpose, just like for the semaphores. Update #2702. Update #2555.