summaryrefslogtreecommitdiffstats
path: root/cpukit/posix (follow)
Commit message (Collapse)AuthorAgeFilesLines
* posix: Fix aio_cancel()Sebastian Huber2017-10-041-1/+1
| | | | Close #3164.
* posix: Fix pthread_spin_unlock() error statusSebastian Huber2016-05-251-2/+1
| | | | Update #2719.
* 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. Update #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. Update #2713.
* various .h files: Add missing C++ extern wrappersMartin Galvan2015-09-031-1/+4
| | | | Updates #2405.
* score: Freechain handler API changesSebastian Huber2015-07-012-44/+15
| | | | | Replace the extend function with an allocator since this fits better to the current use case.
* score: Simplify <rtems/system.h>Sebastian Huber2015-06-261-2/+1
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* score: Simplify <rtems/score/thread.h>Sebastian Huber2015-06-251-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.
* score: Add _Watchdog_Preinitialize()Sebastian Huber2015-06-132-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.
* score: Delete unused state WATCHDOG_REMOVE_ITSebastian Huber2015-06-132-2/+2
|
* score: Add Thread_Control::is_fpSebastian Huber2015-06-091-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.
* posix: Fix _POSIX_Timer_Insert_helper() lockingSebastian Huber2015-06-031-5/+9
| | | | Close #2358.
* posix: Fix clock_gettime()Sebastian Huber2015-05-291-2/+0
| | | | | The _TOD_Get_zero_based_uptime_as_timespec() returns already the right value.
* timecounter: Use in RTEMSAlexander Krutwig2015-05-205-8/+10
| | | | | | | | Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
* score: Replace _Thread_Delay_ended()Sebastian Huber2015-05-192-28/+18
| | | | | | | Use _Thread_Timeout() instead. Use pseudo thread queue for nanosleep() to deal with signals. Close #2130.
* score: Rework _Thread_Change_priority()Sebastian Huber2015-05-192-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.
* score: Fine grained locking for mutexesSebastian Huber2015-05-193-13/+16
| | | | Update #2273.
* score: Delete _CORE_semaphore_Seize()Sebastian Huber2015-05-191-3/+8
| | | | Rename _CORE_semaphore_Seize_isr_disable() to _CORE_semaphore_Seize().
* score: Fine grained locking for semaphoresSebastian Huber2015-05-192-4/+23
| | | | Update #2273.
* score: Fine grained locking for message queuesSebastian Huber2015-05-193-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.
* score: Delete Thread_queue_Control::timeout_statusSebastian Huber2015-05-196-11/+8
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: More thread queue operationsSebastian Huber2015-05-191-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.
* score: Add Thread_queue_Control::LockSebastian Huber2015-05-1911-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.
* score: Add header to _Watchdog_Remove()Sebastian Huber2015-05-198-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.
* score: Delete STATES_WAITING_ON_THREAD_QUEUESebastian Huber2015-05-191-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.
* posix: Use right thread dispatch disable functionSebastian Huber2015-04-241-1/+1
|
* score: Fix POSIX thread joinSebastian Huber2015-04-231-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.
* score: Delete Thread_queue_Control::stateSebastian Huber2015-04-236-6/+16
| | | | | Use a parameter for _Thread_queue_Enqueue() instead to reduce memory usage.
* score: Delete bogus THREAD_QUEUE_WAIT_FOREVERSebastian Huber2015-04-227-7/+7
| | | | | It makes no sense to use this indirection since the type for timeout values is Watchdog_Interval.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-211-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.
* score: _Objects_Get_isr_disable()Sebastian Huber2015-04-213-6/+10
| | | | | | | Use ISR_lock_Context instead of ISR_Level to allow use of ISR locks for low-level locking. Update #2273.
* semdestroy.c: Add missing _Objects_Allocator_unlock()Joel Sherrill2015-04-141-8/+7
| | | | closes 2319.
* semunlink.c: Add missing _Objects_Allocator_unlock()Daniel Krueger2015-04-141-0/+1
| | | | | | updates 2319. Signed-off-by: Daniel Krueger <daniel.krueger@systec-electronic.com>
* score: Rename _Watchdog_Reset()Sebastian Huber2015-04-141-1/+1
| | | | Update #2307.
* posix/src/nanosleep.c: Address issue when delay is longer than desiredJoel Sherrill2015-03-121-16/+27
| | | | | | | This resulted in the elapsed time going below 0 and an arbitrarily large number returned as the time remaining. closes #2296.
* posix: Return error code if mmap is usedDaniel Cederman2015-03-121-1/+1
|
* posix: Move function to file with matching nameDaniel Cederman2015-03-122-10/+10
| | | | mmap was previously in munmap.c and munmap was in mmap.c.
* posix: Install <semaphore.h> only if not providedSebastian Huber2015-03-102-1/+4
|
* posix: Change sem_t to the 32-bit object typeSebastian Huber2015-03-102-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.
* posix: Use a value of 0 for SEM_FAILEDSebastian Huber2015-03-101-1/+1
| | | | This is the standard NULL pointer.
* score: Add rtems_set_errno_and_return_value()Sebastian Huber2015-03-102-8/+10
| | | | Remove rtems_set_errno_and_return_minus_one_cast().
* sysconf: Add _SC_NPROCESSORS_(CONF|ONLN)Sebastian Huber2015-03-091-0/+4
|
* sysconf: SimplifySebastian Huber2015-03-091-22/+17
|
* score: Simplify and fix signal deliverySebastian Huber2015-03-051-8/+14
| | | | | | | Deliver the POSIX signals after the thread state was updated to avoid race-conditions on SMP configurations. Update #2273.
* posix: fix error return code for pthread_mutex_trylockGedare Bloom2015-02-251-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.
* posix: Delete unused _POSIX_Threads_Get()Sebastian Huber2014-12-181-34/+0
| | | | Close #1759.
* posix: Delete key/value if value is set to NULLSebastian Huber2014-12-123-38/+87
|
* posix: Simplify _POSIX_Keys_Find()Sebastian Huber2014-12-124-12/+10
|
* cpukit/posix/src/timertsr.c: Add _Assert()Josh Oguin2014-11-261-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.
* sys/mman.h: New file. Clean up and add supporting stubsJoel Sherrill2014-11-205-8/+249
| | | | | | * Makefile.am updated and preinstall.am regenerated. * mprotect.c had a prototype removed now that we have mman.h * mmap.c, munmap.c: New stub files.