summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove make preinstallChris Johns2018-01-2528-3388/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* score: Use self-contained API mutexSebastian Huber2017-12-041-1/+1
| | | | | | | | | | Use a self-contained recursive mutex for API_Mutex_Control. The API mutexes are protected against asynchronous thread cancellation. Add dedicated mutexes for libatomic and TOD. Close #2629. Close #2630.
* posix: _POSIX_Threads_Get_sched_param_sporadic()Sebastian Huber2017-11-211-1/+3
| | | | | | Remove api parameter to simplify the calling functions. Update #2514.
* posix: Change created_with_explicit_schedulerSebastian Huber2017-11-091-3/+0
| | | | | | | | Remove POSIX_API_Control::created_with_explicit_scheduler. Add Thread_Control::was_created_with_inherited_scheduler. This fixes also pthread_getattr_np() for Classic tasks. Update #2514.
* posix: Remove POSIX_API_Control::schedpolicySebastian Huber2017-11-092-3/+4
| | | | | | | Use the thread CPU budget algorithm to determine the scheduler policy. This fixes also pthread_getschedparam() for Classic tasks. Update #2514.
* score: Move thread queue timeout handlingSebastian Huber2017-10-242-30/+27
| | | | | Update #3117. Update #3182.
* posix: Fix POSIX disabled buildSebastian Huber2017-10-181-0/+4
| | | | Update #2514.
* posix: Remove POSIX_API_Control::schedparamSebastian Huber2017-10-173-5/+37
| | | | | | | | Move sporadic server scheduler parameters to POSIX_API_Control::Sporadic. Remove redundant scheduler priority parameter. Update #2514.
* posix: Move POSIX_API_Control::threadSebastian Huber2017-10-171-3/+3
| | | | | | This member is only used by the sporadic server support. Update #2514.
* score: Rename _Watchdog_Per_CPU_insert_monotonic()Sebastian Huber2017-10-171-1/+1
| | | | | | | | Rename _Watchdog_Per_CPU_insert_monotonic() in _Watchdog_Per_CPU_insert_ticks(). Update #3117. Update #3182.
* score: Rename watchdog variantsSebastian Huber2017-10-171-1/+1
| | | | | | | | | | | Rename PER_CPU_WATCHDOG_RELATIVE in PER_CPU_WATCHDOG_MONOTONIC to highlight the corresponding POSIX CLOCK_MONOTONIC. Rename PER_CPU_WATCHDOG_ABSOLUTE in PER_CPU_WATCHDOG_REALTIME to highlight the corresponding POSIX CLOCK_REALTIME. Update #3117. Update #3182.
* score: Add _Thread_queue_Dispatch_disable()Sebastian Huber2017-10-101-6/+2
|
* posix: Unconditional thread attribute supportSebastian Huber2017-10-102-29/+71
| | | | Update #2514.
* posix: Constify default thread processor affinitySebastian Huber2017-10-101-1/+1
| | | | | | | | Set default thread processor affinity to all processors of the pre-allocated set. This allows to constify the _POSIX_Threads_Default_attributes. Update #2514.
* posix: Remove rtems_pthread_attribute_compare()Sebastian Huber2017-10-091-8/+0
| | | | | Update #2514. Close #3174.
* posix: Simplify POSIX_API_ControlSebastian Huber2017-10-092-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | Return stack area via pthread_getattr_np(). Simplify * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() and let the scheduler do the more sophisticated error checks. Make * pthread_setaffinity_np(), * pthread_getaffinity_np(), * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() available in all configurations. Update #2514. Close #3145. Close #3168.
* posix: Implement self-contained POSIX mutexSebastian Huber2017-10-053-132/+403
| | | | | | | | POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112.
* posix: Implement self-contained POSIX condvarSebastian Huber2017-10-053-111/+84
| | | | | | | | POSIX condition variables are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3113.
* posix: Implement self-contained POSIX rwlocksSebastian Huber2017-10-053-102/+21
| | | | | | | | POSIX rwlocks are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3115.
* posix: Implement self-contained POSIX barriersSebastian Huber2017-10-053-106/+51
| | | | | | | | POSIX barriers are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3114.
* posix: Implement self-contained POSIX semaphoresSebastian Huber2017-10-052-52/+48
| | | | | | | | | | | | | | For semaphore object pointer and object validation see POSIX_SEMAPHORE_VALIDATE_OBJECT(). Destruction or close of a busy semaphore returns an error status. The object is not flushed. POSIX semaphores are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3116.
* posix shm: Add oflag to Shm_ControlJoel Sherrill2017-09-221-0/+1
|
* posix: Allow PTHREAD_PROCESS_SHARED for mutexesSebastian Huber2017-09-151-0/+15
| | | | Close #3125.
* libio: Remove special-case reference countSebastian Huber2017-09-141-6/+6
| | | | | | The top-level IO library structures should contain no special-case data. Update #2859.
* posix: Ignore pshared for semaphoresSebastian Huber2017-09-122-2/+0
| | | | | | Since we have only one process, sharing between processes is trivial. Close #3124.
* posix: Use mutex object itself for condvarSebastian Huber2017-09-122-2/+2
| | | | | | | | | | We should only use the address used to initialize the mutex object according to POSIX, "2.9.9 Synchronization Object Copies and Alternative Mappings". http://pubs.opengroup.org/onlinepubs/9699919799/functions/V2_chap02.html#tag_15_09_09 Update #3113.
* posix: replace mmap mappings lock with libio lockGedare Bloom2017-07-241-2/+9
| | | | | | Use the libio mutex lock instead of the mmap mappings lock. Updates #2859.
* posix/mman: add mmap support for shm objectsGedare Bloom2017-05-053-1/+66
| | | | Update #2859.
* 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.
* configure: Remove SIZEOF_PTHREAD_SPINLOCK_TSebastian Huber2017-01-131-19/+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
|