SourcePro 11.1 |
SourcePro® C++ API Reference Guide |
SourcePro C++ Documentation Home |
Encapsulates a set of attributes that define or control thread scheduling and stack allocation. More...
#include <rw/thread/RWThreadAttribute.h>
Class RWThreadAttribute encapsulates a set of attributes that define or control thread scheduling and stack allocation. By supplying an instance of this class to a thread object such as an RWThread you can configure the behavior of each new thread that you create. You can also use an RWThreadAttribute to retrieve the default values for the current environment and query the current environment as to which attributes may be legally retrieved and set under the current circumstances. This class also provides functions for querying the minimum and maximum allowable values for the various attributes. Please see the Threads Module User's Guide and the Threads Module Platform User's Guide for a complete discussion of thread attributes.
The bulk of the public member functions for this class are divided into 6 groups:
"canGet"
functions determine whether an attribute value can be read."canSet"
functions determine whether an attribute value can be set."get"
functions return an attribute value."isXxxSet"
functions determine whether an attribute has maintained its previously set value."reset"
functions restore an attribute to its default setting."set"
functions set an attribute value.The following macros, defined in defs.h, are used to indicate whether the corresponding attribute is supported in the current environment. If the macro is NOT defined, attempts to get or set the corresponding attribute will produce exceptions. If the macro IS defined, the current environment has some level of support for the attribute, and MAY allow you to get or set the attribute value.
RW_THR_HAS_CONTENTION_SCOPE
RW_THR_HAS_INHERITANCE_POLICY
RW_THR_HAS_PRIORITY
RW_THR_HAS_PROCESS_SCOPE_PRIORITY
RW_THR_HAS_SCHEDULING_POLICY
RW_THR_HAS_STACK_COMMIT_SIZE
RW_THR_HAS_STACK_RESERVE_SIZE
RW_THR_HAS_START_POLICY
RW_THR_HAS_SYSTEM_SCOPE_PRIORITY
RW_THR_HAS_TIME_SLICE_QUANTUM
RW_THR_HAS_USER_STACK
These macros, defined in rw/thr/defs.h, are used to indicate whether the corresponding attribute is supported in the current environment. If the macro is not defined, attempts to get or set the corresponding attribute will produce exceptions. If the macro is defined, the current environment has some level of support for the attribute, and may allow you to get or set the attribute value.
RW_THR_HAS_DUAL_PRIORITY
This macro is used to indicate when the underlying system requires two priorities for threads with system contention scope; one priority value for use in resolving system-level scheduling conflicts, and a second priority value for use in resolving contention for synchronization resources that are shared between threads in a process.
RW_THR_HAS_PARTIAL_STACK_COMMITMENT
This macro indicates that the underlying system allows partial stack commitment, meaning the stack commit size may be set to a value less that the stack reserve size. If this macro is not defined, then the stack reserve size and stack commit size attributes are mutually exclusive and only one or the other may be set.
#include <rw/thread/RWThreadAttribute.h> // for RWThreadAttribute #include <rw/thread/RWRunnableSelf.h> // for rwThread() #include <rw/thread/rwtMakeThreadFunction.h> // for rwtMakeThreadFunction() void checkContentionScope(void) { RWThreadSelf me = rwThread(); // Was this thread created by a Threading package class? if (me.isValid()) { // Get the attribute instance used to create the thread RWThreadAttribute attr = me.getActiveAttribute(); // Is the contention scope attribute available? if (attr.canGetContentionScope()) { // Yes, then get the scope used to create the thread RWContentionScope cscope = attr.getContentionScope(); switch (cscope) { case RW_THR_PROCESS_SCOPE: cout << "Process Scope" << endl; break; case RW_THR_SYSTEM_SCOPE: cout << "System Scope" << endl; break; default: cout << "Unexpected value for contention scope" << endl; } } else cout << "Contention scope is not supported" << endl; } } int main() { RWThread t1 = rwtMakeThreadFunction(checkContentionScope); cout << "Default: " << flush; t1.start(); t1.join(); RWThreadAttribute attr; // Is the desired contention scope policy supported? if (attr.canSetContentionScope(RW_THR_SYSTEM_SCOPE)) attr.setContentionScope(RW_THR_SYSTEM_SCOPE); else cout << "Unable to set contention scope to \"System\"" << endl; t1.setAttribute(attr); cout << "Set: " << flush; t1.start(); t1.join(); attr.resetContentionScope(); t1.setAttribute(attr); cout << "Reset: " << flush; t1.start(); t1.join(); return 0; } Program output (Solaris): Default: Process Scope Set: System Scope Reset: Process Scope
RWThreadAttribute::RWThreadAttribute | ( | ) |
Default constructor.
RWThreadAttribute::RWThreadAttribute | ( | RWStaticCtor | ) | [inline] |
Constructs a global static instance. The object will be initialized upon first use, and if the object is used before this constructor is called, any set values will not be overridden.
RWThreadAttribute::RWThreadAttribute | ( | const RWThreadAttribute & | second | ) | [inline] |
Copy constructor.
RWThreadAttribute::~RWThreadAttribute | ( | ) | [inline] |
Destructor.
RWThreadAttributeImp& RWThreadAttribute::body | ( | void | ) | const [protected] |
Gets a reference for the body instance, if any.
RWTHRInvalidPointer | Thrown if this handle is not attached to a body. |
Reimplemented from RWHandleBase.
bool RWThreadAttribute::canGetConcurrencyPolicy | ( | ) | const |
Determines at runtime whether the value of concurrency attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getConcurrencyPolicy() cannot return a legal value under current circumstances.
If the value of the concurrency attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if concurrency attribute still has the value previously defined by a call to the function setConcurrencyPolicy(). In this case the behavior is similar to that provided by the function isConcurrencyPolicySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetContentionScope | ( | ) | const |
Determines at runtime whether the value of contention scope attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getContentionScope() cannot return a legal value under current circumstances.
If the value of the contention scope attribute has not yet been "set"
,then a return value of true
indicates that a default value is available and may be read.
Always returns true
if contention scope attribute still has the value previously defined by a call to the function setContentionScope(). In this case the behavior is similar to that provided by the function isContentionScopeSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetInheritancePolicy | ( | ) | const |
Determines at runtime whether the value of inheritance attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getInheritancePolicy() cannot return a legal value under current circumstances.
If the value of the inheritance attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if inheritance attribute still has the value previously defined by a call to the function setInheritancePolicy(). In this case the behavior is similar to that provided by the function isInheritancePolicySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetPriority | ( | ) | const |
Determines at runtime whether the value of priority attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getPriority() cannot return a legal value under current circumstances.
If the value of the priority attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if priority attribute still has the value previously defined by a call to the function setPriority(). In this case the behavior is similar to that provided by the function isPrioritySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetProcessScopePriority | ( | ) | const |
Determines at runtime whether the value of process scope attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getProcessScopePriority() cannot return a legal value under current circumstances.
If the value of the process scope attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if process scope attribute still has the value previously defined by a call to the function setProcessScopePriority(). In this case the behavior is similar to that provided by the function isProcessScopePrioritySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetSchedulingPolicy | ( | ) | const |
Determines at runtime whether the value of scheduling attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getSchedulingPolicy() cannot return a legal value under current circumstances.
If the value of the scheduling attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if scheduling attribute still has the value previously defined by a call to the function setSchedulingPolicy(). In this case the behavior is similar to that provided by the function isSchedulingPolicySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetStackCommitSize | ( | ) | const |
Determines at runtime whether the value of stack commit size attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getStackCommitSize() cannot return a legal value under current circumstances.
If the value of the stack commit size attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if stack commit size attribute still has the value previously defined by a call to the function setStackCommitSize(). In this case the behavior is similar to that provided by the function isStackCommitSizeSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetStackGuardSize | ( | ) | const |
Determines at runtime whether the value of stack guard size attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getStackGuardSize() cannot return a legal value under current circumstances.
If the value of the stack guard size attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if stack guard size attribute still has the value previously defined by a call to the function setStackGuardSize(). In this case the behavior is similar to that provided by the function isStackGuardSizeSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetStackReserveSize | ( | ) | const |
Determines at runtime whether the value of stack reserve size attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getStackReserveSize() cannot return a legal value under current circumstances.
If the value of the stack reserve size attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if stack reserve size attribute still has the value previously defined by a call to the function setStackReserveSize(). In this case the behavior is similar to that provided by the function isStackReserveSizeSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetStartPolicy | ( | ) | const |
Determines at runtime whether the value of start attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getStartPolicy() cannot return a legal value under current circumstances.
If the value of the start attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if start attribute still has the value previously defined by a call to the function setStartPolicy(). In this case the behavior is similar to that provided by the function isStartPolicySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetSystemScopePriority | ( | ) | const |
Determines at runtime whether the value of system scope priority attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getSystemScopePriority() cannot return a legal value under current circumstances.
If the value of the system scope priority attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if system scope priority attribute still has the value previously defined by a call to the function setSystemScopePriority(). In this case the behavior is similar to that provided by the function isSystemScopePrioritySet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetTimeSliceQuantum | ( | ) | const |
Determines at runtime whether the value of time slice quantum attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getTimeSliceQuantum() cannot return a legal value under current circumstances.
If the value of the time slice quantum attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if time slice quantum attribute still has the value previously defined by a call to the function setTimeSliceQuantum(). In this case the behavior is similar to that provided by the function isTimeSliceQuantumSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canGetUserStack | ( | ) | const |
Determines at runtime whether the value of user stack attribute may be read and returns false
if the attribute is not supported in the current environment, or if the function getUserStackSize() cannot return a legal value under current circumstances.
If the value of the user stack attribute has not yet been "set"
, then a return value of true
indicates that a default value is available and may be read.
Always returns true
if user stack attribute still has the value previously defined by a call to the function setUserStack(). In this case the behavior is similar to that provided by the function isUserStackSet(). Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::canSetConcurrencyPolicy | ( | RWConcurrencyPolicy | policy | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetContentionScope | ( | RWContentionScope | scope | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetInheritancePolicy | ( | RWInheritancePolicy | policy | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetPriority | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetProcessScopePriority | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetSchedulingPolicy | ( | RWSchedulingPolicy | policy | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetStackCommitSize | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetStackGuardSize | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetStackReserveSize | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetStartPolicy | ( | RWStartPolicy | policy | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetSystemScopePriority | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetTimeSliceQuantum | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
bool RWThreadAttribute::canSetUserStack | ( | ) | const |
The "canSet"
test functions determine, at runtime, whether the corresponding attribute value may be set. Each of these functions returns false
if the corresponding attribute is not supported in the current environment or if the specified policy, if any, is not supported under the current circumstances. Otherwise, the function returns true
. All of these functions can throw an RWTHRInternalError exception. In addition, those that take an argument can throw RWTHRBoundsError.
void RWThreadAttribute::copy | ( | const RWThreadAttribute & | second | ) |
Copies the thread attribute values from second.
RWConcurrencyPolicy RWThreadAttribute::getConcurrencyPolicy | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.
These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWContentionScope RWThreadAttribute::getContentionScope | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWInheritancePolicy RWThreadAttribute::getInheritancePolicy | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWPriority RWThreadAttribute::getMaxPriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getMaxProcessScopePriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getMaxSystemScopePriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
unsigned long RWThreadAttribute::getMaxTimeSliceQuantum | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getMinPriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getMinProcessScopePriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
static size_t RWThreadAttribute::getMinStackSize | ( | ) | [static] |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getMinSystemScopePriority | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
unsigned long RWThreadAttribute::getMinTimeSliceQuantum | ( | ) | const |
Use these functions to determine the legal range of values for the various attributes. All of these functions can throw exceptions RWTHROperationNotSupported and RWTHRInternalError. In addition, all of these functions except getMinStackSize() can throw an RWTHROperationNotAvailable exception.
RWPriority RWThreadAttribute::getPriority | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWPriority RWThreadAttribute::getProcessScopePriority | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWSchedulingPolicy RWThreadAttribute::getSchedulingPolicy | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
size_t RWThreadAttribute::getStackCommitSize | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
size_t RWThreadAttribute::getStackGuardSize | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
size_t RWThreadAttribute::getStackReserveSize | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWStartPolicy RWThreadAttribute::getStartPolicy | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
RWPriority RWThreadAttribute::getSystemScopePriority | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
unsigned long RWThreadAttribute::getTimeSliceQuantum | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
void* RWThreadAttribute::getUserStackAddress | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
size_t RWThreadAttribute::getUserStackSize | ( | ) | const |
Use these functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "set"
function.These functions will throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "set"
function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isConcurrencyPolicySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.
Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isContentionScopeSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isEqual | ( | const RWThreadAttribute & | second | ) | const |
Tests the equality of self against second on a value by value basis. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isInheritancePolicySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isPrioritySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isProcessScopePrioritySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isSchedulingPolicySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isStackCommitSizeSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isStackGuardSizeSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isStackReserveSizeSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isStartPolicySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isSystemScopePrioritySet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isTimeSliceQuantumSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
bool RWThreadAttribute::isUserStackSet | ( | ) | const |
The "isXxxSet"
test functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "set"
function.Each of these functions returns false
if the corresponding attribute is not supported in the current environment, has not yet been set, or has been forced to some other default value in response to a change in another related attribute. Otherwise true
is returned. Possible exceptions include RWTHRInternalError.
RWThreadAttribute & RWThreadAttribute::operator= | ( | const RWThreadAttribute & | second | ) | [inline] |
Assignment operator.
void RWThreadAttribute::resetConcurrencyPolicy | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetContentionScope | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetInheritancePolicy | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetPriority | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetProcessScopePriority | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetSchedulingPolicy | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetStackCommitSize | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetStackGuardSize | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetStackReserveSize | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetStartPolicy | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetSystemScopePriority | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetTimeSliceQuantum | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::resetUserStack | ( | ) |
These functions will restore an attribute value to its default setting, if any. These functions will always succeed, even if the target attribute is not supported in the current environment. There are several combinations of attributes and environments where it is not possible to query for a default value of an attribute. In those cases, the functions will simply clear any previous setting so that the Threads Module will know to rely on the underlying API to determine the appropriate default value. Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.
void RWThreadAttribute::setConcurrencyPolicy | ( | RWConcurrencyPolicy | policy | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setContentionScope | ( | RWContentionScope | scope | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setInheritancePolicy | ( | RWInheritancePolicy | policy | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setPriority | ( | RWPriority | priority | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setProcessScopePriority | ( | RWPriority | priority | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setSchedulingPolicy | ( | RWSchedulingPolicy | policy | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setStackCommitSize | ( | size_t | size | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setStackGuardSize | ( | size_t | size | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setStackReserveSize | ( | size_t | size | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setStartPolicy | ( | RWStartPolicy | policy | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setSystemScopePriority | ( | RWPriority | priority | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setTimeSliceQuantum | ( | unsigned long | milliseconds | ) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
void RWThreadAttribute::setUserStack | ( | void * | address, | |
size_t | size | |||
) |
Use these functions to set the corresponding attribute. The functions will throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They will throw the RWTHROperationNotAvaiable exception if the corresponding attribute is supported but the specified value is not supported under the current circumstances. Possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.
typedef int RWPriority [related] |
This is the internal thread priority representation.
typedef pri_t RWPriority [related] |
This is the internal thread priority representation.
typedef int RWPriority [related] |
This is the internal thread priority representation.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.