summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Convert CPU counter ticks to/from sbintime_tSebastian Huber2018-12-031-2/+20
| | | | | The sbintime_t is an efficient time format. Add the ability to convert CPU counter ticks to/from sbintime_t.
* Rename files to make them unique within cpukitSebastian Huber2018-10-041-0/+0
| | | | This allows to build librtemscpu.a in one rush in the future.
* Add _CPU_Counter_frequency()Sebastian Huber2018-06-151-3/+15
| | | | | | | | | | Add rtems_counter_frequency() API function. Use it to initialize the counter value converter via the new system initialization step (RTEMS_SYSINIT_CPU_COUNTER). This decouples the counter implementation and the counter converter. It avoids an unnecessary pull in of the 64-bit integer division from libgcc. Update #3456.
* Add RTEMS_FATAL_SOURCE_INVALID_HEAP_FREESebastian Huber2018-06-051-1/+2
| | | | | | | | An invalid heap usage such as a double free is usually a fatal error since this indicates a use after free. Replace the use of printk() in free() with a fatal error. Update #3437.
* Update rtems_fatal_source_text()Sebastian Huber2018-06-051-2/+3
| | | | | | Add RTEMS_FATAL_SOURCE_PANIC to rtems_fatal_source_text(). Update #3244.
* score: Use self-contained API mutexSebastian Huber2017-12-041-9/+0
| | | | | | | | | | 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.
* sapi/src/panic.c: Add include of <rtems/bspIo.h>Joel Sherrill2017-11-291-0/+1
|
* sapi: New implementation of rtems_panic()Sebastian Huber2017-11-221-0/+32
| | | | | | | | | | | | The previous rtems_panic() implementation was quite heavy weight. It depended on _exit() which calls the global destructors. It used fprintf(stderr, ...) for output which depends on an initialized console device and the complex fprintf(). Introduce a new fatal source RTEMS_FATAL_SOURCE_PANIC for rtems_panic() and output via vprintk(). Update #3244.
* cpukit: Add _arc4random_getentropy_fail.Christian Mauderer2017-11-171-1/+2
| | | | | | | Add a default implementation of _arc4random_getentropy_fail with an internal error. Update #3239.
* cpukit: Add a Version API.Chris Johns2017-11-101-0/+63
| | | | | | | | Provide functions to get the version string, major, minor and revision numbers and the version control identifer that is a unique tag for the version control system. Update #3199.
* posix: Implement self-contained POSIX mutexSebastian Huber2017-10-051-0/+37
| | | | | | | | 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-051-0/+33
| | | | | | | | 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-051-0/+29
| | | | | | | | 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-051-0/+26
| | | | | | | | 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-051-0/+25
| | | | | | | | | | | | | | 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.
* INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNITSebastian Huber2017-07-251-2/+3
| | | | | | Add new fatal error INTERNAL_ERROR_ILLEGAL_USE_OF_FLOATING_POINT_UNIT. Update #3077.
* Add INTERNAL_ERROR_LIBIO_STDERR_FD_OPEN_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* Add INTERNAL_ERROR_LIBIO_STDOUT_FD_OPEN_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* Add INTERNAL_ERROR_LIBIO_SEM_CREATE_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* INTERNAL_ERROR_LIBIO_USER_ENV_KEY_CREATE_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* Add INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* Add INTERNAL_ERROR_RTEMS_INIT_TASK_CREATE_FAILEDSebastian Huber2016-12-121-1/+2
| | | | Update #2825.
* score: Remove fatal is internal indicatorSebastian Huber2016-12-094-38/+3
| | | | | | | | | 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.
* score: Simplify linker set APISebastian Huber2016-12-061-8/+3
| | | | | | | | | | | | | | | | | Resurrect RTEMS_LINKER_SET_BEGIN() and RTEMS_LINKER_SET_END(). Add new macros RTEMS_LINKER_SET_ITEM_COUNT(), RTEMS_LINKER_SET_IS_EMPTY(), and RTEMS_LINKER_SET_FOREACH(). Remove confusing RTEMS_LINKER_SET_ASSIGN_BEGIN() and RTEMS_LINKER_SET_ASSIGN_END(). Fix RTEMS_LINKER_SET_SIZE() to return the size in characters as specified by the documentation. Update #2408. Update #2790.
* score: Uncomment unused internal error codesSebastian Huber2016-11-231-3/+3
| | | | Update #2825.
* score: Add thread queue enqueue calloutSebastian Huber2016-11-231-1/+1
| | | | | | | 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: Robust thread dispatchSebastian Huber2016-11-231-1/+2
| | | | | | | | | | | | On SMP configurations, it is a fatal error to call blocking operating system with interrupts disabled, since this prevents delivery of inter-processor interrupts. This could lead to executing threads which are not allowed to execute resulting in undefined behaviour. The ARM Cortex-M port has a similar problem, since the interrupt state is not a part of the thread context. Update #2811.
* score: Add and use _Thread_Dispatch_direct()Sebastian Huber2016-11-181-1/+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.
* score: First part of new MrsP implementationSebastian Huber2016-11-021-1/+2
| | | | Update #2556.
* score: More robust linker setsSebastian Huber2016-10-121-2/+5
| | | | | Update #2408. Update #2790.
* score: Add debug support to red-black treesSebastian Huber2016-08-081-0/+1
| | | | This helps to detect double insert and extract errors.
* score: Add deadlock detectionSebastian Huber2016-07-271-2/+3
| | | | | | | | | | The mutex objects use the owner field of the thread queues for the mutex owner. Use this and add a deadlock detection to _Thread_queue_Enqueue_critical() for thread queues with an owner. Update #2412. Update #2556. Close #2765.
* score: Add debug support to chainsSebastian Huber2016-07-221-0/+1
| | | | | | | This helps to detect * double insert, append, prepend errors, and * get from empty chain errors.
* score: Move _RBTree_Find()Sebastian Huber2016-06-222-8/+59
| | | | | | The _RBTree_Find() is no longer used in the score. Move it to sapi and make it rtems_rbtree_find(). Move corresponding types and support functions to sapi.
* score: Move _RBTree_Insert()Sebastian Huber2016-06-221-0/+57
| | | | | The _RBTree_Insert() is no longer used in the score. Move it to sapi and make it rtems_rbtree_insert().
* score: _CORE_mutex_Check_dispatch_for_seize()Sebastian Huber2016-05-301-1/+1
| | | | | | | | | | | Move the safety check performed by _CORE_mutex_Check_dispatch_for_seize() out of the performance critical path and generalize it. Blocking on a thread queue with an unexpected thread dispatch disabled level is illegal in all system states. Add the expected thread dispatch disable level (which may be 1 or 2 depending on the operation) to Thread_queue_Context and use it in _Thread_queue_Enqueue_critical().
* cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2016-05-251-57/+49
| | | | | | | | | | | | | | | | | | | This change adds rtems_printf and related functions and wraps the RTEMS print plugin support into a user API. All references to the plugin are removed and replaced with the rtems_printer interface. Printk and related functions are made to return a valid number of characters formatted and output. The function attribute to check printf functions has been added to rtems_printf and printk. No changes to remove warrnings are part of this patch set. The testsuite has been moved over to the rtems_printer. The testsuite has a mix of rtems_printer access and direct print control via the tmacros.h header file. The support for begink/endk has been removed as it served no purpose and only confused the code base. The testsuite has not been refactored to use rtems_printf. This is future work.
* score: Make _Objects_Information_table constSebastian Huber2016-05-041-1/+2
| | | | | The _Objects_Information_table is statically initialized. So, we can make it read-only.
* score: Simplify _Objects_Initialize_information()Sebastian Huber2016-04-211-5/+1
| | | | | | Remove unused supports_global parameter. Convert _Objects_Initialize_information() to a macro to avoid use of RTEMS_MULTIPROCESSING define for each caller.
* sapi: Avoid Giant lock for extensionsSebastian Huber2016-04-181-20/+13
| | | | | | Extension create and delete is protected by the object allocator lock. Update #2555.
* score: Delete _Chain_Append()Sebastian Huber2016-04-061-4/+0
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Get()Sebastian Huber2016-04-061-4/+0
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Extract()Sebastian Huber2016-04-061-2/+2
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Insert()Sebastian Huber2016-04-061-0/+4
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Get_with_empty_check()Sebastian Huber2016-04-061-4/+0
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Prepend_with_empty_check()Sebastian Huber2016-04-061-2/+2
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Append_with_empty_check()Sebastian Huber2016-04-061-2/+2
| | | | | | This function is not used in the score. Update #2555.
* score: Delete _Chain_Prepend()Sebastian Huber2016-04-061-18/+21
| | | | | | This function is not used in the score. Update #2555.
* sapi: Include missing header fileSebastian Huber2016-03-172-0/+2
|
* sapi: Do not disable thread dispatchingSebastian Huber2016-03-161-2/+0
| | | | | | | Do not disable thread dispatching to add a user extension. After startup, the object allocator lock is enough. Update #2555.