| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Provide rtems_global_shell_env as a public read-only variable for
backward compatibility.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Use separate state for thread restart.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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().
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
We can use the holder pointer to get the identifier if necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Use the new API to get the uptime in nanoseconds and update the capture
engine.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It looks like the paths that use tval are if 0'ed for RTEMS.
Making all conditional on __rtems__ including the declaration.
|
| |
|
|
|
|
| |
Upcast multiplication to 64-bit integer arithmetic.
|
|
|
|
|
|
| |
Check the return value from mkdir instead of failing silently.
1063857 Unchecked return value from library
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Stops a resource leak in the event that the system cannot malloc
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
FIXME: This area needs proper locking.
|
| |
|
|
|
|
|
| |
Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and
TOD_MILLISECONDS_TO_TICKS().
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Move implementation specific parts of region.h and region.inl into new
header file regionimpl.h. The region.h contains now only the
application visible API.
|
|
|
|
|
|
| |
Move implementation specific parts of part.h and part.inl into new
header file partimpl.h. The part.h contains now only the application
visible API.
|
| |
|
|
|
|
|
|
| |
Move implementation specific parts of event.h, event.inl, eventset.h and
eventset.inl into new header file eventimpl.h. The event.h contains now
only the application visible API.
|
|
|
|
|
|
| |
Move implementation specific parts of attr.h and attr.inl into new
header file attrimpl.h. The attr.h contains now only the application
visible API.
|
|
|
|
|
|
| |
Move implementation specific parts of extension.h and extension.inl into
new header file extensionimpl.h. The extension.h contains now only the
application visible API.
|