summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* score: Add heap statisticsSebastian Huber2014-11-284-10/+40
| | | | | Add lifetime bytes allocated and freed since they were present in the malloc statistics. Add number of failed allocations.
* score: Return heap stats via _Heap_Get_informationSebastian Huber2014-11-287-18/+51
| | | | Print out heap statistics via the MALLOC and WKSPACE shell commands.
* libcsupport: Delete malloc statisticsSebastian Huber2014-11-2817-358/+17
| | | | | | | Use the heap handler statistics instead. Add heap walk option to MALLOC shell command. close #1367
* bdbuf: Fix race condition with sync active flagSebastian Huber2014-11-281-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug report by Oleg Kravtsov: In rtems_bdbuf_swapout_processing() function there is the following lines: if (bdbuf_cache.sync_active && !transfered_buffers) { rtems_id sync_requester; rtems_bdbuf_lock_cache (); ... } Here access to bdbuf_cache.sync_active is not protected with anything. Imagine the following test case: 1. Task1 releases buffer(s) with bdbuf_release_modified() calls; 2. After a while swapout task starts and flushes all buffers; 3. In the end of that swapout flush we are before that part of code, and assume there is task switching (just before "if (bdbuf_cache.sync_active && !transfered_buffers)"); 4. Some other task (with higher priority) does bdbuf_release_modified and rtems_bdbuf_syncdev(). This task successfully gets both locks sync and pool (in rtems_bdbuf_syncdev() function), sets sync_active to true and starts waiting for RTEMS_BDBUF_TRANSFER_SYNC event with only sync lock got. 5. Task switching happens again and we are again before "if (bdbuf_cache.sync_active && !transfered_buffers)". As the result we check sync_active and we come inside that "if" statement. 6. The result is that we send RTEMS_BDBUF_TRANSFER_SYNC event! Though ALL modified messages of that task are not flushed yet! close #1485
* sync.c: Add asserts to document and check assumptionsJoel Sherrill2014-11-271-5/+11
|
* msdos_file.c: Reverse return codes per GedareJoel Sherrill2014-11-271-3/+3
|
* shell: Make mv, cp and rm usable for applicationsSebastian Huber2014-11-273-4/+8
| | | | close #2030
* smp: Fix scheduler helping protocolSebastian Huber2014-11-271-34/+77
| | | | | | | Ensure that scheduler nodes in the SCHEDULER_HELP_ACTIVE_OWNER or SCHEDULER_HELP_ACTIVE_RIVAL helping state are always SCHEDULER_SMP_NODE_READY or SCHEDULER_SMP_NODE_SCHEDULED to ensure the MrsP protocol properties.
* smp: Fix scheduler helping protocol assertionsSebastian Huber2014-11-271-3/+5
|
* rtems: Add rtems_cache_coherent_allocate()Sebastian Huber2014-11-273-0/+184
| | | | Add rtems_cache_coherent_free() and rtems_cache_coherent_add_area().
* monitor/mon-prmisc.c: Use puts() not fprintf()Josh Oguin2014-11-261-1/+1
| | | | | | | CodeSonar flagged this as a case where the user could inject a format string and cause issues. Since we were not printing anything but a string, just switching to puts() rather than fprintf(stdout,...) was sufficient to make this code safer.
* objectgetnameasstring.c: Reformat _Objects_Get() switch to follow patternJosh Oguin2014-11-261-7/+8
|
* objectimpl.h: Add _Assert() to _Objects_Invalidate_Id()Josh Oguin2014-11-261-0/+6
| | | | | CodeSonar flagged this as a possible NULL deference. This should never occur but adding the _Assert() ensures we are guarding against that.
* chainimpl.h: Add _Assert() to _Chain_Initialize_empty()Josh Oguin2014-11-261-3/+9
| | | | | CodeSonar flagged this as a potential NULL deference. That should never occur but adding the _Assert() ensures we are checking that.
* cpukit/posix/src/timertsr.c: Add _Assert()Josh Oguin2014-11-261-1/+8
| | | | | | | | | CodeSonar flagged this as an empty if body. Upon analysis, it turned out to be an error that we think should never occur but if it did, there is nothing we could do about it. It would likely just indicate the thread was deleted before we got here. Adding the _Assert() at least will flag this if it ever occurs during a debug build and we can discuss what happened.
* monitor/mon-editor.c: Use puts() and snprintf() not fprintf() or sprintf()Josh Oguin2014-11-261-5/+7
| | | | | | | | | | CodeSonar flagged this as a case where the user could inject a format string and cause issues. Since we were not printing anything but a string, just switching to puts() rather than fprintf(stdout,...) was sufficient to make this code safer. snprintf() places a limit on the length of the output from sprintf() and avoids similar buffer overrun issues.
* imfs/imfs_handlers_link.c: Add _Assert for NULL pointerJosh Oguin2014-11-261-0/+2
| | | | | CodeSonar flagged this as a possible dereference of a NULL pointer. This should never occur so adding _Assert().
* dosfs/msdos_misc.c: Remove unnecessary operationJosh Oguin2014-11-261-1/+1
| | | | | CodeSonar flagged the increment of this pointer as unneeded. The pointer is not used past this point.
* dosfs/msdos_file.c: Return an error if it occursJosh Oguin2014-11-261-1/+4
| | | | | CodeSonar flagged this as a case where the return value from fat_sync() was not used. Now it is used to return pass/fail to the caller.
* dosfs/msdos_conv.c: Remove unnecessary operationsJosh Oguin2014-11-261-3/+2
| | | | | | These were flagged by CodeSonar. The assignments on variable declaration are overridden a few lines below and the other line later with name_size is where name_size was not used after this assignment.
* libcsupport/src/newlibc_exit.c: Remove dead codeJosh Oguin2014-11-261-1/+1
| | | | | This was flagged as an empty for statement by CodeSonar but is actually unreachable code that should be removed.
* libcsupport/src/mount.c: Remove unnecessary operationJosh Oguin2014-11-261-1/+0
| | | | This was flagged by CodeSonar.
* apimutex.c: Add _Assert for NULL pointer accessJosh Oguin2014-11-261-0/+2
| | | | | | | CodeSonar detects a possible NULL deference here. But it should never occur in tested code. Memory for the API Mutexes is reserved by confdefs.h and are all preallocated when the class of objects is initialized. Allocating a single instance should never fail.
* shell: Include missing headerSebastian Huber2014-11-261-0/+1
|
* i2c: Do not close file descriptor 0 if open failsSebastian Huber2014-11-261-7/+6
|
* i2c: Avoid undefined right shift operationSebastian Huber2014-11-261-5/+8
|
* rtems-rfs-rtems.c: Add cast to address warningJoel Sherrill2014-11-251-1/+1
|
* hexdump-conv.c: Use proper printf() formatting for wchar_tJoel Sherrill2014-11-251-1/+9
|
* main_edit.c: Do not reference beyond end of arrayJoel Sherrill2014-11-251-0/+5
|
* shell/main_edit.c: Note return value not checkedJoel Sherrill2014-11-251-1/+1
| | | | Coverity Id 1255320 spotted an unchecked return value.
* cpukit/libcsupport/src/pwdgrp.c: Check return valueJoel Sherrill2014-11-251-1/+5
| | | | | | Coverity Id 1255518. mkdir() could fail. Check return value and return on failure. Behavior is similar to if open() failed while writing the files.
* shell/main_blksync.c: Fix leak of file descriptorJoel Sherrill2014-11-251-0/+1
| | | | Coverity Id 1063887. File descriptor not freed on error path.
* cpukit/libmisc/shell/main_edit.c: Fix use after free()Joel Sherrill2014-11-251-0/+8
| | | | Coverity Id 1255353. Read from pointer after free().
* cpukit/dev/i2c/i2c-dev.c: Fix leak on error pathJoel Sherrill2014-11-251-2/+1
| | | | Coverity ID 1255520. fd was not closed on error path.
* capture: Resolve failure path memory leak.Jennifer Averett2014-11-251-0/+1
|
* bdbuf: Use rtems_cache_aligned_malloc()Sebastian Huber2014-11-251-9/+6
|
* rtems: Move rtems_cache_aligned_malloc()Sebastian Huber2014-11-252-0/+29
| | | | | | Make sure also the size is cache aligned since otherwise we may have some overlap with the next allocation block. A cache invalidate on this area would be fatal.
* libcsupport: malloc_is_system_state_OK()Sebastian Huber2014-11-255-20/+7
| | | | Move system state check to malloc_is_system_state_OK().
* arm: Use CPU_TIMESTAMP_USE_STRUCT_TIMESPECSebastian Huber2014-11-251-1/+1
| | | | | | | Converting 64-bit nanoseconds values into the common struct timeval or struct timespec formats requires a 64-bit division to get the seconds value. Performance analysis of high network loads revealed that this is too costly on ARM.
* capture: Remove whitespace and fix copyrights.Jennifer Averett2014-11-246-61/+55
|
* capture: Add SMP support.Jennifer Averett2014-11-243-218/+234
| | | | | | To support smp data was broken into global and percpu capture data. Capture control must be disabled prior to printing or setting of watch points.
* capture: Move print methods out of cli for reuse.Jennifer Averett2014-11-244-210/+371
| | | | | | | Methods to print the data were moved from capture-cli into a support area and are no longer static so that they can be shared by test routines, or application code that wants to use the capture engine without the shell interface.
* capture: Move logging of task record to occur after filter check.Jennifer Averett2014-11-243-36/+78
| | | | | | | The catpture task record is now logged just prior to the first log entry using that task instead of the first time the task is seen. This involved splitting the record task method into an initialize task and a record task.
* i2c: Fix endian issueSebastian Huber2014-11-241-9/+14
|
* _Scheduler_FIXME_thread_priority_queues_are_brokenSebastian Huber2014-11-243-19/+0
| | | | | Delete this variable since it is no longer necessary due to the thread priority queue implementation change to use RB trees.
* smp: Fix scheduler helping protocolLuca Bonato2014-11-242-18/+35
| | | | | | | | | | | | New test case for smptests/smpmrsp01. Fix _Scheduler_Block_node() in case the node is in the SCHEDULER_HELP_ACTIVE_RIVAL helping state. For example a rtems_task_suspend() on a task waiting for a MrsP semaphore. Fix _Scheduler_Unblock_node() in case the node is in the SCHEDULER_SMP_NODE_READY state. For example a rtems_task_resume() on a task owning or waiting for a MrsP semaphore.
* rtems/score/object.h: Correct types on _Objects_Build_idSantosh G Vattam2014-11-231-3/+3
| | | | close 1423
* objectsetname.c: Fix always true condition (Coverity ID 1063874)Joel Sherrill2014-11-211-5/+5
| | | | | Coverity spotted the comparison (0 <= length) which is always true. Changed logic to address this.
* pipe/fifo.c: NULL dereference flagged by Coverity ID 1063889Joel Sherrill2014-11-211-1/+2
| | | | It does not appear that this is possible so adding an assert.
* dosfs/fat_fat_operations.c: Explicitly ignore return (Coverity ID 26048)Joel Sherrill2014-11-211-2/+7
| | | | | | Coverity spotted that the return code from fat_set_fat_cluster() was ignored. But it should be because we want to return the status that caused us to hit the cleanup path.