summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-01-03cpukit/score: avoid NULL and races in priority mutex4.10Gedare Bloom2-1/+9
The PIP modifications from #3359 introduced new data structures to track priority inheritance. Prioritized mutexes without PIP share some of the code paths, and may result in NULL pointer accesses. This patch checks for NULL, and also adds ISR critical sections to an uncovered corner case during thread restarts. Closes #3829.
2018-03-23score: add Inherited_priorities priority queue and functionsGedare Bloom8-11/+208
Adds enqueue, dequeue, requeue, evaluate, and release functions for the thread priority node priority queue of inherited priorities. Add calls to these functions as needed to maintain the priority queue due to blocking, unblocking, and priority changes. Closes #3359.
2018-03-23score: replace current and real priority with priority nodeGedare Bloom12-27/+27
Encapsulate the current_priority and real_priority fields of the thread control block with a Thread_Priority_node struct. Propagate modifications throughout the tree where the two fields are directly accessed. Updates #3359.
2018-01-11score: Use _Workspace_Allocate_or_fatal_error()Sebastian Huber1-5/+8
Use _Workspace_Allocate_or_fatal_error() consistently in case auto extend is turned off. This helps to avoid undefined behaviour in _API_Mutex_Allocate() in case _API_Mutex_Information() fails.
2014-08-20score: PR2179: Fix initially locked PI mutexSebastian Huber1-4/+10
2014-05-23score: PR2179: Fix initially locked PCP mutexesSebastian Huber1-2/+3
Elevate the priority of the creating task to the ceiling priority in case a semaphore is created as initially locked.
2013-08-26score: PR2140: Fix _Thread_queue_Process_timeout()Sebastian Huber1-8/+37
The _Thread_queue_Process_timeout() operation had several race conditions in the event of nested interrupts. Protect the critical sections via disabled interrupts.
2013-08-26score: PR2140: _Thread_queue_Extract()Sebastian Huber3-8/+11
Return if the executing context performed the extract operation since interrupts may interfere.
2013-01-07score: Fix _Objects_Shrink_information()Sebastian Huber1-20/+16
The chain iteration was wrong. The chain tail is not an object.
2012-12-06score: Critical fix for timer serverSebastian Huber1-7/+0
Under certain conditions it is possible that a call to _Watchdog_Adjust_to_chain() happens with a unit parameter value of zero (for example sptests/spintrcritical17). Remove superfluous checks that prevent an adjust to a chain of a watchdog chain which first element has a delta zero value.
2011-11-282011-11-28 Werner Almesberger <werner@almesberger.net>Joel Sherrill1-15/+3
PR 1961/cpukit * score/src/coremsgsubmit.c: Close window caused by using message pending count rather than directly obtaining unused buffer.
2011-09-012011-09-01 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill3-10/+42
PR 1895/cpukit * posix/src/mqueuerecvsupp.c, posix/src/pthreadjoin.c, score/src/coretodmsecstoticks.c, score/src/coretodusectoticks.c, score/src/timespectoticks.c: Ensure time conversions to ticks do not ignore partial tick and return 1 less than desired.
2011-05-25Cosmetics from CVS-HEAD.Ralf Corsepius23-58/+45
2010-04-072010-04-07 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+0
* score/src/wkspace.c: Remove duplicate include.
2010-03-28Fix.Joel Sherrill1-3/+4
2010-03-282010-03-28 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-0/+3
* score/src/isrthreaddispatch.c: Add include of config.h
2010-03-122010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+1
* ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.c, httpd/misc.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_misc.c, libfs/src/nfsclient/src/nfs.c, libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c, libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c, libmisc/shell/shell.c, libmisc/shell/shell_makeargs.c, libmisc/uuid/parse.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/inet_network.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_init.c, libnetworking/libc/res_query.c, libnetworking/rtems/rtems_mii_ioctl.c, score/src/objectgetnameasstring.c: Readdress use of ctype methods per recommendation from D.J. Delorie on the newlib mailing list. We should pass an unsigned char into these methods.
2010-03-112010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+1
* ftpd/ftpd.c, httpd/uemf.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c, libblock/src/diskdevs.c, libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c, libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c, libmisc/uuid/parse.c, libnetworking/lib/ftpfs.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_network.c, libnetworking/rtems/rtems_mii_ioctl.c, score/src/objectgetnameasstring.c: Fix warnings for ctype methods.
2010-03-102010-03-10 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-0/+11
* score/include/rtems/score/interr.h, score/src/objectinitializeinformation.c: Add new fatal error for configuring unlimited and maximum of 0.
2010-01-26User extension API: add const to some params, inline ↵Thomas Doerfler1-42/+0
_User_extensions_Add_API_set
2010-01-202010-01-20 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-15/+4
Coverity Id 5 * score/src/objectextendinformation.c: Check object_blocks for NULL to determine when to allocate object block table.
2010-01-192010-01-19 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-57/+36
Coverity Id 5 * score/src/objectinitializeinformation.c: Do not modify maximum parameter. Clean up and simplify code. This should help the Coverity path analysis to avoid reporting issues.
2009-12-072009-12-07 Cindy Cicalese <cicalese@mitre.org>Joel Sherrill1-1/+2
PR 1477/cpukit * score/src/objectsetname.c: Ensure destination is NULL terminated. String copy was not getting the NULL.
2009-12-022009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey3-3/+3
* libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemonreportstatistics.c, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Updated copyright line.
2009-12-022009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey3-5/+5
* configure.ac, libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Changed the configuration of statistics granularity to use just one define.
2009-11-302009-11-30 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill1-1/+6
* score/src/threaddelayended.c: Clear only the states that are used to block until someone calls _Thread_Delay_ended().
2009-11-30Changed base implementation of protected heap allocations to use ↵Thomas Doerfler2-45/+12
_Heap_Allocate_aligned_with_boundary().
2009-11-29Whitespace removal.Ralf Corsepius43-98/+98
2009-11-102009-11-10 Jennifer Averett <jennifer.averett@OARcorp.com>Joel Sherrill1-1/+2
PR 1468/cpukit * score/src/timespecdividebyinteger.c: Rework statement to ensure 64-bit multiplication is used.
2009-10-292009-10-29 Till Straumann <strauman@slac.stanford.edu>Till Straumann1-0/+7
* score/src/isr.c: Check if CPU defined _CPU_Interrupt_stack_setup() macro hook for setting up the interrupt stack (alignment, reserving space etc.) after the framework allocates it.
2009-10-142009-10-14 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-3/+0
* score/src/threadhandler.c: Remove comment mentioning unix port.
2009-10-12Reflect having introduced Internal_errors_t.Ralf Corsepius2-2/+2
2009-10-112009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+2
* score/inline/rtems/score/thread.inl, score/src/threaddispatch.c: Correct conditionals so _Thread_Enable_dispatch() is always inlined when intended.
2009-10-082009-10-08 Chris Johns <chrisj@rtems.org>Chris Johns3-4/+4
* Makefile.am, preinstall.am: Added statvfs.h. * libcsupport/Makefile.am: Add statvfs.c. * libcsupport/include/sys/statvfs.h, libcsupport/src/statvfs.c: New. * libcsupport/include/rtems/libio.h: Add a file system handler for the statvfs call. * libfs/src/devfs/devfs_init.c, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs_init.c, libfs/src/nfsclient/src/nfs.c: Set the statvfs handler to NULL. * include/rtems/fs.h: Add a second node access field for the RFS file system to hold a directory offset while the existing field holds the inode number. This save a rescan of the directory when working with directories. * libblock/include/rtems/bdbuf.h: Added references and user fields to the buffer descriptor. * libblock/src/bdbuf.c: Added dynamic buffer support for different block sizes. Fixed a number of bugs. * libblock/src/blkdev.c: Release the disk device on an error. * libblock/src/diskdevs.c: Set the block size to the media block size during initialisation of the disk device. * libblock/src/flashdisk.c, libblock/src/nvdisk.c, libblock/src/ramdisk.c: Updated the drivers to handle variable block sizes. * libfs/src/dosfs/fat.c, libfs/src/dosfs/fat.h: Release any buffers when an error occurs. The FAT buffer layer hangs onto a single buffer while mounted. This should be fixed. * sapi/inline/rtems/chain.inl: Added rtems_chain_set_off_chain, rtems_chain_is_node_off_chain, and rtems_chain_previous. * score/inline/rtems/score/chain.inl: Added _Chain_Set_off_chain, and _Chain_Is_node_off_chain. * libmisc/shell/main_ln.c, libmisc/shell/main_mknod.c, libmisc/shell/mknod-pack_dev.c, libmisc/shell/mknod-pack_dev.h: New shell commands. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Added ln and mknod commands. * libmisc/shell/hexdump-display.c: Fixed the reopen bug which showed up as a free with a bad pointer. * libmisc/shell/main_mount.c: List the user adding file system when listing the available file systems to mount. * libmisc/shell/utils-cp.c: Remove the fixed static copy buffer and use a large dynamic buffer. * score/inline/rtems/score/address.inl, score/src/coremsgsubmit.c, score/src/objectallocate.c, score/src/objectfree.c: Remove warnings.
2009-09-29Fix thinko in previous change.Ralf Corsepius1-1/+1
2009-09-292009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-1/+1
* score/src/heapwalk.c(Heap_Walk_printer): Add missing return type.
2009-09-282009-09-28 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2-12/+10
* score/src/objectidtoname.c: Remove error which cannot be reached since API that calls this checks the error first. * score/src/objectsetname.c: Adjust handling of length.
2009-09-252009-09-25 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill9-65/+78
* sapi/include/rtems/extension.h, sapi/src/extensiondelete.c, sapi/src/extensionident.c, sapi/src/extensioncreate.c, sapi/inline/rtems/extension.inl, score/include/rtems/score/userext.h, score/src/userextthreaddelete.c, score/src/userext.c, score/src/userextthreadcreate.c, score/src/userextremoveset.c, score/src/userextthreadbegin.c, score/src/userextaddset.c, score/src/userextthreadstart.c, score/src/userextthreadswitch.c, score/src/userextthreadrestart.c: Documentation. The types User_extensions_routine and rtems_extension are now deprecated. Removed unused types User_extensions_thread_post_switch_extension and rtems_task_post_switch_extension. Renamed _User_extensions_Add_API_set() in _User_extensions_Add_set(). Renamed _User_extensions_Add_set() in _User_extensions_Add_set_with_table(). * score/src/userextaddapiset.c: Removed file. * score/Makefile.am: Update.
2009-09-252009-09-25 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill1-2/+1
* score/src/heap.c, score/include/rtems/score/heap.h: Reduced alignment requirement for CPU_ALIGNMENT from four to two.
2009-09-162009-09-16 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-4/+8
* score/src/userextaddapiset.c: Disable code that is only used when ITRON or POSIX is enabled.
2009-09-16*** empty log message ***Joel Sherrill1-60/+51
2009-09-142009-09-14 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill2-288/+0
* score/src/heapalignupuptr.c, score/src/heapallocatealigned.c: Removed files. * score/Makefile.am: Update.
2009-09-142009-09-14 Sebastian Huber <Sebastian.Huber@embedded-brains.de>Joel Sherrill1-13/+3
* score/src/wkspace.c: Removed work space area consistency checks. * libblock/include/rtems/ide_part_table.h: Functions are now deprecated. * libcsupport/include/rtems/libcsupport.h, libcsupport/src/calloc.c, libcsupport/src/malloc_boundary.c, libcsupport/src/malloc_initialize.c, libcsupport/src/malloc_report_statistics_plugin.c, libcsupport/src/malloc_statistics_helpers.c, libcsupport/src/malloc_walk.c, libcsupport/src/realloc.c, rtems/inline/rtems/rtems/region.inl: Update for heap API changes. 2009-09-14 Christian Mauderer <christian.mauderer@embedded-brains.de> * libcsupport/src/vprintk.c: Fixed warnings. Print nothing in case the pointer to the string is NULL.
2009-09-132009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2-19/+26
* score/include/rtems/score/thread.h, score/src/threadinitialize.c, score/src/threadstackfree.c: Disable capability for API to let user provide thread stack when no API configured includes this capability.
2009-09-132009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-4/+3
* score/include/rtems/score/coresem.h, score/src/coresemseize.c: Disable body of _CORE_semaphore_Seize() if it is not used because all APIs using it are disabled.
2009-09-132009-09-13 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill1-1/+1
* score/src/coremsgbroadcast.c: Fix typo.
2009-09-132009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+0
* score/src/coremsgsubmit.c: Remove extra #else.
2009-09-132009-09-13 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill5-53/+55
* score/inline/rtems/score/coremsg.inl, score/src/coremsg.c, score/src/coremsgbroadcast.c, score/src/coremsginsert.c, score/src/coremsgseize.c, score/src/coremsgsubmit.c: Add wrappers for accessing message priority. Since these are empty when priority-based message queues are disabled, this eliminates some of the conditionals.
2009-09-122009-09-12 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-1/+1
* score/src/coremsgseize.c: Fix typo.
2009-09-112009-09-11 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill5-117/+151
* score/include/rtems/score/coremsg.h, score/inline/rtems/score/coremsg.inl, score/src/coremsg.c, score/src/coremsginsert.c, score/src/coremsgseize.c, score/src/coremsgsubmit.c, score/src/objectnametoidstring.c: Disable the Core Message Queue features of notification, priority messages, and blocking sends when no API requires them.