PLCnext API Documentation 23.6.0.37
ThreadSettings.hpp
1
2//
3// Copyright PHOENIX CONTACT Electronics GmbH
4//
6#pragma once
8namespace Arp { namespace System { namespace Commons { namespace Threading
9{
10
13{
14public: // construction/destruction
15
18 ARP_DEPRECATED("Use constructor with parameters instead. Supply at least a thread name!")
19 ThreadSettings(void);
20
22 ThreadSettings(const String& name, size_t priority = 0, size_t cpuAffinity = 0, size_t stackSize = 0);
23
25 ~ThreadSettings(void) = default;
26
27public: // Fields
28
31
33 size_t Priority;
34
39
41 size_t StackSize;
42};
43
45// inline methods of class ThreadSettings
47 : Name("")
48 , Priority(0)
49 , CpuAffinity(0)
50 , StackSize(0)
51{
52
53}
54
55inline ThreadSettings::ThreadSettings(const String& name, size_t priority, size_t cpuAffinity, size_t stackSize)
56 : Name(name)
57 , Priority(priority)
58 , CpuAffinity(cpuAffinity)
59 , StackSize(stackSize)
60{
61}
62
63
64}}}} // end of namespace Arp::System::Commons::Threading
Container class for adaptable thread settings.
Definition: ThreadSettings.hpp:13
String Name
Name for the thread.
Definition: ThreadSettings.hpp:30
~ThreadSettings(void)=default
Destructs this instance and frees all resources.
size_t CpuAffinity
CPU affinity mask determine which CPU is allowed to run the thread.
Definition: ThreadSettings.hpp:38
ThreadSettings(void)
Deprecated! Constructs an ThreadSettings instance.
Definition: ThreadSettings.hpp:46
size_t Priority
Priority of thread.
Definition: ThreadSettings.hpp:33
size_t StackSize
Bytes-size of requested stack for new thread.
Definition: ThreadSettings.hpp:41
@ System
System components used by the System, Device, Plc or Io domains.
Root namespace for the PLCnext API
class ARP_DEPRECATED("Use Arp::Enum<T> instead.") EnumStrings
Deprecated! The class implements an adapter for enums to define the string literals of the enum entri...
Definition: EnumStrings.hxx:38