pthread_attr_getschedpolicy.txt

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

TXT
81
字号
pthread_attr_getschedpolicy SubroutinePurposeReturns the value of the schedpolicy attribute of a thread attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_getschedpolicy (attr, schedpolicy)const pthread_attr_t *attr;int *schedpolicy;DescriptionThe pthread_attr_getschedpolicy subroutine returns the value of theschedpolicy attribute of the thread attributes object attr. This attributespecifies the scheduling policy of a thread created with this attributesobject. It may have one of the following values:SCHED_FIFO	Denotes fixed priority first-in first-out scheduling.SCHED_RR	Denotes fixed prioity round-robin scheduling.SCHED_OTHER	Denotes the default AIX scheduling policy. It is the defaultvalue.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.schedpolicy	Points to where the schedpolicy attribute value will bestored.Return ValuesUpon successful completion, the value of the schedpolicy attributeis returned via the schedpolicy parameter, and 0 is returned. Otherwise,an error code is returned.Error CodesThe pthread_attr_getschedpolicy subroutine is unsuccessful if thefollowing is true:EINVAL	The attr parameter is not valid.ENOSYS	The priority scheduling POSIX option is not implemented.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.Related InformationThe pthread_attr_setschedpolicy subroutine, pthread_attr_init subroutine,pthread_getschedparam subroutine.Threads Scheduling.Threads Library Options and Threads Library Quick Reference.

⌨️ 快捷键说明

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