summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/cancel.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/posix/include/rtems/posix/cancel.h')
-rw-r--r--cpukit/posix/include/rtems/posix/cancel.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/cancel.h b/cpukit/posix/include/rtems/posix/cancel.h
new file mode 100644
index 0000000000..6e6b32a71c
--- /dev/null
+++ b/cpukit/posix/include/rtems/posix/cancel.h
@@ -0,0 +1,62 @@
+/**
+ * @file rtems/posix/cancel.h
+ *
+ * This file contains the prototypes and data types used to implement
+ * POSIX thread cancelation.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2009.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ *
+ * $Id$
+ */
+
+#ifndef _RTEMS_POSIX_CANCEL_H
+#define _RTEMS_POSIX_CANCEL_H
+
+#include <rtems/posix/threadsup.h>
+
+/**
+ * This structure is used to manage the cancelation handlers.
+ */
+typedef struct {
+ /** This field is the Chain Node so we can put these on lists. */
+ Chain_Node Node;
+ /** This field is the cancelation routine. */
+ void (*routine)( void * );
+ /** This field is the argument to the cancelation routine. */
+ void *arg;
+} POSIX_Cancel_Handler_control;
+
+/**
+ * @brief _POSIX_Threads_cancel_run
+ *
+ * This support routine runs through the chain of cancel handlers that
+ * have been registered and executes them.
+ *
+ * @param[in] the_thread is the thread whose cancelation handlers
+ * should be run
+ */
+void _POSIX_Threads_cancel_run(
+ Thread_Control *the_thread
+);
+
+/**
+ * @brief _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch
+ *
+ * This routine separates a piece of code that existed as part of
+ * another routine, but had to be separated to improve coverage.
+ *
+ * @param[in] the_thread is the thread to evaluate canceling
+ */
+void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch (
+ Thread_Control *the_thread
+);
+
+#endif
+/* end of include file */