Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Threads Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWThreadAttribute

Module:  Threads   Package:  Threading


RWThreadAttribute RWHandleBase

Local Index

Members

Non-Members

Header File

#include <rw/thread/RWThreadAttribute.h> 

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

Example

Global Enumerations

enum RWConcurrencyPolicy 
enum RWContentionScope 
enum RWInheritancePolicy 
enum RWSchedulingPolicy {
enum RWStartPolicy {

Global Typedefs

typedef int   RWPriority;     // POSIX, Win32
typedef pri_t RWPriority;     // SOLARIS

Feature Test Macros

RW_THR_HAS_CONCURRENCY_POLICY
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_GUARD_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
RW_THR_HAS_DUAL_PRIORITY
RW_THR_HAS_PARTIAL_STACK_COMMITMENT

Public Constructors

RWThreadAttribute();
RWThreadAttribute(RWStaticCtor);
RWThreadAttribute(const RWThreadAttribute& second)

Public Destructor

~RWThreadAttribute();

Public Member Functions

void
copy(const RWThreadAttribute& second);
bool
isEqual(const RWThreadAttribute& second) const;

Public Member Functions (by group)

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

Public Member Operator

RWThreadAttribute&
operator=(const RWThreadAttribute& second);

canGet Functions

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;

canSet Functions

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;

get Functions

RWConcurrencyPolicy
getConcurrencyPolicy() const;

RWContentionScope 
getContentionScope() const;

RWInheritancePolicy
getInheritancePolicy() 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;

getMax getMin Functions

RWPriority
getMaxPriority() const;

RWPriority
getMaxProcessScopePriority() const;

RWPriority
getMaxSystemScopePriority() const;

unsigned long
getMaxTimeSliceQuantum() const;

RWPriority
getMinPriority() const;

RWPriority
getMinProcessScopePriority() const;

static
size_t
getMinStackSize();

RWPriority
getMinSystemScopePriority() const;

unsigned long
getMinTimeSliceQuantum() const;

isXxxSet Functions

bool
isConcurrencyPolicySet() const;

bool
isContentionScopeSet() 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;

reset Functions

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();

set Functions

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);

See Also

RWThread, RWThreadSelf



Previous fileTop of DocumentContentsIndex pageNext file

© 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.