?? pthread_setcancelstate.txt
字號:
pthread_setcancelstate SubroutinePurposeSets the calling thread's cancelability state.LibraryThreads Library (libpthreads.a)Syntax#include <pthread.h>int pthread_setcancelstate (state, oldstate)int state;int *oldstate;DescriptionThe pthread_setcancelstate subroutine sets the calling thread's cancelabilitystate to state. It also returns the previous cancellability state.The cancelability state specifies whatever a thread can be canceled.Note: The pthread.h header file must be the first included file ofeach source file using the threads library.Parametersstate Specifies the new cancelability state to set. It must have oneof the following values:PTHREAD_CANCEL_DISABLE Disables cancelability; the thread is not cancelable.Cancellation requests are held pending.PTHREAD_CANCEL_ENABLE Enables cancelability; the thread is cancelable,according to its cancelability type. This is the default value.oldstate Points to where the previous cancelability state value willbe stored.Return ValuesUpon successful completion, the previous value of the cancelabilitystate is returned via the oldstate parameter, and 0 is returned. Otherwise,an error code is returned.Error CodesThe pthread_setcancelstate subroutine is unsuccessful if the followingis true:EINVAL The value of the state parameter is not valid.Implementation SpecificsThis subroutine is part of the Base Operating System (BOS) Runtime.Related InformationThe pthread_cancel subroutine, pthread_setcanceltype subroutine, pthread_testcancelsubroutine.Terminating Threads.Threads Library Quick Reference.
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -