summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* rbheap: Fix rtems_rbheap_free()Sebastian Huber2015-09-111-23/+15
| | | | | | | Remove unused descriptor of merged free chunks from the free chain and add them to the spare descriptors. Update #2417.
* score: Simplify <rtems/system.h>Sebastian Huber2015-06-261-0/+1
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* timecounter: Use in RTEMSAlexander Krutwig2015-05-201-0/+1
| | | | | | | | Replace timestamp implementation with FreeBSD bintime and timecounters. New test sptests/sptimecounter02. Update #2271.
* timecounter: Port to RTEMSAlexander Krutwig2015-05-201-0/+52
| | | | | | New test sptests/timecounter01. Update #2271.
* sapi: Avoid declaration in source, fix typeSebastian Huber2015-04-172-5/+3
|
* DRVMGR: added driver manager to cpukit/libdrvmgrDaniel Hellstrom2015-04-171-0/+63
|
* IO_MANAGER: early dynamic driver registrationDaniel Hellstrom2015-04-172-1/+17
| | | | | | Adds the possibility to register drivers before the IO Manager has completed the initialization. Sometimes the BSP may want to register a driver dynamically early in the boot process.
* score: Simplify debug code and use _Assert()Sebastian Huber2015-03-221-1/+1
|
* Move test support from sapi to libmisc/testsupportSebastian Huber2015-03-052-115/+0
|
* sapi/src/testextension.c: Fix warningsJoel Sherrill2014-11-041-0/+2
|
* sapi: Use an interrupt lock for test extensionSebastian Huber2014-10-241-23/+20
| | | | | Ensure to report only once on SMP machines and ensure that the report is output completely.
* sapi: Report only if not an SMP shutdown responseSebastian Huber2014-10-231-3/+23
|
* sapi: Add profiling report begin/end messageSebastian Huber2014-09-021-3/+7
|
* rbtree: Add and use RBTree_Compare_resultSebastian Huber2014-08-051-31/+39
|
* rbtree: Reduce RBTree_Control sizeSebastian Huber2014-07-151-4/+4
| | | | | | | | | | | | Remove compare function and is unique indicator from the control structure. Rename RBTree_Compare_function to RBTree_Compare. Rename rtems_rbtree_compare_function to rtems_rbtree_compare. Provide C++ compatible initializers. Add compare function and is unique indicator to _RBTree_Find(), _RBTree_Insert(), rtems_rbtree_find() and rtems_rbtree_insert(). Remove _RBTree_Is_unique() and rtems_rbtree_is_unique(). Remove compare function and is unique indicator from _RBTree_Initialize_empty() and rtems_rbtree_initialize_empty().
* sapi: Report profiling only if enabled for testsSebastian Huber2014-04-291-0/+2
|
* sapi: Add profiling done messageSebastian Huber2014-04-281-0/+6
|
* sapi: Add arithmetic means to XML profiling reportSebastian Huber2014-04-281-9/+62
|
* rtems: Rename rtems_smp_get_current_processor()Sebastian Huber2014-04-111-1/+1
| | | | | | | Rename rtems_smp_get_current_processor() in rtems_get_current_processor(). Make rtems_get_current_processor() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* rtems: Rename rtems_smp_get_processor_count()Sebastian Huber2014-04-111-1/+1
| | | | | | Rename rtems_smp_get_processor_count() in rtems_get_processor_count(). Make rtems_get_processor_count() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* score: Statically initialize IO managerSebastian Huber2014-04-102-59/+0
| | | | | | | | | | | | This simplifies the RTEMS initialization and helps to avoid a memory overhead. The workspace demands of the IO manager were not included in the <rtems/confdefs.h> workspace size estimate. This is also fixed as a side-effect. Update documentation and move "Specifying Application Defined Device Driver Table" to the section end. This sub-section is not that important for the user. Mentioning this at the beginning may lead to confusion.
* score: PR788: Add INTERNAL_ERROR_RESOURCE_IN_USESebastian Huber2014-04-031-1/+2
| | | | | | | | | | | | | | | Issue a fatal error in case a thread is deleted which still owns resources (e.g. a binary semaphore with priority inheritance or ceiling protocol). The resource count must be checked quite late since RTEMS task variable destructors, POSIX key destructors, POSIX cleanup handler, the Newlib thread termination extension or other thread termination extensions may release resources. In this context it would be quite difficult to return an error status to the caller. An alternative would be to place threads with a non-zero resource count not on the zombie chain. Thus we have a resource leak instead of a fatal error. The terminator thread can see this error if we return an RTEMS_RESOURCE_IN_USE status for the rtems_task_delete() for example.
* score: PR2152: Use allocator mutex for objectsSebastian Huber2014-03-312-5/+9
| | | | | Use allocator mutex for objects allocate/free. This prevents that the thread dispatch latency depends on the workspace/heap fragmentation.
* sapi: Add profiling report for testsSebastian Huber2014-03-251-0/+11
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-2138-38/+38
|
* posix: Use interal mutex for once implementationSebastian Huber2014-03-192-3/+2
| | | | | | Enable pthread_once() for all configurations. The pthread_once() function is one means to initialize POSIX keys. Another use case is the C++ support.
* sapi: Add <rtems/test.h>Sebastian Huber2014-03-172-0/+73
| | | | | | Provide support functions to print the begin/end of test message. Provide a test fatal extension to print out profiling reports in the future.
* score: Add SMP lock profiling supportSebastian Huber2014-03-142-1/+63
|
* score: Add per-CPU profilingSebastian Huber2014-03-141-0/+61
| | | | | | | Add per-CPU profiling stats API. Implement the thread dispatch disable level profiling. The interrupt profiling must be implemented in CPU port specific parts (mostly assembler code). Add a support function _Profiling_Outer_most_interrupt_entry_and_exit() for this purpose.
* sapi: Add SMP lock profiling app. level dataSebastian Huber2014-03-141-0/+78
|
* sapi: Add per-CPU profiling application level dataSebastian Huber2014-03-141-0/+89
|
* sapi: Add profiling application level supportSebastian Huber2014-03-142-0/+122
|
* score: Add local context to SMP lock APISebastian Huber2014-03-111-28/+28
| | | | | | | | | | | Add a local context structure to the SMP lock API for acquire and release pairs. This context can be used to store the ISR level and profiling information. It may be later used to enable more sophisticated lock algorithms, e.g. MCS locks. There is only one lock that cannot be used with a local context. This is the per-CPU lock since here we would have to transfer the local context through a context switch which is very complicated.
* sapi: Use one SMP lock for all chainsSebastian Huber2014-03-111-41/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts commit 1215fd4d9426a59d568560e9a485628560363133. In order to support profiling of SMP locks and provide a future compatible SMP locks API it is necessary to add an SMP lock destroy function. Since the commit above adds an SMP lock to each chain control we would have to add a rtems_chain_destroy() function as well. This complicates the chain usage dramatically. Thus revert the patch above. A global SMP lock for all chains is used to implement the protected chain operations. Advantages: * The SAPI chain API is now identical on SMP and non-SMP configurations. * The size of the chain control is reduced and is then equal to the Score chains. * The protected chain operations work correctly on SMP. Disadvantage: * Applications using many different chains and the protected operations may notice lock contention. The chain control size drop is a huge benefit (SAPI chain controls are 66% larger than the Score chain controls). The only disadvantage is not really a problem since these applications can use specific interrupt locks and unprotected chain operations to avoid this issue.
* POSIX keys now enabled in all configurations.Joel Sherrill2014-03-072-28/+26
| | | | | | | Formerly POSIX keys were only enabled when POSIX threads were enabled. Because they are a truly safe alternative to per-task variables in an SMP system, they are being enabled in all configurations.
* sapi: Moved smp initialization and added cpuset initilization.Jennifer Averett2014-03-071-2/+5
| | | | | | | SMP must be initialized in order to know the current set of cores available. Without this, you cannot initialize the default cpu_set_t associated with Classic API tasks and POSIX threads.
* score: SMP initialization and shutdown changesSebastian Huber2014-03-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename _SMP_Request_other_cores_to_perform_first_context_switch() into _SMP_Request_start_multitasking() since this requests now a multitasking start on all configured and available processors. The name corresponds _Thread_Start_multitasking() and _SMP_Start_multitasking_on_secondary_processor() actions issued in response to this request. Move in source file to right place. Rename PER_CPU_STATE_READY_TO_BEGIN_MULTITASKING into PER_CPU_STATE_READY_TO_START_MULTITASKING. Rename PER_CPU_STATE_BEGIN_MULTITASKING into PER_CPU_STATE_REQUEST_START_MULTITASKING. Rename _SMP_Request_other_cores_to_shutdown() into _SMP_Request_shutdown(). Add a per-CPU state lock to protect all changes. This was necessary to offer a controlled shutdown of the system (atomic read/writes alone are not sufficient for this kind of synchronization). Add documentation for Per_CPU_State. Delete debug output. New tests smptests/smpfatal01 and smptests/smpfatal02.
* score: Rename _Internal_error_Occurred()Sebastian Huber2014-02-214-4/+4
| | | | Rename _Internal_error_Occurred() into _Terminate().
* score: Add and use <rtems/score/smpimpl.h>Sebastian Huber2014-02-191-10/+2
| | | | | Collect SMP implementation specific parts in the <rtems/score/smpimpl.h> header file.
* score: Add RTEMS_FATAL_SOURCE_SMPSebastian Huber2014-02-191-1/+2
| | | | | | Use rtems_fatal() instead of _CPU_Fatal_halt() to shutdown processors in SMP configurations since this allows intervention of BSP or application specific fatal extensions.
* score: Add RTEMS_FATAL_SOURCE_BSPSebastian Huber2014-02-191-2/+1
| | | | | | Merge RTEMS_FATAL_SOURCE_BSP_GENERIC and RTEMS_FATAL_SOURCE_BSP_SPECIFIC into new fatal source RTEMS_FATAL_SOURCE_BSP. This makes it easier to figure out the code position given a fatal source and code.
* score: Delete INTERNAL_ERROR_SHUTDOWN_WHEN_NOT_UPSebastian Huber2014-02-192-17/+2
| | | | | This error case is no longer required since rtems_shutdown_executive() can be called anytime, anywhere
* score: Move _SMP_Request_other_cores_to_shutdown()Sebastian Huber2014-02-191-8/+0
| | | | | | Move _SMP_Request_other_cores_to_shutdown() invocation from rtems_shutdown_executive() to _Internal_error_Occurred() to allow a proper shutdown on SMP configurations even in the error case.
* score: Delete _Thread_BSP_contextSebastian Huber2014-02-192-38/+22
| | | | | | | | | | | | Do not return to BSP context in the exit() shutdown path. This makes it possible to re-use the initialization stack. It can be used for the interrupt stack for example. On targets with a small RAM this is a considerable benefit. This change eliminates also some special cases and simplifies the code. Delete _Thread_Set_global_exit_status(), _Thread_Get_global_exit_status() and _Thread_Stop_multitasking().
* score: Add SYSTEM_STATE_TERMINATEDSebastian Huber2014-02-191-1/+0
| | | | | | Merge systems states SYSTEM_STATE_SHUTDOWN and SYSTEM_STATE_FAILED into new system state SYSTEM_STATE_TERMINATED. This reflects that all system termination paths end up in _Internal_error_Occurred().
* score: Add CPU counter supportSebastian Huber2014-02-143-0/+101
| | | | | | | | | Add a CPU counter interface to allow access to a free-running counter. It is useful to measure short time intervals. This can be used for example to enable profiling of critical low-level functions. Add two busy wait functions rtems_counter_delay_ticks() and rtems_counter_delay_nanoseconds() implemented via the CPU counter.
* score: Change debug helper functionsSebastian Huber2014-02-122-18/+18
| | | | | | | | Rename rtems_internal_error_description() to rtems_internal_error_text(). Rename rtems_fatal_source_description() to rtems_fatal_source_text(). Rename rtems_status_code_description() to rtems_status_text(). Remove previous implementation of rtems_status_text().
* score/rbtree: Remove "unprotected" from APISebastian Huber2013-11-211-4/+4
|
* sapi: SMP support for chainsSebastian Huber2013-08-301-0/+138
| | | | | | | | Add ISR lock to chain control for proper SMP protection. Replace rtems_chain_extract() with rtems_chain_explicit_extract() and rtems_chain_insert() with rtems_chain_explicit_insert() on SMP configurations. Use rtems_chain_explicit_extract() and rtems_chain_explicit_insert() to provide SMP support.
* posix: Update to the pthread_once changes.Chris Johns2013-08-231-0/+7
| | | | | | Implement the reeview changes. Add a POSIX Fatal error domain. Fix confdefs.h to correctly handle the internal POSIX mutexes.