?? pthread_attr_setscope.txt
字號:
pthread_attr_setscope SubroutinePurposeSets the value of the contention-scope attribute of a thread attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_setscope (attr, scope)pthread_attr_t *attr;int scope;DescriptionThe pthread_attr_setscope subroutine sets the value of the contention-scopeattribute of the thread attributes object attr. This attribute specifiesthe contention scope of a thread created with this attributes object.Note: The pthread.h header file must be the first included file ofeach source file using the threads library.Parametersattr Specifies the thread attributes object.scope Specifies the contention scope to set. It must have one of thefollowing values:PTHREAD_SCOPE_PROCESS Specifies local contention scope; the threadwill be scheduled against other local contention scope threads inthe same process.PTHREAD_SCOPE_SYSTEM Specifies global contention scope; the threadwill be scheduled against all other threads. This is the default value.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error codeis returned.Error CodesThe pthread_attr_setscope subroutine is unsuccessful if the followingis true:EINVAL The attr parameter is not valid.ENOSYS The priority scheduling POSIX option is not implemented.ENOTSUP The value of the scope parameter is not supported.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.The implementation of this subroutine is dependent on the priorityscheduling POSIX option. The priority scheduling POSIX option is implementedin AIX, but in the current version all threads have system contentionscope; therefore there is no need to use this subroutine, since onlythe scope value of PTHREAD_SCOPE_SYSTEM is supported.Related InformationThe pthread_attr_getscope subroutine, pthread_attr_init subroutine,pthread_create subroutine.Threads Scheduling.Threads Library Options and Threads Library Quick Reference.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -