summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include (follow)
Commit message (Collapse)AuthorAgeFilesLines
* posix: Add mmap/unmap support for mapping files.Chris Johns2017-05-051-0/+44
| | | | | | | This version of mmap comes from early work done on the RTL code base circa 2012. Update #2859.
* posix/shm: replace threadq with mutex (allocator lock)Gedare Bloom2017-05-051-19/+0
| | | | Closes #2957.
* posix/mman: update atime on shared memory read callGedare Bloom2017-05-051-0/+9
| | | | Update #2859.
* score: Add _Thread_queue_Object_nameSebastian Huber2017-01-311-1/+1
| | | | | | | | | | | | | Add the special thread queue name _Thread_queue_Object_name to mark thread queues embedded in an object with identifier. Using the special thread state STATES_THREAD_QUEUE_WITH_IDENTIFIER is not reliable for this purpose since the thread wait information and thread state are protected by different SMP locks in separate critical sections. Remove STATES_THREAD_QUEUE_WITH_IDENTIFIER. Add and use _Thread_queue_Object_initialize(). Update #2858.
* posix: shared memory supportGedare Bloom2017-01-133-0/+302
| | | | | | | | | Add POSIX shared memory manager (Shm). Includes a hook-based approach for the backing memory storage that defaults to the Workspace, and a test is provided using the heap. A test is also provided for the basic use of mmap'ing a shared memory object. This test currently fails at the mmap stage due to no support for mmap.
* posix: move sys/mman.h to newlib and test it in psxhdrsGedare Bloom2017-01-131-189/+0
|
* configure: Remove SIZEOF_PTHREAD_SPINLOCK_TSebastian Huber2017-01-131-19/+0
|
* configure: Remove HAVE_SEMAPHORE_H supportSebastian Huber2017-01-131-158/+0
|
* Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill2017-01-111-1/+1
|
* posix: Fix typoSebastian Huber2016-12-021-1/+1
|
* posix: Fix fall back spinlock implementationSebastian Huber2016-12-021-7/+4
| | | | Update #2674.
* score: Fix thread queue context initializationSebastian Huber2016-11-281-1/+2
| | | | | Initialize the thread queue context with invalid data in debug configurations to catch missing set up steps.
* posix: Add self-contained pthread spinlockSebastian Huber2016-11-233-112/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Turn pthread_spinlock_t into a self-contained object. On uni-processor configurations, interrupts are disabled in the lock/trylock operations and the previous interrupt status is restored in the corresponding unlock operations. On SMP configurations, a ticket lock is a acquired and released in addition. The self-contained pthread_spinlock_t object is defined by Newlib in <sys/_pthreadtypes.h>. typedef struct { struct _Ticket_lock_Control _lock; __uint32_t _interrupt_state; } pthread_spinlock_t; This implementation is simple and efficient. However, this test case of the Linux Test Project would fail due to call of printf() and sleep() during spin lock ownership: https://github.com/linux-test-project/ltp/blob/master/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_lock/1-2.c There is only limited support for profiling on SMP configurations. Delete CORE spinlock implementation. Update #2674.
* score: Add thread queue enqueue calloutSebastian Huber2016-11-231-0/+4
| | | | | | | Replace the expected thread dispatch disable level with a thread queue enqueue callout. This enables the use of _Thread_Dispatch_direct() in the thread queue enqueue procedure. This avoids impossible exection paths, e.g. Per_CPU_Control::dispatch_necessary is always true.
* score: Rework thread priority managementSebastian Huber2016-09-212-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* score: Introduce Thread_queue_Lock_contextSebastian Huber2016-09-084-7/+13
| | | | | | 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: cond_timedwait remember and use clock from condattrGedare Bloom2016-07-252-1/+4
| | | | updates #2745
* posix: refactor cond wait support to defer abstime conversionGedare Bloom2016-07-251-2/+1
| | | | updates #2745
* score: Change Priority_Control to 64-bitSebastian Huber2016-06-241-1/+8
| | | | | | | | 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.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-221-5/+2
| | | | | | | | | | | 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-221-6/+10
| | | | Move POSIX API priority validation into _POSIX_Priority_To_core().
* posix: Make POSIX API aware of scheduler instancesSebastian Huber2016-06-221-57/+28
|
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-222-22/+21
| | | | | | | | | | | | | | 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-221-2/+2
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::schedpolicySebastian Huber2016-06-221-2/+0
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::ss_high_prioritySebastian Huber2016-06-221-5/+0
| | | | This field was unused.
* posix: _POSIX_Mutex_Default_attributesSebastian Huber2016-06-222-1/+11
| | | | | | Make _POSIX_Mutex_Default_attributes constant and independent of the scheduler instance. Use INT_MAX to indicate the default ceiling priority.
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-151-0/+4
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-151-1/+14
|
* posix: Remove superfluous codeSebastian Huber2016-06-151-61/+0
| | | | Remove double declarations, useless comments and unused functions.
* score: Add CORE mutex variantsSebastian Huber2016-05-302-6/+62
| | | | | | | | 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
|
* score: Add semaphore variantsSebastian Huber2016-05-301-0/+2
|
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-301-5/+19
| | | | | | | | | | | 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-267-128/+25
| | | | | | | | | | | 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.
* score: Move thread queue MP callout to contextSebastian Huber2016-05-257-25/+36
| | | | | | | | 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.
* Replace *_Get_interrupt_disable() with *_Get()Sebastian Huber2016-05-201-1/+1
| | | | | 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: Add and use _POSIX_Get_object_body()Sebastian Huber2016-05-201-0/+32
|
* 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: Rework thread cancellationSebastian Huber2016-05-202-70/+0
| | | | | | | | Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX thread cancellation to use the thread life states. Update #2555. Update #2626.
* posix: Rework pthread_join()Sebastian Huber2016-05-202-18/+0
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
* posix: Avoid Giant lock for some pthread functionsSebastian Huber2016-05-122-19/+0
| | | | | | | | Avoid Giant lock for pthread_getattr_np(), pthread_setschedparam() and pthread_getschedparam(). Replace POSIX threads scheduler lock with thread state lock. Update #2555.
* posix: Make _POSIX_signals_Action_handler() staticSebastian Huber2016-05-121-7/+0
|
* score: Optimize _Objects_Get_local()Sebastian Huber2016-05-025-22/+9
| | | | | Make the interrupt lock context the second parameter to avoid register moves.
* posix: Simplify message queuesSebastian Huber2016-05-023-90/+17
| | | | | | | | | | | | 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.