pthread_attr_setinheritsched.txt
来自「Pthread lib库完整说明文档」· 文本 代码 · 共 81 行
TXT
81 行
pthread_attr_setinheritsched SubroutinePurposeSets the value of the inheritsched attribute of a thread attributesobject.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_setinheritsched (attr, inheritsched)pthread_attr_t *attr;int inheritsched;DescriptionThe pthread_attr_setinheritsched subroutine sets the value of theinheritsched attribute of the thread attributes object attr. Thisattribute specifies the inheritance of scheduling properties for athread 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.inheritsched Specifies the inheritance of scheduling properties toset. It must have one of the following values:PTHREAD_EXPLICIT_SCHED Specifies that the thread will take the schedulingproperties specified in its attribute object.PTHREAD_INHERIT_SCHED Specifies that the thread will inherit the schedulingproperties from its creating thread. This is the default value.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error codeis returned.Error CodesThe pthread_attr_setinheritsched subroutine is unsuccessful if thefollowing is true:EINVAL The attr parameter is not valid.ENOSYS The priority scheduling POSIX option is not implemented.ENOTSUP The value of the inheritsched 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.Related InformationThe pthread_attr_getinheritsched subroutine, pthread_attr_init subroutine,pthread_create subroutine.Threads Scheduling.Threads Library Options and Threads Library Quick Reference.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?