summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/posix/src/[p-z]*.c: Change license to BSD-2Joel Sherrill2022-02-281-3/+22
| | | | Updates #3053.
* score: Introduce CPU budget operationsSebastian Huber2021-11-151-2/+34
| | | | | | | | | | | | | | This patch set replaces the CPU budget algorithm enumeration with a set of CPU budget operations which implement a particular CPU budget algorithm. This helps to hide the CPU budget algorithm implementation details from the general thread handling. The CPU budget callouts are turned into CPU budget operations. This slightly reduces the size of the thread control block. All schedulers used the default scheduler tick implementation. The tick scheduler operation is removed and the CPU budget operations are directly used in _Watchdog_Tick() if the executing thread uses a CPU budget algorithm. This is performance improvement for all threads which do not use a CPU budget algorithm (default behaviour).
* score: Rename _Stack_Free_nothing()Sebastian Huber2021-05-111-1/+1
| | | | | | | Rename _Stack_Free_nothing() in _Objects_Free_nothing() to make it reusable for the message queue buffers. Update #4007.
* Return status code for _Thread_Start()Sebastian Huber2021-04-271-3/+2
| | | | | This avoids having conditional statements to get the API-specific status code.
* Return status code for _Scheduler_Set_affinity()Sebastian Huber2021-04-271-2/+2
| | | | | This avoids having conditional statements to get the API-specific status code.
* score: Add Thread_Configuration::cpu_time_budgetSebastian Huber2021-03-161-2/+1
| | | | | Move the CPU time budget to the thread configuration. This simplifies _Thread_Initialize().
* score: Fix thread initializationSebastian Huber2021-02-261-18/+21
| | | | | | | | Close the thread object if a thread create extension fails. Also call the delete extension to avoid resource leaks in early extensions if a late extension fails. Close #4270.
* score: Add stack free handler to TCBSebastian Huber2020-08-311-1/+3
| | | | | | | This avoids a dependency to the stack free function in the thread destruction. Update #3959.
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-281-1/+2
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-161-1/+1
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* score: Move thread stack allocationSebastian Huber2020-02-121-5/+15
| | | | | | Move thread stack allocation to caller side of _Thread_Initialize(). Update #3835.
* score: Add Thread_ConfigurationSebastian Huber2020-02-121-27/+24
| | | | | | | | | Add the Thread_Configuration structure to reduce the parameter count of _Thread_Initialize(). This makes it easier to add more parameters in the future. It simplifies the code generation since most architectures do not have that many registers available for function parameters. Update #3835.
* score: Simplify FP context allocationSebastian Huber2020-02-121-7/+7
| | | | | | | | | | | Use the stack area to allocate the FP context. This considerably simplifies the application configuration since the task count no longer influences the configured work space size. With this change the stack space size is overestimated since an FP context for each thread is accounted. Memory constraint applications can use the stack size for fine tuning. Update #3835.
* Correct initial POSIX signals maskJoel Sherrill2019-09-241-5/+48
| | | | | | | | | | | | + Modify POSIX thread create extension to ensure expected initial signal mask is provided to system threads, initial tasks and threads, and inheritied by tasks and threads. + Adds psxsignal07 to verify functionality when using a POSIX Initialization thread and POSIX threads. + Adds psxsignal08 to verify functionality when using a Classic API Initialization task and Classic API tasks. Closes #3794.
* pthreadcreate.c: Silence unused variable warning (CID 1399716)Joel Sherrill2019-03-251-0/+1
|
* score: Static Objects_Information initializationSebastian Huber2018-12-141-0/+138
| | | | | | | | | | | Statically allocate the objects information together with the initial set of objects either via <rtems/confdefs.h>. Provide default object informations with zero objects via librtemscpu.a. This greatly simplifies the workspace size estimate. RTEMS applications which do not use the unlimited objects option are easier to debug since all objects reside now in statically allocated objects of the right types. Close #3621.
* posix: Provide threads by defaultSebastian Huber2018-10-291-7/+13
| | | | Update #2514.
* posix: Change created_with_explicit_schedulerSebastian Huber2017-11-091-2/+2
| | | | | | | | Remove POSIX_API_Control::created_with_explicit_scheduler. Add Thread_Control::was_created_with_inherited_scheduler. This fixes also pthread_getattr_np() for Classic tasks. Update #2514.
* posix: Remove POSIX_API_Control::schedpolicySebastian Huber2017-11-091-1/+0
| | | | | | | Use the thread CPU budget algorithm to determine the scheduler policy. This fixes also pthread_getschedparam() for Classic tasks. Update #2514.
* posix: Fix pthread_create() with user stackSebastian Huber2017-10-281-3/+11
| | | | | | | In case the user provides a stack with address and size, then do not alter the stack size. Close #3211.
* posix: Simplify _POSIX_Threads_Create_extension()Sebastian Huber2017-10-171-0/+4
| | | | | | Move unblocked signals initialization to pthread_create(). Update #2514.
* posix: Remove POSIX_API_Control::schedparamSebastian Huber2017-10-171-1/+7
| | | | | | | | Move sporadic server scheduler parameters to POSIX_API_Control::Sporadic. Remove redundant scheduler priority parameter. Update #2514.
* posix: Fix _POSIX_Threads_Create_extension()Sebastian Huber2017-10-171-2/+1
| | | | | | The thread POSIX API control must be fully initialized in _POSIX_Threads_Create_extension(), otherwise a pthread_setschedparam() is broken for all threads not created with pthread_create().
* posix: Validate affinity sets by the schedulerSebastian Huber2017-10-111-7/+2
| | | | Update #2514.
* posix: Unconditional thread attribute supportSebastian Huber2017-10-101-0/+1
| | | | Update #2514.
* posix: Simplify POSIX_API_ControlSebastian Huber2017-10-091-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | Return stack area via pthread_getattr_np(). Simplify * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() and let the scheduler do the more sophisticated error checks. Make * pthread_setaffinity_np(), * pthread_getaffinity_np(), * pthread_attr_setaffinity_np(), and * pthread_attr_getaffinity_np() available in all configurations. Update #2514. Close #3145. Close #3168.
* Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill2017-01-111-4/+2
|
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-1/+1
| | | | | | | | Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
* score: Rework thread priority managementSebastian Huber2016-09-211-17/+15
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* posix: Fix pthread_create()Sebastian Huber2016-06-241-4/+7
| | | | Do not access data of the executing thread without proper locks.
* score: Introduce map priority scheduler operationSebastian Huber2016-06-221-1/+2
| | | | | | | | | | | 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.
* posix: Generalize _POSIX_Priority_To_core()Sebastian Huber2016-06-221-5/+5
| | | | Move POSIX API priority validation into _POSIX_Priority_To_core().
* posix: Make POSIX API aware of scheduler instancesSebastian Huber2016-06-221-4/+7
|
* posix: Rework sporadic server scheduling policySebastian Huber2016-06-221-17/+31
| | | | | | | | | | | | | | 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.
* posix: Delete POSIX_API_Control::schedparamSebastian Huber2016-06-221-2/+1
| | | | This field was redundant.
* posix: Delete POSIX_API_Control::schedpolicySebastian Huber2016-06-221-2/+1
| | | | This field was redundant.
* posix: Fix poradic server initial CPU budgetSebastian Huber2016-06-151-6/+6
| | | | Update #2738.
* posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber2016-06-151-7/+1
|
* posix: Rework thread cancellationSebastian Huber2016-05-201-0/+2
| | | | | | | | Add Thread_Life_state::THREAD_LIFE_CHANGE_DEFERRED and rework the POSIX thread cancellation to use the thread life states. Update #2555. Update #2626.
* score: Avoid Giant lock for _Thread_Start()Sebastian Huber2016-05-201-6/+2
| | | | Update #2555.
* posix: Rework pthread_join()Sebastian Huber2016-05-201-1/+4
| | | | | | | | | Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
* score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber2016-05-121-3/+5
| | | | Update #2555.
* posix: Use a dedicated lock for scheduler changesSebastian Huber2016-04-121-2/+2
| | | | Update #2555.
* score: Replace watchdog handler implementationSebastian Huber2016-03-041-1/+5
| | | | | | | | | Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
* score: Simplify _Thread_Start()Sebastian Huber2016-01-111-1/+1
|
* score: Introduce Thread_Entry_informationSebastian Huber2016-01-111-8/+10
| | | | | | | This avoids potential dead code in _Thread_Handler(). It gets rid of the dangerous function pointer casts. Update #2514.
* score: Rename _POSIX_Absolute_timeout_to_ticks()Sebastian Huber2015-07-281-1/+0
| | | | | | Rename _POSIX_Absolute_timeout_to_ticks() to _TOD_Absolute_timeout_to_ticks() and move it to the score directory. Delete empty <rtems/posix/time.h>.
* score: Add Thread_Control::is_fpSebastian Huber2015-06-091-5/+1
| | | | | | | | Store the floating-point unit property in the thread control block regardless of the CPU_HARDWARE_FP and CPU_SOFTWARE_FP settings. Make sure the floating-point unit is only enabled for the corresponding multilibs. This helps targets which have a volatile only floating point context like SPARC for example.
* score: Add clustered/partitioned schedulingSebastian Huber2014-04-151-2/+5
| | | | | | | | | | | | | | | Clustered/partitioned scheduling helps to control the worst-case latencies in the system. The goal is to reduce the amount of shared state in the system and thus prevention of lock contention. Modern multi-processor systems tend to have several layers of data and instruction caches. With clustered/partitioned scheduling it is possible to honour the cache topology of a system and thus avoid expensive cache synchronization traffic. We have clustered scheduling in case the set of processors of a system is partitioned into non-empty pairwise-disjoint subsets. These subsets are called clusters. Clusters with a cardinality of one are partitions. Each cluster is owned by exactly one scheduler instance.
* score: Add scheduler control to scheduler opsSebastian Huber2014-04-041-0/+1
| | | | | Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.