summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc (follow)
Commit message (Collapse)AuthorAgeFilesLines
* shell: Add a ping command.Chris Johns2014-09-164-1/+2100
| | | | | | | | | The ping code is taken from a recent FreeBSD release. Some options have been tested, other not tested or do not work. This could be due to the age of our TCP/IP stack. This version of ping will not work if more than 64 file descriptors are open at once because the select FD size is 64 as set in newlib.
* capture: Add support for variable length records.Jennifer Averett2014-09-058-72/+470
|
* capture: Split user extension methods out.Jennifer Averett2014-09-054-388/+673
|
* shell.c: Add cast to match printf() expectations for width specifierJoel Sherrill2014-09-041-1/+6
|
* capture: Fix capture engine to handle new extensions.Jennifer Averett2014-07-112-35/+76
|
* capture: Update comment block style in capture engine.Jennifer Averett2014-07-112-416/+378
| | | | Doxygen added and comment blocks standardized.
* shell: Add rtems_shell_dup_current_env to get a default env.Chris Johns2014-06-044-20/+40
| | | | | | | | Remove rtems_current_shell_env as this is dangerous because the env can be NULL if used outside of a valid shell with the POSIX key to an env set up. Clean up the usage of rtems_current_shell_env.
* shell: Make rtems_global_shell_env publicSebastian Huber2014-05-282-1/+3
| | | | | Provide rtems_global_shell_env as a public read-only variable for backward compatibility.
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-152-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
* score: Add STATES_RESTARTINGSebastian Huber2014-05-141-0/+1
| | | | Use separate state for thread restart.
* monitor: Support STATES_MIGRATINGSebastian Huber2014-05-141-0/+1
|
* score: Implement forced thread migrationSebastian Huber2014-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
* score: Use common names for per-CPU variablesSebastian Huber2014-04-221-6/+6
| | | | | | | | | | | | | | | | Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
* capture: Use ISR lock for SMP supportSebastian Huber2014-04-141-71/+72
|
* 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-101-3/+2
| | | | | | | | | | | | 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: Delete CORE_mutex_Control::lockSebastian Huber2014-03-311-3/+5
| | | | | | | | The holder field is enough to determine if a mutex is locked or not. This leads also to better error status codes in case a rtems_semaphore_release() is done for a mutex without having the ownership.
* score: Delete CORE_mutex_Control::holder_idSebastian Huber2014-03-311-2/+7
| | | | We can use the holder pointer to get the identifier if necessary.
* score: Thread life cycle re-implementationSebastian Huber2014-03-311-0/+2
| | | | | | | | | | | | | | | | | | | The thread deletion is now supported on SMP. This change fixes the following PRs: PR1814: SMP race condition between stack free and dispatch PR2035: psxcancel reveals NULL pointer access in _Thread_queue_Extract() The POSIX cleanup handler are now called in the right context (should be called in the context of the terminating thread). http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_09.html Add a user extension the reflects a thread termination event. This is used to reclaim the Newlib reentrancy structure (may use file operations), the POSIX cleanup handlers and the POSIX key destructors.
* score: Add and use thread get/set CPU functionsSebastian Huber2014-03-311-1/+3
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-21103-104/+104
|
* cpukit/shell: Replace task variables with posix keys.Christian Mauderer2014-03-202-20/+40
| | | | | | | | | | | | Use posix keys for current shell environment instead of task variables. With this patch the shell needs one posix-key and one posix-key-value-pair configured. Update documentation for the shell. Adapt samples/fileio: - Add necessary objects. - Add login function and custom device name for better testing of the shell.
* network: Add help text for ifconfigRalf Kirchner2014-03-131-20/+57
|
* mw_uid: corrects uid_read_message short timeoutsAllan Hessenflow2014-01-091-2/+11
|
* cpukit/capture: Print the uptime and diff in ctrace.Chris Johns2013-12-241-17/+17
| | | | | | | | | | | Print the uptime and difference in nanoseconds to the previous record in the ctrace output. For example: 0:00:59.474927121 14760 0a01000c TNTD 235 235 CREATED_BY 0:00:59.474927418 297 0a010012 /dev 235 235 CREATED 0:00:59.474930799 3381 0a01000c TNTD 235 235 STARTED_BY 0:00:59.474931105 306 0a010012 /dev 235 235 STARTED 0:00:59.475072297 141192 0a01000c TNTD 235 235 SWITCHED_OUT
* cpukit/capture: Use the new RTEMS API to get the uptime in nanoseconds.Chris Johns2013-12-243-16/+57
| | | | | Use the new API to get the uptime in nanoseconds and update the capture engine.
* rtems: classic api to/from core priority conversionsDaniel Ramirez2013-12-211-1/+4
|
* cpukit/capture: Update the capture engine.Chris Johns2013-12-193-233/+195
| | | | | | | | | | | | The capture did not work due to changes in the workspace allocator. The engine now scans all existing tasks when enabled and does any allocations then. Fixed a bug in the ctset commandi in the CLI. Updated the capture engine to use 64bit nanosec timestamps. Fixed the CLI showing the stack usage.
* cpukit/shell: Control help break with SHELL_LINES env variable.Chris Johns2013-12-161-3/+11
| | | | | | | | Control the help command break with the SHELL_LINES evironment variable where the numeric value is the number of lines to break on. If the value is 0 the output is not broken. The default is 16 lines. Add shell documentation for the help command.
* gettimeofday: Add restrict keywordBryan Dunsmore2013-11-291-1/+1
|
* monitor: Add support for BSD wakeup stateSebastian Huber2013-11-141-0/+1
|
* internal.h/main_mdump.c: Convert main methods to staticJoel Sherrill2013-09-232-5/+3
|
* main_mv.c: Address set but not used warningJoel Sherrill2013-09-211-1/+5
| | | | | It looks like the paths that use tval are if 0'ed for RTEMS. Making all conditional on __rtems__ including the declaration.
* mouse_parser.c: Fix warning by properly checking return codeJoel Sherrill2013-09-211-1/+1
|
* uuid: make integer arithmetic conversion explicitGedare Bloom2013-09-051-1/+1
| | | | Upcast multiplication to 64-bit integer arithmetic.
* untar: check return value from mkdirGedare Bloom2013-09-051-1/+5
| | | | | | Check the return value from mkdir instead of failing silently. 1063857 Unchecked return value from library
* shell: Out-of-bounds accessGedare Bloom2013-09-051-8/+15
| | | | | | In case the length of cwd path plus the userScriptName exceeds PATH_MAX (255), the strncat calls will overflow scriptFile. Also check for getcwd failure.
* Stop a resource leakCynthia Rempel2013-08-261-0/+1
| | | | Stops a resource leak in the event that the system cannot malloc
* PR766: Delete __RTEMS_VIOLATE_KERNEL_VISIBILITY__Sebastian Huber2013-08-087-8/+0
|
* Fix compiler warningsR. Diez2013-08-061-5/+5
|
* score: Rename tod.h to todimpl.hSebastian Huber2013-08-012-2/+2
|
* smp: Add and use _Per_CPU_Get()Sebastian Huber2013-07-301-1/+1
| | | | | | Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index(). Add _Per_CPU_Send_interrupt(). This avoids direct access of _Per_CPU_Information.
* smp: Use Thread_Control.is_executingSebastian Huber2013-07-301-7/+4
| | | | FIXME: This area needs proper locking.
* libmisc: Provide libutf8proc conditionallySebastian Huber2013-07-261-0/+2
|
* score: Merge tod implementation into one fileSebastian Huber2013-07-262-4/+3
| | | | | Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
* score: Create object implementation headerSebastian Huber2013-07-262-0/+2
| | | | | | Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
* score: Create states implementation headerSebastian Huber2013-07-262-2/+2
| | | | | | Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
* score: Merge sysstate API into one fileSebastian Huber2013-07-241-0/+1
|
* score: Merge wkspace API into one fileSebastian Huber2013-07-231-10/+9
|
* rtems: Create tasks implementation headerSebastian Huber2013-07-231-0/+1
| | | | | | Move implementation specific parts of tasks.h and tasks.inl into new header file tasksimpl.h. The tasks.h contains now only the application visible API.