pthread_attr_setschedparam.txt

来自「Pthread lib库完整说明文档」· 文本 代码 · 共 81 行

TXT
81
字号
           --------------------------------------------------------------------------------AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume                                       1--------------------------------------------------------------------------------pthread_attr_setschedparam SubroutinePurposeSets the value of the schedparam attribute of a thread attributes object.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>#include <sys/sched.h>int pthread_attr_setschedparam (attr, schedparam)pthread_attr_t *attr;const struct sched_param *schedparam;DescriptionThe pthread_attr_setschedparam subroutine sets the value of the schedparamattribute of the thread attributes object attr. The schedparam attributespecifies the scheduling parameters of a thread created with this attributesobject. The sched_priority field of the sched_param structure contains thepriority of the thread.    Note: The pthread.h header file must be the first included file of each    source file using the threads library. Otherwise, the -D_THREAD_SAFE    compilation flag should be used, or the cc_r compiler used. In this case, the    flag is automatically set.Parametersattr Specifies the thread attributes object.schedparam Points to where the scheduling parameters to set are stored. Thesched_priority field must be in the range from 1 to 127, where 1 is the leastfavored priority, and 127 the most favored.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error code is returned.Error CodesThe pthread_attr_setschedparam subroutine is unsuccessful if the following istrue:EINVAL The attr parameter is not valid.ENOSYS The priority scheduling POSIX option is not implemented.ENOTSUP The value of the schedparam attribute is not supported.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_attr_getschedparam subroutine, pthread_attr_init subroutine,pthread_create subroutine, the pthread.h file.Threads Scheduling in AIX Version 4.3 General Programming Concepts: Writing andDebugging Programs.Threads Library Options and Threads Library Quick Reference in AIX Version 4.3General Programming Concepts: Writing and Debugging Programs.--------------------------------------------------------------------------------           

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?