mirror of
https://git.rtems.org/rtems-docs/
synced 2025-07-24 01:19:43 +08:00
posix-users/thread_cancellation.rst: Add Prototypes
Add Prototypes to Thread Cancellation APIs. This work was part of GCI 2018.
This commit is contained in:
parent
5278c7f852
commit
9980ff21a3
@ -55,7 +55,9 @@ pthread_cancel - Cancel Execution of a Thread
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <pthread.h>
|
||||
int pthread_cancel(
|
||||
pthread_t thread
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
@ -81,7 +83,10 @@ pthread_setcancelstate - Set Cancelability State
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <pthread.h>
|
||||
int pthread_setcancelstate(
|
||||
int state,
|
||||
int *oldstate
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
@ -107,7 +112,10 @@ pthread_setcanceltype - Set Cancelability Type
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
#include <pthread.h>
|
||||
int pthread_setcanceltype(
|
||||
int type,
|
||||
int *oldtype
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
@ -133,7 +141,9 @@ pthread_testcancel - Create Cancellation Point
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
int pthread_testcancel(
|
||||
#include <pthread.h>
|
||||
void pthread_testcancel(
|
||||
void
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
@ -159,7 +169,10 @@ pthread_cleanup_push - Establish Cancellation Handler
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
int pthread_cleanup_push(
|
||||
#include <pthread.h>
|
||||
void pthread_cleanup_push(
|
||||
void (*routine)(void*),
|
||||
void *arg
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
@ -185,7 +198,9 @@ pthread_cleanup_pop - Remove Cancellation Handler
|
||||
|
||||
.. code-block:: c
|
||||
|
||||
int pthread_cleanup_push(
|
||||
#include <pthread.h>
|
||||
void pthread_cleanup_pop(
|
||||
int execute
|
||||
);
|
||||
|
||||
**STATUS CODES:**
|
||||
|
Loading…
x
Reference in New Issue
Block a user