ADTF
thread_parameter.h File Reference

Copyright © Audi Electronics Venture GmbH. More...

Go to the source code of this file.

Classes

struct  tSchedulingParameters
 Compound class, that groups scheduling parameters. More...
 

Namespaces

 A_UTILS_NS
 ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
 

Macros

#define __STDCALL
 Defines the standard function call.
 
#define __THREAD_RESULT   void*
 Defines the default result value of threads.
 
#define __THREADCALL
 Defines the standard call of threads.
 
#define A_UTILS_THREAD_PRIORITY_LOWEST   0.0
 lowest thread priority
 
#define A_UTILS_THREAD_PRIORITY_LOW   0.25
 low thread priority
 
#define A_UTILS_THREAD_PRIORITY_NORMAL   0.5
 normal thread priority
 
#define A_UTILS_THREAD_PRIORITY_HIGH   0.625
 high thread priority
 
#define A_UTILS_THREAD_PRIORITY_HIGHEST   0.75
 very high thread priority
 
#define A_UTILS_THREAD_PRIORITY_TIME_CRITICAL   1.0
 highest thread priority
 

Typedefs

typedef std::vector< bool > tCpuAffinityMask
 Container for a CPU Affinity mask.
 

Enumerations

enum class  tSchedulingClass : tUInt32 { Default = 0 , Normal = 1 , RealTime = 2 }
 Enum for different scheduling schemes. More...
 

Functions

std::thread::native_handle_type get_native_handle_of_this_thread ()
 Get the native handle for the current thread. More...
 
tResult set_priority (std::thread::native_handle_type oThreadHandle, tSchedulingClass eSchedulingClass, tFloat64 fPriority)
 Sets the priority of a thread. More...
 
tResult get_priority (std::thread::native_handle_type oThreadHandle, tSchedulingClass &eSchedulingClass, tFloat64 &fPriority)
 Gets the priority of a thread. More...
 
tResult set_cpu_affinity (std::thread::native_handle_type oThreadHandle, const tCpuAffinityMask &oCpuAffinity)
 Sets the CPU affinity of a thread. More...
 
tResult get_cpu_affinity (std::thread::native_handle_type oThreadHandle, tCpuAffinityMask &oCpuAffinity)
 Gets the CPU affinity of a thread. More...
 
tResult set_scheduling (std::thread::native_handle_type oThreadHandle, const tSchedulingParameters &sScheduling)
 Sets the scheduling parameters of a thread. More...
 
tResult get_scheduling (const std::thread::native_handle_type &oThreadHandle, tSchedulingParameters &sScheduling)
 Gets the scheduling parameters of a thread. More...
 
template<typename Callable , typename ... Args>
void run_with_scheduling (tSchedulingParameters sScheduling, Callable &&pFunc, Args &&... args)
 Sets the given scheduling paremeters and executes the given method afterwards. More...
 
template<typename Callable , typename ... Args>
void run_with_checked_scheduling (tSchedulingParameters sScheduling, Callable &&pFunc, Args &&... args)
 Sets the given scheduling paremeters and executes the given method afterwards only if the scheduling paramaters have been set successfully. More...
 
tResult create_thread_with_scheduling_impl (std::thread &oThread, const tSchedulingParameters &sScheduling, std::function< void()> pFunc)
 For internal use only.
 
template<typename Callable , typename ... Args>
tResult create_thread_with_scheduling (std::thread &oThread, const tSchedulingParameters &sScheduling, Callable &&pFunc, Args &&... args)
 Creates a new thread that has the given scheduling parameters. More...
 
template<typename Callable , typename ... Args>
std::thread create_thread_with_scheduling (const tSchedulingParameters &sScheduling, Callable &&pFunc, Args &&... args)
 Creates a new thread that has the given scheduling parameters. More...
 

Detailed Description

Copyright © Audi Electronics Venture GmbH.

All rights reserved

Definition in file thread_parameter.h.