summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (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-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.
* 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-2543-202/+196
| | | | | | | | 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-2017-18/+18
| | | | | Uniformly use *_Get() to get an object by identifier with a lock context.
* score: Rename _Objects_Get_local()Sebastian Huber2016-05-206-7/+7
| | | | | | Rename _Objects_Get_local() into _Objects_Get(). Confusions with the previous _Objects_Get() function are avoided since the Objects_Locations parameter is gone.
* posix: Add const to _POSIX_Keys_Key_value_find()Sebastian Huber2016-05-201-2/+2
|
* posix: Remove dead code and shrink commentSebastian Huber2016-05-201-35/+3
|
* posix: Add and use _POSIX_Get_object_body()Sebastian Huber2016-05-204-111/+53
|
* score: Add per scheduler instance maximum prioritySebastian Huber2016-05-201-1/+1
| | | | | | | | | | | The priority values are only valid within a scheduler instance. Thus, the maximum priority value must be defined per scheduler instance. The first scheduler instance defines PRIORITY_MAXIMUM. This implies that RTEMS_MAXIMUM_PRIORITY and POSIX_SCHEDULER_MAXIMUM_PRIORITY are only valid for threads of the first scheduler instance. Further API/implementation changes are necessary to fix this. Update #2556.
* posix: Avoid Giant lock for pthread_kill()Sebastian Huber2016-05-201-33/+22
| | | | Update #2555.
* posix: Rework thread cancellationSebastian Huber2016-05-2013-266/+81
| | | | | | | | 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-208-180/+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-126-132/+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-123-142/+126
|
* posix: Avoid Giant lock in pthread_equal()Sebastian Huber2016-05-061-51/+9
| | | | Update #2555.
* score: Optimize _Objects_Get_local()Sebastian Huber2016-05-027-26/+13
| | | | | Make the interrupt lock context the second parameter to avoid register moves.