summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/pthreadcreate.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-05-11score: Rename _Stack_Free_nothing()Sebastian Huber1-1/+1
Rename _Stack_Free_nothing() in _Objects_Free_nothing() to make it reusable for the message queue buffers. Update #4007.
2021-04-27Return status code for _Thread_Start()Sebastian Huber1-3/+2
This avoids having conditional statements to get the API-specific status code.
2021-04-27Return status code for _Scheduler_Set_affinity()Sebastian Huber1-2/+2
This avoids having conditional statements to get the API-specific status code.
2021-03-16score: Add Thread_Configuration::cpu_time_budgetSebastian Huber1-2/+1
Move the CPU time budget to the thread configuration. This simplifies _Thread_Initialize().
2021-02-26score: Fix thread initializationSebastian Huber1-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.
2020-08-31score: Add stack free handler to TCBSebastian Huber1-1/+3
This avoids a dependency to the stack free function in the thread destruction. Update #3959.
2020-04-28doxygen: Switch @brief and @ingroupSebastian Huber1-1/+2
This order change fixes the Latex documentation build via Doxygen.
2020-04-16Canonicalize config.h includeSebastian Huber1-1/+1
Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
2020-02-12score: Move thread stack allocationSebastian Huber1-5/+15
Move thread stack allocation to caller side of _Thread_Initialize(). Update #3835.
2020-02-12score: Add Thread_ConfigurationSebastian Huber1-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.
2020-02-12score: Simplify FP context allocationSebastian Huber1-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.
2019-09-24Correct initial POSIX signals maskJoel Sherrill1-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.
2019-03-25pthreadcreate.c: Silence unused variable warning (CID 1399716)Joel Sherrill1-0/+1
2018-12-14score: Static Objects_Information initializationSebastian Huber1-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.
2018-10-29posix: Provide threads by defaultSebastian Huber1-7/+13
Update #2514.
2017-11-09posix: Change created_with_explicit_schedulerSebastian Huber1-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.
2017-11-09posix: Remove POSIX_API_Control::schedpolicySebastian Huber1-1/+0
Use the thread CPU budget algorithm to determine the scheduler policy. This fixes also pthread_getschedparam() for Classic tasks. Update #2514.
2017-10-28posix: Fix pthread_create() with user stackSebastian Huber1-3/+11
In case the user provides a stack with address and size, then do not alter the stack size. Close #3211.
2017-10-17posix: Simplify _POSIX_Threads_Create_extension()Sebastian Huber1-0/+4
Move unblocked signals initialization to pthread_create(). Update #2514.
2017-10-17posix: Remove POSIX_API_Control::schedparamSebastian Huber1-1/+7
Move sporadic server scheduler parameters to POSIX_API_Control::Sporadic. Remove redundant scheduler priority parameter. Update #2514.
2017-10-17posix: Fix _POSIX_Threads_Create_extension()Sebastian Huber1-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().
2017-10-11posix: Validate affinity sets by the schedulerSebastian Huber1-7/+2
Update #2514.
2017-10-10posix: Unconditional thread attribute supportSebastian Huber1-0/+1
Update #2514.
2017-10-09posix: Simplify POSIX_API_ControlSebastian Huber1-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.
2017-01-11Remove obsolete __RTEMS_HAVE_SYS_CPUSET_H__Joel Sherrill1-4/+2
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-1/+1
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-09-21score: Rework thread priority managementSebastian Huber1-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.
2016-06-24posix: Fix pthread_create()Sebastian Huber1-4/+7
Do not access data of the executing thread without proper locks.
2016-06-22score: Introduce map priority scheduler operationSebastian Huber1-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.
2016-06-22posix: Generalize _POSIX_Priority_To_core()Sebastian Huber1-5/+5
Move POSIX API priority validation into _POSIX_Priority_To_core().
2016-06-22posix: Make POSIX API aware of scheduler instancesSebastian Huber1-4/+7
2016-06-22posix: Rework sporadic server scheduling policySebastian Huber1-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.
2016-06-22posix: Delete POSIX_API_Control::schedparamSebastian Huber1-2/+1
This field was redundant.
2016-06-22posix: Delete POSIX_API_Control::schedpolicySebastian Huber1-2/+1
This field was redundant.
2016-06-15posix: Fix poradic server initial CPU budgetSebastian Huber1-6/+6
Update #2738.
2016-06-15posix: Use _POSIX_Threads_Sporadic_timer_insert()Sebastian Huber1-7/+1
2016-05-20posix: Rework thread cancellationSebastian Huber1-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.
2016-05-20score: Avoid Giant lock for _Thread_Start()Sebastian Huber1-6/+2
Update #2555.
2016-05-20posix: Rework pthread_join()Sebastian Huber1-1/+4
Rework pthread_join() to use _Thread_Join(). Close #2402. Update #2555. Update #2626. Close #2714.
2016-05-12score: Avoid Giant lock _Scheduler_Set_affinity()Sebastian Huber1-3/+5
Update #2555.
2016-04-12posix: Use a dedicated lock for scheduler changesSebastian Huber1-2/+2
Update #2555.
2016-03-04score: Replace watchdog handler implementationSebastian Huber1-1/+5
Use a red-black tree instead of delta chains. Close #2344. Update #2554. Update #2555. Close #2606.
2016-01-11score: Simplify _Thread_Start()Sebastian Huber1-1/+1
2016-01-11score: Introduce Thread_Entry_informationSebastian Huber1-8/+10
This avoids potential dead code in _Thread_Handler(). It gets rid of the dangerous function pointer casts. Update #2514.
2015-07-28score: Rename _POSIX_Absolute_timeout_to_ticks()Sebastian Huber1-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>.
2015-06-09score: Add Thread_Control::is_fpSebastian Huber1-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.
2014-04-15score: Add clustered/partitioned schedulingSebastian Huber1-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.
2014-04-04score: Add scheduler control to scheduler opsSebastian Huber1-0/+1
Scheduler operations must be free of a global scheduler context to enable partitioned/clustered scheduling.
2014-04-03pthreadcreate.c: Fix bug where attr used instead of the_attrJoel Sherrill1-14/+13
2014-04-03posix: Move affinity from thread to scheduler.Jennifer Averett1-4/+14