summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-09-03various .h files: Add missing C++ extern wrappersMartin Galvan1-1/+4
Updates #2405.
2015-09-02posix: glibc compatibilitySebastian Huber2-8/+6
2015-08-31posix: Avoid _RBTree_Next()Sebastian Huber1-3/+3
2015-07-28score: Rename _POSIX_Absolute_timeout_to_ticks()Sebastian Huber95-308/+55
Rename _POSIX_Absolute_timeout_to_ticks() to _TOD_Absolute_timeout_to_ticks() and move it to the score directory. Delete empty <rtems/posix/time.h>.
2015-07-23score: Introduce Thread_queue_HeadsSebastian Huber3-29/+30
Move the storage for the thread queue heads to the threads. Each thread provides a set of thread queue heads allocated from a dedicated memory pool. In case a thread blocks on a queue, then it lends its heads to the queue. In case the thread unblocks, then it takes a free set of threads from the queue. Since a thread can block on at most one queue this works. This mechanism is used in FreeBSD. The motivation for this change is to reduce the memory demands of the synchronization objects. On a 32-bit uni-processor configuration the Thread_queue_Control size is now 8 bytes, compared to 64 bytes in RTEMS 4.10 (other changes reduced the size as well).
2015-07-23score: Introduce Thread_queue_QueueSebastian Huber2-2/+3
Separate the thread queue heads and lock from the operations. This enables the support for light weight objects which only support one queuing discipline.
2015-07-01score: Freechain handler API changesSebastian Huber2-44/+15
Replace the extend function with an allocator since this fits better to the current use case.
2015-06-26score: Simplify <rtems/system.h>Sebastian Huber1-2/+1
Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
2015-06-25score: Simplify <rtems/score/thread.h>Sebastian Huber1-0/+1
Avoid Thread_Control typedef in <rtems/score/percpu.h>. This helps to get rid of the <rtems/score/percpu.h> include in <rtems/score/thread.h> which exposes a lot of implementation details.
2015-06-13score: Add _Watchdog_Preinitialize()Sebastian Huber2-1/+2
Add an assert to ensure that the watchdog is the proper state for a _Watchdog_Initialize(). This helps to detect invalid initializations which may lead to a corrupt watchdog chain.
2015-06-13score: Delete unused state WATCHDOG_REMOVE_ITSebastian Huber2-2/+2
2015-06-09score: Add Thread_Control::is_fpSebastian Huber1-5/+1
Store the floating-point unit property in the thread control block regardless of the CPU_HARDWARE_FP and CPU_SOFTWARE_FP settings. Make sure the floating-point unit is only enabled for the corresponding multilibs. This helps targets which have a volatile only floating point context like SPARC for example.
2015-06-03posix: Fix _POSIX_Timer_Insert_helper() lockingSebastian Huber1-5/+9
Close #2358.
2015-05-29posix: Fix clock_gettime()Sebastian Huber1-2/+0
The _TOD_Get_zero_based_uptime_as_timespec() returns already the right value.
2015-05-20timecounter: Use in RTEMSAlexander Krutwig5-8/+10
Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
2015-05-19score: Replace _Thread_Delay_ended()Sebastian Huber2-28/+18
Use _Thread_Timeout() instead. Use pseudo thread queue for nanosleep() to deal with signals. Close #2130.
2015-05-19score: Rework _Thread_Change_priority()Sebastian Huber2-53/+56
Move the writes to Thread_Control::current_priority and Thread_Control::real_priority into _Thread_Change_priority() under the protection of the thread lock. Add a filter function to _Thread_Change_priority() to enable specialized variants. Avoid race conditions during a thread priority restore with the new Thread_Control::priority_restore_hint for an important average case optimizations used by priority inheritance mutexes. Update #2273.
2015-05-19score: Fine grained locking for mutexesSebastian Huber3-13/+16
Update #2273.
2015-05-19score: Delete _CORE_semaphore_Seize()Sebastian Huber1-3/+8
Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
2015-05-19score: Fine grained locking for semaphoresSebastian Huber2-4/+23
Update #2273.
2015-05-19score: Fine grained locking for message queuesSebastian Huber3-10/+34
Aggregate several critical sections into a bigger one. Sending and receiving messages is now protected by an ISR lock. Thread dispatching is only disabled in case a blocking operation is necessary. The message copy procedure is done inside the critical section (interrupts disabled). Thus this change may have a negative impact on the interrupt latency in case very large messages are transferred. Update #2273.
2015-05-19score: Delete Thread_queue_Control::timeout_statusSebastian Huber6-11/+8
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
2015-05-19score: More thread queue operationsSebastian Huber1-1/+1
Move thread queue discipline specific operations into Thread_queue_Operations. Use a separate node in the thread control block for the thread queue to make it independent of the scheduler data structures. Update #2273.
2015-05-19score: Add Thread_queue_Control::LockSebastian Huber11-15/+14
Move the complete thread queue enqueue procedure into _Thread_queue_Enqueue_critical(). It is possible to use the thread queue lock to protect state of the object embedding the thread queue. This enables per object fine grained locking in the future. Delete _Thread_queue_Enter_critical_section(). Update #2273.
2015-05-19score: Add header to _Watchdog_Remove()Sebastian Huber8-9/+9
Add watchdog header parameter to _Watchdog_Remove() to be in line with the other operations. Add _Watchdog_Remove_ticks() and _Watchdog_Remove_seconds() for convenience. Update #2307.
2015-05-19score: Delete STATES_WAITING_ON_THREAD_QUEUESebastian Huber1-3/+3
Avoid the usage of the current thread state in _Thread_queue_Extract_with_return_code() since thread queues should not know anything about thread states.
2015-04-24posix: Use right thread dispatch disable functionSebastian Huber1-1/+1
2015-04-23score: Fix POSIX thread joinSebastian Huber1-1/+1
A thread join is twofold. There is one thread that exists and an arbitrary number of threads that wait for the thread exit (one-to-many relation). The exiting thread may want to wait for a thread that wants to join its exit (STATES_WAITING_FOR_JOIN_AT_EXIT in _POSIX_Thread_Exit()). On the other side we need a thread queue for all the threads that wait for the exit of one particular thread (STATES_WAITING_FOR_JOIN in pthread_join()). Update #2035.
2015-04-23score: Delete Thread_queue_Control::stateSebastian Huber6-6/+16
Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
2015-04-22score: Delete bogus THREAD_QUEUE_WAIT_FOREVERSebastian Huber7-7/+7
It makes no sense to use this indirection since the type for timeout values is Watchdog_Interval.
2015-04-21score: _Objects_Get_isr_disable()Sebastian Huber1-0/+6
Do not disable thread dispatching and do not acquire the Giant lock. This makes it possible to use this object get variant for fine grained locking. Update #2273.
2015-04-21score: _Objects_Get_isr_disable()Sebastian Huber3-6/+10
Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for low-level locking. Update #2273.
2015-04-14semdestroy.c: Add missing _Objects_Allocator_unlock()Joel Sherrill1-8/+7
closes 2319.
2015-04-14semunlink.c: Add missing _Objects_Allocator_unlock()Daniel Krueger1-0/+1
updates 2319. Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
2015-04-14score: Rename _Watchdog_Reset()Sebastian Huber1-1/+1
Update #2307.
2015-03-12posix/src/nanosleep.c: Address issue when delay is longer than desiredJoel Sherrill1-16/+27
This resulted in the elapsed time going below 0 and an arbitrarily large number returned as the time remaining. closes #2296.
2015-03-12posix: Return error code if mmap is usedDaniel Cederman1-1/+1
2015-03-12posix: Move function to file with matching nameDaniel Cederman2-10/+10
mmap was previously in munmap.c and munmap was in mmap.c.
2015-03-10posix: Install <semaphore.h> only if not providedSebastian Huber2-1/+4
2015-03-10posix: Change sem_t to the 32-bit object typeSebastian Huber2-2/+2
This change is also valid for 16-bit object type architectures since in this case POSIX_Semaphore_Control::Semaphore_id is used as a proxy.
2015-03-10posix: Use a value of 0 for SEM_FAILEDSebastian Huber1-1/+1
This is the standard NULL pointer.
2015-03-10score: Add rtems_set_errno_and_return_value()Sebastian Huber2-8/+10
Remove rtems_set_errno_and_return_minus_one_cast().
2015-03-09sysconf: Add _SC_NPROCESSORS_(CONF|ONLN)Sebastian Huber1-0/+4
2015-03-09sysconf: SimplifySebastian Huber1-22/+17
2015-03-05score: Simplify and fix signal deliverySebastian Huber1-8/+14
Deliver the POSIX signals after the thread state was updated to avoid race-conditions on SMP configurations. Update #2273.
2015-02-25posix: fix error return code for pthread_mutex_trylockGedare Bloom1-1/+4
pthread_mutex_trylock() should return EBUSY if the mutex is already locked. The translations of CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED is EDEADLK which is correct for pthread_mutex_lock(). This fixes the translation for trylock. Closes #2170.
2014-12-18posix: Delete unused _POSIX_Threads_Get()Sebastian Huber1-34/+0
Close #1759.
2014-12-12posix: Delete key/value if value is set to NULLSebastian Huber3-38/+87
2014-12-12posix: Simplify _POSIX_Keys_Find()Sebastian Huber4-12/+10
2014-11-26cpukit/posix/src/timertsr.c: Add _Assert()Josh Oguin1-1/+8
CodeSonar flagged this as an empty if body. Upon analysis, it turned out to be an error that we think should never occur but if it did, there is nothing we could do about it. It would likely just indicate the thread was deleted before we got here. Adding the _Assert() at least will flag this if it ever occurs during a debug build and we can discuss what happened.