SourcePro® API Reference Guide

 
List of all members | Public Member Functions | Static Public Member Functions | Related Functions
RWThreadAttribute Class Reference

Encapsulates a set of attributes that define or control thread scheduling and stack allocation. More...

#include <rw/thread/RWThreadAttribute.h>

Inheritance diagram for RWThreadAttribute:
RWHandleBase

Public Member Functions

 RWThreadAttribute ()
 
 RWThreadAttribute (RWStaticCtor)
 
 RWThreadAttribute (const RWThreadAttribute &second)
 
 ~RWThreadAttribute ()
 
bool canGetConcurrencyPolicy () const
 
bool canGetContentionScope () const
 
bool canGetInheritancePolicy () const
 
bool canGetPriority () const
 
bool canGetProcessScopePriority () const
 
bool canGetSchedulingPolicy () const
 
bool canGetStackCommitSize () const
 
bool canGetStackGuardSize () const
 
bool canGetStackReserveSize () const
 
bool canGetStartPolicy () const
 
bool canGetSystemScopePriority () const
 
bool canGetTimeSliceQuantum () const
 
bool canGetUserStack () const
 
bool canSetConcurrencyPolicy (RWConcurrencyPolicy policy) const
 
bool canSetContentionScope (RWContentionScope scope) const
 
bool canSetInheritancePolicy (RWInheritancePolicy policy) const
 
bool canSetPriority () const
 
bool canSetProcessScopePriority () const
 
bool canSetSchedulingPolicy (RWSchedulingPolicy policy) const
 
bool canSetStackCommitSize () const
 
bool canSetStackGuardSize () const
 
bool canSetStackReserveSize () const
 
bool canSetStartPolicy (RWStartPolicy policy) const
 
bool canSetSystemScopePriority () const
 
bool canSetTimeSliceQuantum () const
 
bool canSetUserStack () const
 
void copy (const RWThreadAttribute &second)
 
RWConcurrencyPolicy getConcurrencyPolicy () const
 
RWContentionScope getContentionScope () const
 
RWInheritancePolicy getInheritancePolicy () const
 
RWPriority getMaxPriority () const
 
RWPriority getMaxProcessScopePriority () const
 
RWPriority getMaxSystemScopePriority () const
 
unsigned long getMaxTimeSliceQuantum () const
 
RWPriority getMinPriority () const
 
RWPriority getMinProcessScopePriority () const
 
RWPriority getMinSystemScopePriority () const
 
unsigned long getMinTimeSliceQuantum () const
 
RWPriority getPriority () const
 
RWPriority getProcessScopePriority () const
 
RWSchedulingPolicy getSchedulingPolicy () const
 
size_t getStackCommitSize () const
 
size_t getStackGuardSize () const
 
size_t getStackReserveSize () const
 
RWStartPolicy getStartPolicy () const
 
RWPriority getSystemScopePriority () const
 
unsigned long getTimeSliceQuantum () const
 
void * getUserStackAddress () const
 
size_t getUserStackSize () const
 
bool isConcurrencyPolicySet () const
 
bool isContentionScopeSet () const
 
bool isEqual (const RWThreadAttribute &second) const
 
bool isInheritancePolicySet () const
 
bool isPrioritySet () const
 
bool isProcessScopePrioritySet () const
 
bool isSchedulingPolicySet () const
 
bool isStackCommitSizeSet () const
 
bool isStackGuardSizeSet () const
 
bool isStackReserveSizeSet () const
 
bool isStartPolicySet () const
 
bool isSystemScopePrioritySet () const
 
bool isTimeSliceQuantumSet () const
 
bool isUserStackSet () const
 
RWThreadAttributeoperator= (const RWThreadAttribute &second)
 
void resetConcurrencyPolicy ()
 
void resetContentionScope ()
 
void resetInheritancePolicy ()
 
void resetPriority ()
 
void resetProcessScopePriority ()
 
void resetSchedulingPolicy ()
 
void resetStackCommitSize ()
 
void resetStackGuardSize ()
 
void resetStackReserveSize ()
 
void resetStartPolicy ()
 
void resetSystemScopePriority ()
 
void resetTimeSliceQuantum ()
 
void resetUserStack ()
 
void setConcurrencyPolicy (RWConcurrencyPolicy policy)
 
void setContentionScope (RWContentionScope scope)
 
void setInheritancePolicy (RWInheritancePolicy policy)
 
void setPriority (RWPriority priority)
 
void setProcessScopePriority (RWPriority priority)
 
void setSchedulingPolicy (RWSchedulingPolicy policy)
 
void setStackCommitSize (size_t size)
 
void setStackGuardSize (size_t size)
 
void setStackReserveSize (size_t size)
 
void setStartPolicy (RWStartPolicy policy)
 
void setSystemScopePriority (RWPriority priority)
 
void setTimeSliceQuantum (unsigned long milliseconds)
 
void setUserStack (void *address, size_t size)
 
- Public Member Functions inherited from RWHandleBase
bool isValid (void) const
 
bool operator!= (const RWHandleBase &second) const
 
bool operator< (const RWHandleBase &second) const
 
bool operator== (const RWHandleBase &second) const
 

Static Public Member Functions

static size_t getMinStackSize ()
 

Related Functions

(Note that these are not member functions.)

typedef int RWPriority
 
typedef pri_t RWPriority
 
typedef int RWPriority
 

Additional Inherited Members

- Protected Member Functions inherited from RWHandleBase
 RWHandleBase (void)
 
 RWHandleBase (RWStaticCtor)
 
 RWHandleBase (RWBodyBase *body)
 
 RWHandleBase (const RWHandleBase &second)
 
 ~RWHandleBase (void)
 
RWBodyBasebody (void) const
 
RWHandleBaseoperator= (const RWHandleBase &second)
 

Detailed Description

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 that query 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.

Public Member Functions (by group)

The bulk of the public member functions for this class are divided into six groups:

Feature Test Macros

The following macros, defined in rw/thread/RWThreadAttribute.h, 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 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.

Example
#include <rw/thread/RWRunnableSelf.h>
#include <rw/thread/RWThreadAttribute.h>
#include <rw/thread/RWThreadFunction.h>
#include <rw/thread/RWThreadSelf.h>
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
// Is the contention scope attribute available?
if (attr.canGetContentionScope()) {
// Yes, then get the scope used to create the thread
switch (cscope) {
std::cout << "Process Scope" << std::endl;
break;
std::cout << "System Scope" << std::endl;
break;
default:
std::cout << "Unexpected value for contention scope"
<< std::endl;
}
}
else {
std::cout << "Contention scope is not supported" << std::endl;
}
}
}
int main()
{
RWThread t1 = RWThreadFunction::make(checkContentionScope);
std::cout << "Default: " << std::flush;
t1.start();
t1.join();
// Is the desired contention scope policy supported?
}
else
std::cout << "Unable to set contention scope to \"System\""
<< std::endl;
t1.setAttribute(attr);
std::cout << "Set: " << std::flush;
t1.start();
t1.join();
t1.setAttribute(attr);
std::cout << "Reset: " << std::flush;
t1.start();
t1.join();
return 0;
}

OUTPUT (Solaris):

Default: Process Scope
Set: System Scope
Reset: Process Scope
See also
RWThread, RWThreadSelf

Constructor & Destructor Documentation

RWThreadAttribute::RWThreadAttribute ( )

Default constructor.

RWThreadAttribute::RWThreadAttribute ( RWStaticCtor  )
inline

Constructs a global static instance that is initialized upon first use. If the object is used before this constructor is called, any set values are not overridden.

RWThreadAttribute::RWThreadAttribute ( const RWThreadAttribute second)
inline

Copy constructor.

RWThreadAttribute::~RWThreadAttribute ( )
inline

Destructor.

Member Function Documentation

bool RWThreadAttribute::canGetConcurrencyPolicy ( ) const

Determines at runtime whether the value of the concurrency attribute may be read. 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.

Returns true if the value of the concurrency attribute has not yet been set using the function setConcurrencyPolicy(), indicating that a default value is available and may be read.

Always returns true if the concurrency attribute retains the value defined by a previous call to 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. 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.

Returns true if the value of the contention scope attribute has not yet been set using the function setContentionScope(), indicating that a default value is available and may be read.

Always returns true if contention scope attribute retains the value defined by a previous call to 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 the inheritance attribute may be read. 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.

Returns true if the value of the inheritance attribute has not yet been set using the function setInheritancePolicy(), indicating that a default value is available and may be read.

Always returns true if the inheritance attribute retains the value defined by a previous call to 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 the priority attribute may be read. 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.

Returns true if the value of the priority attribute has not yet been set using the function setPriority(), indicating that a default value is available and may be read.

Always returns true if the priority attribute retains the value defined by a previous call to 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. 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.

Returns true if the value of the process scope attribute has not yet been set using the function setProcessScopePriority(), indicating that a default value is available and may be read.

Always returns true if the process scope attribute retains the value defined by a previous call to 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 the scheduling attribute may be read. 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.

Returns true if the value of the scheduling attribute has not yet been set using the function setSchedulingPolicy(), indicating that a default value is available and may be read.

Always returns true if the scheduling attribute retains the value defined by a previous call to 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 the stack commit size attribute may be read. 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.

Returns true if the value of the stack commit size attribute has not yet been set using the function setStackCommitSize(), indicating that a default value is available and may be read.

Always returns true if the stack commit size attribute retains the value defined by a previous call to 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 the stack guard size attribute may be read. 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.

Returns true if the value of the stack guard size attribute has not yet been set using the function setStackGuardSize(), indicating that a default value is available and may be read.

Always returns true if the stack guard size attribute retains the value defined by a previous call to 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 the stack reserve size attribute may be read. 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.

Returns true if the value of the stack reserve size attribute has not yet been set using the function setStackReserveSize(), indicating that a default value is available and may be read.

Always returns true if stack reserve size attribute retains the value defined by a previous 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 the start attribute may be read. 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.

Returns true if the value of the start attribute has not yet been set using the function setStartPolicy(), indicating that a default value is available and may be read.

Always returns true if the start attribute retains the value defined by a previous call to 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 the system scope priority attribute may be read. 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.

Returns true if the value of the system scope priority attribute has not yet been set using the function setSystemScopePriority(), indicating that a default value is available and may be read.

Always returns true if the system scope priority attribute retains the value defined by a previous 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 the time slice quantum attribute may be read. 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.

Returns true if the value of the time slice quantum attribute has not yet been set using the function setTimeSliceQuantum(), indicating that a default value is available and may be read.

Always returns true if the time slice quantum attribute retains the value defined by a previous call to 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 the user stack attribute may be read. 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.

Returns true if the value of the user stack attribute has not yet been set using the function setUserStack(), indicating that a default value is available and may be read.

Always returns true if the user stack attribute retains the value defined by a previous call to 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 "canSetXxx()" 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 the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWContentionScope RWThreadAttribute::getContentionScope ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWInheritancePolicy RWThreadAttribute::getInheritancePolicy ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWPriority RWThreadAttribute::getMaxPriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

RWPriority RWThreadAttribute::getMaxProcessScopePriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

RWPriority RWThreadAttribute::getMaxSystemScopePriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

unsigned long RWThreadAttribute::getMaxTimeSliceQuantum ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

RWPriority RWThreadAttribute::getMinPriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

RWPriority RWThreadAttribute::getMinProcessScopePriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

static size_t RWThreadAttribute::getMinStackSize ( )
static

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError.

RWPriority RWThreadAttribute::getMinSystemScopePriority ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

unsigned long RWThreadAttribute::getMinTimeSliceQuantum ( ) const

Use the "getXxx"() functions to determine the legal range of values for various attributes.

Can throw exceptions RWTHROperationNotSupported, RWTHRInternalError and RWTHROperationNotAvailable.

RWPriority RWThreadAttribute::getPriority ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWPriority RWThreadAttribute::getProcessScopePriority ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWSchedulingPolicy RWThreadAttribute::getSchedulingPolicy ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

size_t RWThreadAttribute::getStackCommitSize ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

size_t RWThreadAttribute::getStackGuardSize ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

size_t RWThreadAttribute::getStackReserveSize ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWStartPolicy RWThreadAttribute::getStartPolicy ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

RWPriority RWThreadAttribute::getSystemScopePriority ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

unsigned long RWThreadAttribute::getTimeSliceQuantum ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

void* RWThreadAttribute::getUserStackAddress ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

size_t RWThreadAttribute::getUserStackSize ( ) const

Use the "getXxx()" functions to query the default value of an attribute, if available, or the last value defined in a call to the matching "setXxx()" function.

These functions throw an RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw an RWTHROperationNotAvailable exception if the corresponding attribute is supported but has not yet been defined by a call to the matching "setXxx()" function, and no default value is available under the current circumstances. Other possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isConcurrencyPolicySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isContentionScopeSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

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()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isPrioritySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isProcessScopePrioritySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isSchedulingPolicySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isStackCommitSizeSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isStackGuardSizeSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isStackReserveSizeSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isStartPolicySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isSystemScopePrioritySet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isTimeSliceQuantumSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

bool RWThreadAttribute::isUserStackSet ( ) const

The "isXxxSet()" functions determine whether the corresponding attribute still has the value specified in an earlier call to the matching "setXxx()" 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 another default value in response to a change in a related attribute. Otherwise, returns true.

Possible exceptions include RWTHRInternalError.

RWThreadAttribute & RWThreadAttribute::operator= ( const RWThreadAttribute second)
inline

Assignment operator.

void RWThreadAttribute::resetConcurrencyPolicy ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetContentionScope ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetInheritancePolicy ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetPriority ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetProcessScopePriority ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetSchedulingPolicy ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetStackCommitSize ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetStackGuardSize ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetStackReserveSize ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetStartPolicy ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetSystemScopePriority ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetTimeSliceQuantum ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::resetUserStack ( )

The "resetXxx()" functions restore an attribute value to its default setting, if any. These functions always succeed, even if the target attribute is not supported in the current environment. Several combinations of attributes and environments exist in which it is not possible to query for a default value of an attribute. In these cases, the functions simply clear any previous setting so that the Threads Module relies instead on the underlying API to determine the appropriate default value.

Possible exceptions include RWTHRInternalError and RWTHROperationNotSupported.

void RWThreadAttribute::setConcurrencyPolicy ( RWConcurrencyPolicy  policy)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setContentionScope ( RWContentionScope  scope)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setInheritancePolicy ( RWInheritancePolicy  policy)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setPriority ( RWPriority  priority)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setProcessScopePriority ( RWPriority  priority)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setSchedulingPolicy ( RWSchedulingPolicy  policy)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setStackCommitSize ( size_t  size)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setStackGuardSize ( size_t  size)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setStackReserveSize ( size_t  size)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setStartPolicy ( RWStartPolicy  policy)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setSystemScopePriority ( RWPriority  priority)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setTimeSliceQuantum ( unsigned long  milliseconds)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

void RWThreadAttribute::setUserStack ( void *  address,
size_t  size 
)

Use the "setXxx()" functions to set the corresponding attribute.

These functions throw the RWTHROperationNotSupported exception if the attribute is not supported in the current environment. They throw the RWTHROperationNotAvailable exception if the corresponding attribute is supported, but the specified value is not supported under the current circumstances. Other possible exceptions include RWTHRBoundsError, RWTHROperationNotAvailable, RWTHROperationNotSupported, and RWTHRInternalError.

Friends And Related Function Documentation

typedef int RWPriority
related

The internal thread priority representation.

Condition:
This type is used for build configurations based on POSIX threads.
typedef pri_t RWPriority
related

The internal thread priority representation.

Condition:
This type is used for build configurations based on Solaris threads.
typedef int RWPriority
related

The internal thread priority representation.

Condition:
This type is used for build configurations based on Win32 threads.

Copyright © 2022 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.