Commit Graph
9825 Commits
Author SHA1 Message Date
Sebastian Huber 8af1663acc score: Fix for RTEMS_DEBUG 2016-09-08 09:55:26 +02:00
Chris Johns 11323b7da9 libdl: Add ARM C++ relocation record support.
Closes #2767
2016-09-08 16:41:59 +10:00
Sebastian Huber 84e960e951 stackchk: Fix stack checker thread initialization
Commit 0fd6f25507 relaxed the thread begin
extension execution environment.  This broke the stack check which only
partially initialized the stack pattern in its create extension.  Move
the part of the begin extension to the create extension.
2016-09-08 07:43:02 +02:00
Sebastian Huber 8bb9d4100c stackchk: Use a const pattern to check 2016-09-08 07:43:02 +02:00
Sebastian Huber bba988d313 stackchk: Remove superfluous internal header file 2016-09-08 07:43:02 +02:00
Sebastian Huber 29594b4dbc score: Remove superfluous SMP debug support
This information turned out to be useless in the last couple of months.
2016-09-07 09:27:59 +02:00
Sebastian Huber 3709987d96 score: Add _Chain_Initialize_one() 2016-09-06 10:52:20 +02:00
Sebastian Huber da15db787b score: Improve red-black tree debug support
Ensure that we extract a node only from the right tree.
2016-09-06 10:52:19 +02:00
Sebastian Huber 83b0229071 score: Add _RBTree_Initialize_one() 2016-09-06 10:52:19 +02:00
Sebastian Huber 796f12a85a score: Add missing const qualifiers 2016-09-06 10:52:19 +02:00
Sebastian Huber 1dd8ffff9f capture: Use proper accessor functions 2016-09-06 10:52:19 +02:00
Sebastian Huber 7af6b58c5c capture: Workaround to avoid misaligned access
Move the 64-bit field to a not 64-bit aligned structure offset to stop
the compiler from generating 64-bit load/store operations.
2016-09-06 09:53:08 +02:00
Chris Johns 1c18ebf0d6 libmisc/capture: Remove the reserved _t in the types. 2016-09-01 11:11:45 +10:00
Chris Johns 6da06c559f libmisc/capture: Fix the capture engine on SMP.
This patches some issues with the capture engine:

 1. Check is the engine is open in ctrace commands.
 2. Check all record open and appends for overflow.
 3. Fix the record open to take the size of user data and
    not the record header.
 4. Use packed structs for data being written to the per
    cpu buffers.
 5. Remove direct struct access to the capture buffers to
    avoid misaligned accesses.
 6. Add support to extract records, no struct access to the
    capture buffers.
 7. Update ctrace to extract records from the capture buffers.
 8. Add support to ctrace to always print the task name if it
    has one.
 9. Add support to manage names or the lack of a name.
10. Range of minor fixes.
11. Fix a long standing bug in ctset's handling of args.

Closes #2780.
2016-09-01 11:11:22 +10:00
Kevin Kirspel 36fad91f00 arm: Add VFP context validate support for ARMv5 2016-08-19 07:40:45 +02:00
Sebastian Huber 9c42752cac score: Fix undefined behaviour
Cast POSIX error codes to unsigned int to avoid undefined behaviour in
case of PTHREAD_BARRIER_SERIAL_THREAD which is -1.
2016-08-18 07:27:51 +02:00
Chris Johns 97d395bac3 testsuite: Add libdl/dl03 cache test. 2016-08-15 15:45:10 +10:00
Chris Johns 58c34961ca libdl: Fix cache corruption bugs.
This patch fixes a number of bugs in the cache when requests are
made to read close to the end of the file and the data is copied
from the top of the cache buffer to the bottom of the buffer. This
was compounded by attempting to read past the end of the file.

Closes #2754.
2016-08-15 15:44:38 +10:00
Chris Johns 75386e1131 libdl: Add trace output when reading section headers. 2016-08-15 15:41:52 +10:00
Sebastian Huber 55faa44768 score: Improve _RBTree_Insert_inline()
Return if the inserted node is the new minimum node or not.
2016-08-12 11:16:45 +02:00
Sebastian Huber 424ffe4db0 score: Introduce thread queue surrender operation
This is an optimization for _Thread_queue_Surrender().  It helps to
encapsulate the priority boosting in the priority inheritance thread
queue operations.
2016-08-11 11:13:42 +02:00
Sebastian Huber a827447b20 score: Dismantle _Thread_queue_Do_extract_locked()
Dismantle _Thread_queue_Do_extract_locked() into re-usable parts like
_Thread_queue_MP_set_callout() and _Thread_queue_Make_ready_again().
Use them in _Thread_queue_Surrender() to propare for a new thread queue
surrender operation.
2016-08-11 11:13:42 +02:00
Sebastian Huber fef3ea9e87 score: Add _Thread_queue_Surrender()
Add _Thread_queue_Surrender() to unify the mutex surrender procedures
which involve a thread queue operation.
2016-08-11 11:13:36 +02:00
Chris Johns 9a4eca5843 build-system: Always enable C++ if the compiler is present.
We always build a C++ compiler and building with C++ does not effect
RTEMS or the runtime. This patch always enabled the support. There is
no need to manually enable it any more.

You can disable C++ with '--disable-cxx'.

If an architecture does not have a C++ compiler support is automatically
disabled.
2016-08-11 17:20:10 +10:00
Gedare Bloom 709594f0fb posix: nanosleep: adjust elapsed time calculation
Use clock_gettime before and after sleep to calculate
the time spent asleep, and the amount of time remaining.

updates #2732
2016-08-10 12:09:50 -04:00
Chris Johns b0f08c83e2 libmisc/untar: Set the perms to the value in the tar file.
This patch parses the mode field in the tar header and sets the
directory or file to the mode value in the header.

Closes #2768.
2016-08-09 17:22:26 +10:00
Sebastian Huber aaaf9610db score: Add debug support to red-black trees
This helps to detect double insert and extract errors.
2016-08-08 09:34:29 +02:00
Sebastian Huber 2cb9b86e6a posix: Fix for RTEMS_DEBUG 2016-08-08 08:30:17 +02:00
Sebastian Huber 69dd99be43 score: Simplify _Thread_Finalize_life_change() 2016-08-05 08:19:39 +02:00
Sebastian Huber ee0e41355d score: Fix a release/cancel job race condition
Split up the potential thread priority change in the scheduler
release/cancel job operation.  Protect the rate monotonic period state
with a dedicated SMP lock.  This avoids a race condition during
_Rate_monotonic_Timeout() while _Rate_monotonic_Cancel() is called on
another processor.
2016-08-04 10:20:29 +02:00
Sebastian Huber ca783bbe4c score: Fix _Thread_queue_Path_release()
It is possible that the owner of the terminal link of a thread queue
path waits on a thread queue.  However, this thread queue has no owner,
e.g. a thread queue of a message queue.
2016-08-04 10:17:54 +02:00
Sebastian Huber 6117f29cd4 score: Fix _Scheduler_EDF_Cancel_job_filter()
Commit 21bdca49ee accidentally used a
function which may be added later.
2016-08-04 08:33:00 +02:00
Sebastian Huber 1c1e31f788 score: Optimize _Thread_queue_Path_release()
Update #2556.
2016-08-04 08:10:29 +02:00
Sebastian Huber 21bdca49ee score: Indroduce cancel job scheduler operation
Do not use a deadline value of zero to indicate a job cancellation.  Use
a dedicated scheduler operation for this.
2016-08-04 07:44:47 +02:00
Sebastian Huber ff2e6c647d score: Fix and simplify thread wait locks
There was a subtile race condition in _Thread_queue_Do_extract_locked().
It must first update the thread wait flags and then restore the default
thread wait state.  In the previous implementation this could lead under
rare timing conditions to an ineffective _Thread_Wait_tranquilize()
resulting to a corrupt system state.

Update #2556.
2016-08-03 13:57:30 +02:00
Sebastian Huber 3b3552bf01 posix: Fix for RTEMS_DEBUG 2016-08-03 13:56:06 +02:00
Sebastian Huber ec735c6a76 score: Fix for RTEMS_DEBUG 2016-08-03 13:56:06 +02:00
Christian Mauderer 5fe6d07ad5 linker set: Allow adding any variable into content
The newly created macro adds any kind of variable into a linker set. It
allows (for example) the saving an execution state of a function using
the following method:

- put a group of different variables into one linker set
- save the memory area containing the group of variables before the
  execution of a function
- restore the memory area after the function has been executed
2016-08-02 07:47:04 +02:00
Sebastian Huber 501b11baab score: Fix for RTEMS_DEBUG 2016-08-01 14:00:55 +02:00
Chris Johns db6a6375e1 score: Fix for RTEMS_DEBUG. 2016-08-01 17:53:57 +10:00
Gedare Bloom 842005e432 posix: nanosleep: optimize away a time conversion
updates #2732
2016-07-29 13:13:41 -04:00
Sebastian Huber d79df38c2b score: Add deadlock detection
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.
2016-07-27 10:55:30 +02:00
Sebastian Huber 1fcac5adc5 score: Turn thread lock into thread wait lock
The _Thread_Lock_acquire() function had a potentially infinite run-time
due to the lack of fairness at atomic operations level.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber 3a58dc8631 score: Priority inherit thread queue operations
Move the priority change due to priority interitance to the thread queue
enqueue operation to simplify the locking on SMP configurations.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber ac8402ddd6 score: Simplify _Thread_queue_Boost_priority()
Raise the priority under thread queue lock protection and omit the
superfluous thread queue priority change, since the thread is extracted
anyway.  The unblock operation will pick up the new priority.

Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber f4d1f30792 score: Split _Thread_Change_priority()
Update #2412.
Update #2556.
Update #2765.
2016-07-27 10:55:30 +02:00
Sebastian Huber 0b83633729 score: Fix for RTEMS_DEBUG 2016-07-27 10:55:29 +02:00
Sebastian Huber dfa2cdb15d posix: Fix error status 2016-07-27 09:09:53 +02:00
Gedare Bloom 39d97ab78c cpukit: refactor nanosleep and use 64-bit timeout for threadq
* Fixes a bug with elapsed time calculations misusing absolute time
  arguments in nanosleep_helper by passing the requested relative interval.
* Fixes a bug with truncation of absolute timeouts by passing the
  full 64-bit value to Thread_queue_Enqueue.
* Share yield logic between nanosleep and clock_nanosleep.

updates #2732
2016-07-26 14:13:36 -04:00
Alexander Krutwig 6a174c024a Add Untar_FromGzChunk_Print() + Test 2016-07-26 10:00:04 +02:00