summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-05-05posix: Add mmap/unmap support for mapping files.Chris Johns2-36/+270
This version of mmap comes from early work done on the RTL code base circa 2012. Update #2859.
2017-05-05posix/shm: replace threadq with mutex (allocator lock)Gedare Bloom1-9/+5
Closes #2957.
2017-05-05posix/mman: update atime on shared memory read callGedare Bloom1-0/+1
Update #2859.
2017-04-27posix/src/mutexinit.c: Reorder to make priority a scoped variableJoel Sherrill1-28/+24
2017-04-26posix/src/mutexinit.c: Reorder to make priority a scoped variableJoel Sherrill1-22/+19
2017-04-25posix/src/mutexinit.c: Fix used before initialized warningJoel Sherrill1-0/+3
2017-03-28posix: Fix pthread_detach() internal lock acquireSebastian Huber1-1/+1
2017-01-31score: Add _Thread_queue_Object_nameSebastian Huber1-2/+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.
2017-01-25posix: Fix use of uninitialized variableSebastian Huber1-0/+2
Update #2859.
2017-01-13posix: shared memory supportGedare Bloom5-6/+523
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.
2017-01-13posix: fix typo in mmap argumentsGedare Bloom1-2/+2
2017-01-13posix: add stub implementations for mman functionsGedare Bloom8-0/+214
2017-01-13posix: move sys/mman.h to newlib and test it in psxhdrsGedare Bloom1-1/+1
2017-01-13configure: Remove SIZEOF_PTHREAD_SPINLOCK_TSebastian Huber4-45/+2
2017-01-13posix: Add pthread_getname_np(), ...Sebastian Huber2-0/+82
Add pthread_getname_np() and pthread_setname_np(). Update #2858.
2017-01-12score: Replace STATES_DELAYINGSebastian Huber1-1/+1
Replace STATES_DELAYING with STATES_WAITING_FOR_TIME. There is no need for separate timeout thread states. The Thread_Control::Timer::header and Watchdog_Control::cpu members can be used to figure out the kind of timeout.
2017-01-11Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill3-26/+20
2017-01-11Add support for posix_devctl()Joel Sherrill1-0/+2
2017-01-11posix: Fix alarm() in SMP configurationsSebastian Huber1-2/+0
Avoid to change the CPU of the watchdog right in the middle of the critical section. This would corrupt the watchdog lock states.
2017-01-11score: Add STATES_THREAD_QUEUE_WITH_IDENTIFIERSebastian Huber1-1/+2
Add thread state bit to identify thread queues that are embedded in an object with identifier.
2016-12-12score: Introduce _Internal_error()Sebastian Huber1-8/+2
2016-12-12Add INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILEDSebastian Huber1-2/+6
Update #2825.
2016-12-09score: Remove fatal is internal indicatorSebastian Huber1-1/+0
The fatal is internal indicator is redundant since the fatal source and error code uniquely identify a fatal error. Keep the fatal user extension is internal parameter for backward compatibility and set it to false always. Update #2825.
2016-12-02score: Initialize thread queue context earlySebastian Huber5-5/+11
Initialize thread queue context early preferably outside the critical section. Remove implicit _Thread_queue_Context_initialize() from _Thread_Wait_acquire().
2016-12-02posix: Fix fall back spinlock implementationSebastian Huber1-3/+3
Update #2674.
2016-11-28score: Fix thread queue context initializationSebastian Huber3-3/+3
Initialize the thread queue context with invalid data in debug configurations to catch missing set up steps.
2016-11-24score: Optimize _Thread_queue_Enqueue()Sebastian Huber3-3/+12
Move thread state for _Thread_queue_Enqueue() to the thread queue context. This reduces the parameter count of _Thread_queue_Enqueue() from five to four (ARM for example has only four function parameter registers). Since the thread state is used after several function calls inside _Thread_queue_Enqueue() this parameter was saved on the stack previously.
2016-11-23posix: Fix typoSebastian Huber1-1/+1
Update #2674.
2016-11-23posix: Add self-contained pthread spinlockSebastian Huber6-185/+122
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.
2016-11-23score: Rename _Thread_queue_Enqueue_critical()Sebastian Huber3-3/+3
Delete unused _Thread_queue_Enqueue() and rename _Thread_queue_Enqueue_critical() to _Thread_queue_Enqueue().
2016-11-23score: Add thread queue enqueue calloutSebastian Huber4-45/+65
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.
2016-11-18score: Add and use _Thread_Dispatch_direct()Sebastian Huber2-2/+2
This function is useful for operations which synchronously block, e.g. self restart, self deletion, yield, sleep. It helps to detect if these operations are called in the wrong context. Since the thread dispatch necessary indicator is not used, this is more robust in some SMP situations. Update #2751.
2016-11-18posix: Simplify cleanup push/popSebastian Huber1-10/+10
The POSIX cleanup list must be proteced from asynchronous thread deletion. Here local interrupt disable is sufficient.
2016-11-04posix: Fix _POSIX_RWLock_Manager_initialization()Sebastian Huber1-1/+1
Use right object class.
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber7-7/+7
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-10-31posix: Fix timer intervalSebastian Huber1-2/+0
Do not overwrite timer interval with initial interval in _POSIX_Timer_Insert(). Close #2798.
2016-10-31posix: Fix timeout handling in sigtimedwait()Sebastian Huber1-4/+7
Update #2798.
2016-09-27score: Unify CORE mutex seize/surrenderSebastian Huber2-2/+4
Use the Thread_Control::resource_count for the no protocol mutexes. Merge the no protocol and priority inherit CORE mutex seize/surrender operations.
2016-09-21score: Rework thread priority managementSebastian Huber7-210/+177
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.
2016-09-08score: Introduce _Thread_Get_priority()Sebastian Huber4-11/+11
Avoid direct access to thread internal data fields.
2016-09-08score: Move thread wait node to scheduler nodeSebastian Huber1-1/+4
Update #2556.
2016-09-08score: Introduce Thread_queue_Lock_contextSebastian Huber6-12/+20
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.
2016-08-10posix: nanosleep: adjust elapsed time calculationGedare Bloom1-39/+39
Use clock_gettime before and after sleep to calculate the time spent asleep, and the amount of time remaining. updates #2732
2016-08-08score: Add debug support to red-black treesSebastian Huber1-0/+2
This helps to detect double insert and extract errors.
2016-08-08posix: Fix for RTEMS_DEBUGSebastian Huber1-0/+1
2016-08-03posix: Fix for RTEMS_DEBUGSebastian Huber1-2/+8
2016-07-29posix: nanosleep: optimize away a time conversionGedare Bloom1-2/+1
updates #2732
2016-07-27score: Turn thread lock into thread wait lockSebastian Huber1-4/+4
The _Thread_Lock_acquire() function had a potentially infinite run-time due to the lack of fairness at atomic operations level. Update #2412. Update #2556. Update #2765.
2016-07-27posix: Fix error statusSebastian Huber1-2/+3
2016-07-26cpukit: refactor nanosleep and use 64-bit timeout for threadqGedare Bloom1-57/+67
* Fixes a bug with elapsed time calculations misusing absolute time arguments in nanosleep_helper by passing the requested relative interval. * Fixes a bug with truncation of absolute timeouts by passing the full 64-bit value to Thread_queue_Enqueue. * Share yield logic between nanosleep and clock_nanosleep. updates #2732