summaryrefslogtreecommitdiffstats
path: root/cpukit (follow)
Commit message (Collapse)AuthorAgeFilesLines
* DOSFS - LENGHT -> LENGTHJoel Sherrill2016-07-124-6/+6
| | | | closes #2756,
* score: Postpone SMP shutdown in _Terminate()Sebastian Huber2016-07-062-4/+7
| | | | | This enables fatal extensions to continue program execution after some fatal errors.
* score: Do not disable ISR in _Terminate()Sebastian Huber2016-07-062-9/+1
| | | | | | | This partially reverts 38ee75853f674977609bd078c69fb53420afdd08. Let the calling context decide if interrupts must be disabled or not. The goal is to enable fatal extensions to continue program execution after some fatal errors.
* libdl/rtl-obj.c: ensure that loaded code is synchronized through caches.Pavel Pisa2016-07-041-0/+2
| | | | | | | | | | | | Synchronize each cluster of sections of the same type separately to support even cases where text and data are allocated from different areas (for example due allocation from different MPU protection regions). rtems_cache_instruction_sync_after_code_change is called even to data sections. Propagation of data only changes should not require cache maintenance operation on sane SMP mutithread capable systems if barrier instruction is added but be on safe side even for case where self modifying code uses data sections initial values etc.
* rtems+bsps/cache: Define cache manager operations for code synchronization ↵Pavel Pisa2016-07-042-1/+30
| | | | | | | | | | | | | | and maximal alignment. There is need for unambiguous named and defined cache function which should be called when code is updated, loaded or is self-modifying. There should be function to obtain maximal cache line length as well. This function can and should be used for allocations which can be used for data and or code and ensures that there are no partial cache lines overlaps on start and end of allocated region.
* score/arm: Ensure that copile time alignment is 64 bytes for Cortex-A multilib.Pavel Pisa2016-07-042-2/+9
| | | | | Some/many Cortex-A cores have data cache line length 64 bytes and maximum value has to be used for system structures alignment.
* arm/score and shared: define ARM hypervisor mode and alternate vector table ↵Pavel Pisa2016-07-041-0/+1
| | | | | | | | | base access. The main reason for inclusion of minimum hypervisor related defines is that current ARM boards firmware and loaders (U-boot for example) start loaded operating system kernel in HYP mode to allow it take control of virtualization (Linux/KVM for example).
* net: Fix byte order issue for getnameinfo()Sebastian Huber2016-07-011-4/+2
|
* score: Change scheduler node init and destroySebastian Huber2016-07-0123-64/+107
| | | | | | Provide the scheduler node to initialize or destroy to the corresponding operations. This makes it possible to have more than one scheduler node per thread.
* score: Fix MPCI message layoutSebastian Huber2016-07-011-1/+1
| | | | | | | | Restore the 32-bit priority field in MP_packet_Prefix. Bug introduced by 254dc82daf8cbd6922376fcbb81c31e21cbf4d16. Close #2750.
* rtems: Fix rtems_task_set_scheduler() APISebastian Huber2016-07-014-58/+89
| | | | | | | | | | | Task priorities are only valid within a scheduler instance. The rtems_task_set_scheduler() directive moves a task from one scheduler instance to another using the current priority of the thread. However, the current task priority of the source scheduler instance is undefined in the target scheduler instance. Add a third parameter to specify the priority. Close #2749.
* score: Workaround for #2751Sebastian Huber2016-07-011-0/+4
| | | | | | | | | | | | | | | The ARM and PowerPC interrupt epilogues call _Thread_Dispatch() with interrupts disabled (counter example: SPARC). On SMP configurations, since inter-processor interrupts set the thread dispatch necessary indicator this prevents a thread dispatch notification in post-switch handlers (which all run with interrupts disabled). On all configurations, this is a serious issue for the interrupt latency. Update #2751
* score: Next try to fix thread lock on SMPSebastian Huber2016-07-011-6/+16
|
* score: Fix priority affinity SMP schedulerSebastian Huber2016-07-011-2/+10
| | | | Bug introduced by 9bfad8cd519f17cbb26a672868169fcd304d5bd5.
* score: Strong APA scheduler processor allocationSebastian Huber2016-06-303-24/+24
| | | | | Use _Scheduler_SMP_Allocate_processor_exact() to prevent unexpected migrations.
* score: Avoid atomic fences for thread wait flagsSebastian Huber2016-06-307-34/+37
| | | | | The use of atomic fences is brittle and may break due to changes in different areas which is hard to manage.
* score: Fix thread lock on SMP configurationsSebastian Huber2016-06-304-12/+46
|
* score: _CPU_SMP_Send_interrupt() documentationSebastian Huber2016-06-291-4/+0
|
* score: Fix SMP message handlingSebastian Huber2016-06-295-28/+37
| | | | | | | | According to the C11 standard only atomic read-modify-write operations guarantee that the last value written in modification order is read, see "7.17.3 Order and consistency". Thus we must use a read-modify-write in _SMP_Inter_processor_interrupt_handler() to make sure we read an up-to-date message.
* libnetworking: Import current <sys/socket.h>Christian Mauderer2016-06-281-73/+373
| | | | | Import the <sys/socket.h> from current FreeBSD. This allows to build some current software (e.g. libressl).
* libnetworking: Move RTEMS-specific socket wake-upSebastian Huber2016-06-283-15/+18
| | | | Close #2748.
* libnetworking: Hide SO_PRIVSTATEChristian Mauderer2016-06-282-1/+7
|
* libnetworking: Add <machine/_align.h>Christian Mauderer2016-06-283-1/+29
| | | | This is necessary for new <sys/socket.h>.
* libnetworking: Import current <arpa/inet.h>Christian Mauderer2016-06-289-38/+73
| | | | | | | | | | Import the <arpa/inet.h> from current FreeBSD. Necessary due to changes in <netinet/in.h>. Remove BSD hack from <arpa/inet.h>. Clean up problems with htonl(). These functions are defined in <arpa/inet.h>. This lead to some problems because they are defined in <rtems/endian.h> too. Add NTOHL, ... to <rtems/rtems_bsdnet_internal.h>.
* libnetworking: Import current <netinet/in.h>Christian Mauderer2016-06-2818-135/+443
| | | | | | | | | | | | | | | | Import the <netinet/in.h> from current FreeBSD. This allows to build some current software (e.g. libressl). Add legacy support like * prototype for in_cksum(), * IPPORT_USERRESERVED, * deprecated IPCTL_RT* defines, * ip_fw_chk_t and ip_fw_ctl_t, * ip_nat_... (IP NAT hooks), and * IP_NAT option for get/setsockopt() to new <rtems/rtems_netinet_in.h>.
* libnetworking: Import current <netinet6/in6.h>Christian Mauderer2016-06-283-0/+760
| | | | | Import the <netinet6/in6.h> from current FreeBSD. This allows to build some current software (e.g. libressl).
* libnetworking: Import <sys/_sockaddr_storage.h>Christian Mauderer2016-06-283-1/+60
| | | | | Import the <sys/_sockaddr_storage.h> from current FreeBSD. Necessary for <netinet/in.h> update.
* libnetworking: Add minimal getnameinfo()Christian Mauderer2016-06-282-1/+62
| | | | | | | This implementation just falls back to giving a string representation of the IP. It supports IPv4 only. Add test for getnameinfo().
* libnetworking: Import current <netdb.h>Christian Mauderer2016-06-287-52/+212
| | | | | | | | | | | | Import the <netdb.h> from current FreeBSD. This allows to build some current software (e.g. libressl). Add __h_errno(). Update gethostent_r() API. Linux and FreeBSD use a common API now. Adapt the RTEMS one to provide the same one. Match gethostbyname_r() with prototype.
* libnetworking: Add <rtems/rtems_netdb.h>Christian Mauderer2016-06-2813-22/+66
| | | | | Move prototypes of non-portable _get*by*name/addr and _set/end*ent functions. This makes it easier to update <netdb.h>.
* libcsupport: Add dummy for setgroups().Christian Mauderer2016-06-282-1/+27
| | | | | The dummy for setgroups() allows applications using it to build (for example civetweb webserver).
* score: Change Priority_Control to 64-bitSebastian Huber2016-06-2410-19/+26
| | | | | | | | A 32-bit Priority_Control limits the uptime to 49 days with a 1ms clock tick in case the EDF scheduler is used. Increase it to 64-bit to enable proper operation of the EDF scheduler, Close 2173.
* score: Silence integer conversion warningsSebastian Huber2016-06-244-4/+5
|
* score: Move SCHEDULER_EDF_PRIO_MSBSebastian Huber2016-06-244-12/+11
| | | | This is an implementation detail of the EDF scheduler.
* score: Fix _Scheduler_EDF_Yield()Sebastian Huber2016-06-241-1/+1
| | | | A non-preemptive task must yield if it says so.
* posix: Fix pthread_create()Sebastian Huber2016-06-241-4/+7
| | | | Do not access data of the executing thread without proper locks.
* score: Fix EDF no-preempt thread handlingSebastian Huber2016-06-231-1/+4
|
* score: Improve heap protectionAlexander Krutwig2016-06-221-2/+7
| | | | Check block pointers of deferred free list before use.
* score: Add thread priority to scheduler nodesSebastian Huber2016-06-2235-461/+398
| | | | | | | | | | | | | | | | | | The thread priority is manifest in two independent areas. One area is the user visible thread priority along with a potential thread queue. The other is the scheduler. Currently, a thread priority update via _Thread_Change_priority() first updates the user visble thread priority and the thread queue, then the scheduler is notified if necessary. The priority is passed to the scheduler via a local variable. A generation counter ensures that the scheduler discards out-of-date priorities. This use of a local variable ties the update in these two areas close together. For later enhancements and the OMIP locking protocol implementation we need more flexibility. Add a thread priority information block to Scheduler_Node and synchronize priority value updates via a sequence lock on SMP configurations. Update #2556.
* score: Move _RBTree_Find()Sebastian Huber2016-06-228-141/+120
| | | | | | The _RBTree_Find() is no longer used in the score. Move it to sapi and make it rtems_rbtree_find(). Move corresponding types and support functions to sapi.
* score: Move _RBTree_Insert()Sebastian Huber2016-06-225-77/+79
| | | | | The _RBTree_Insert() is no longer used in the score. Move it to sapi and make it rtems_rbtree_insert().
* score: Rework EDF schedulerSebastian Huber2016-06-2212-183/+191
| | | | | | | | | Use inline red-black tree insert. Do not use shifting priorities since this is not supported by the thread queues. Due to the 32-bit Priority_Control this currently limits the uptime to 49days with a 1ms clock tick. Update #2173.
* score: Modify release job scheduler operationSebastian Huber2016-06-229-20/+24
| | | | | | Pass the deadline in watchdog ticks to the scheduler. Update #2173.
* score: Remove hidden deadline overrule for CBSSebastian Huber2016-06-221-22/+8
| | | | | | | Do what the user commands. Maybe we should add a rtems_cbs_period() that calls rtems_rate_monotonic_period() with the right parameter. Update #2173.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-2228-82/+317
| | | | | | | | | | | Introduce map/unmap priority scheduler operations to map thread priority values from/to the user domain to/from the scheduler domain. Use the map priority operation to validate the thread priority. The EDF schedulers use this new operation to distinguish between normal priorities and priorities obtain through a job release. Update #2173. Update #2556.
* score: Delete unused _Scheduler_Priority_compare()Sebastian Huber2016-06-2218-194/+37
| | | | | By convention, thread priorities must be integers in RTEMS. Smaller values represent more important threads.
* rtems: Rework RTEMS API to SuperCore prioritySebastian Huber2016-06-229-115/+199
| | | | | Use same structure as POSIX API for thread priority conversion to/from SuperCore.
* posix: Generalize _POSIX_Priority_To_core()Sebastian Huber2016-06-227-32/+44
| | | | Move POSIX API priority validation into _POSIX_Priority_To_core().
* posix: Make POSIX API aware of scheduler instancesSebastian Huber2016-06-2210-93/+91
|
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-229-193/+254
| | | | | | | | | | | | | | Instead of lowering the priority in case the initial budget is consumed raise the priority for each new period. Restore the normal priority once the initial budget is consumed. This makes it later easier to combine the high priority phase with temporary priority boosts (e.g. via priority ceiling and inheritance). Use the thread lock to protect the POSIX thread attributes instead of the thread state lock. This makes it easier to change the thread priority and keep the POSIX attributes consistent. Fixes a false positive use of uninitialized variable warning.