⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 pthread_attr_setstacksize.txt

📁 Pthread lib库完整说明文档
💻 TXT
字号:
           --------------------------------------------------------------------------------AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume                                       1--------------------------------------------------------------------------------pthread_attr_setstacksize SubroutinePurposeSets the value of the stacksize attribute of a thread attributes object.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_attr_setstacksize (attr, stacksize)pthread_attr_t *attr;size_t stacksize;DescriptionThe pthread_attr_setstacksize subroutine sets the value of the stacksizeattribute of the thread attributes object attr. This attribute specifies theminimum stack size, in bytes, of a thread created with this attributes object.The allocated stack size is always a multiple of 8K bytes, greater or equal tothe required minimum stack size of 56K bytes (PTHREAD_STACK_MIN). The followingformula is used to calculate the allocated stack size: if the required stack sizeis lower than 56K bytes, the allocated stack size is 56K bytes; otherwise, if therequired stack size belongs to the range from (56 + (n - 1) * 16) K bytes to (56+ n * 16) K bytes, the allocated stack size is (56 + n * 16) K bytes.    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.stacksize Specifies the minimum stack size, in bytes, to set. The default stacksize is PTHREAD_STACK_MIN. The minimum stack size should be greater or equal thanthis value.Return ValuesUpon successful completion, 0 is returned. Otherwise, an error code is returned.Error CodesThe pthread_attr_setstacksize subroutine is unsuccessful if the following istrue:EINVAL The attr parameter is not valid, or the value of the stacksize parameterexceeds a system imposed limit.ENOSYS The stack size POSIX option is not implemented.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_attr_getstacksize subroutine, pthread_attr_init subroutine,pthread_create subroutine, the pthread.h file.Advanced Attributes 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -