mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Add pthread_testcancel(), pthread_testcancel(), and definitiions for cancellation types.
This commit is contained in:
+7
-1
@@ -115,11 +115,16 @@
|
||||
|
||||
#define PTHREAD_DEFAULT_PRIORITY 100
|
||||
|
||||
/* Cancellation states returned by pthread_cancelstate() */
|
||||
/* Cancellation states used by pthread_setcancelstate() */
|
||||
|
||||
#define PTHREAD_CANCEL_ENABLE (0)
|
||||
#define PTHREAD_CANCEL_DISABLE (1)
|
||||
|
||||
/* Cancellation types used by pthread_setcanceltype() */
|
||||
|
||||
#define PTHREAD_CANCEL_DEFERRED (0)
|
||||
#define PTHREAD_CANCEL_ASYNCHRONOUS (1)
|
||||
|
||||
/* Thread return value when a pthread is canceled */
|
||||
|
||||
#define PTHREAD_CANCELED ((FAR void*)ERROR)
|
||||
@@ -340,6 +345,7 @@ int pthread_detach(pthread_t thread);
|
||||
void pthread_exit(pthread_addr_t value) noreturn_function;
|
||||
int pthread_cancel(pthread_t thread);
|
||||
int pthread_setcancelstate(int state, FAR int *oldstate);
|
||||
int pthread_setcanceltype(int type, FAR int *oldtype);
|
||||
void pthread_testcancel(void);
|
||||
|
||||
/* A thread may set up cleanup functions to execut when the thread exits or
|
||||
|
||||
Reference in New Issue
Block a user