summaryrefslogtreecommitdiff
path: root/components/pthreads/pthread_internal.h
diff options
context:
space:
mode:
authorbernard.xiong <[email protected]>2010-11-16 09:54:26 +0000
committerbernard.xiong <[email protected]>2010-11-16 09:54:26 +0000
commitecfc8e76a9a14b470000c0f9bbfd1ee03ecc71bd (patch)
tree8cc78728c14742c2ece4f23e4107b49bbf1f966c /components/pthreads/pthread_internal.h
parent1c67fc851a0773dda7363065d13aa4ddf1330d38 (diff)
add more pthreads cancel operation.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1050 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'components/pthreads/pthread_internal.h')
-rw-r--r--components/pthreads/pthread_internal.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/components/pthreads/pthread_internal.h b/components/pthreads/pthread_internal.h
index 33ecfb8d0d..9f32105694 100644
--- a/components/pthreads/pthread_internal.h
+++ b/components/pthreads/pthread_internal.h
@@ -13,6 +13,13 @@ struct _pthread_cleanup
};
typedef struct _pthread_cleanup _pthread_cleanup_t;
+struct _pthread_key_data
+{
+ int is_used;
+ void (*destructor)(void* parameter);
+};
+typedef struct _pthread_key_data _pthread_key_data_t;
+
#define PTHREAD_MAGIC 0x70746873
struct _pthread_data
{
@@ -29,6 +36,11 @@ struct _pthread_data
/* semaphore for joinable thread */
rt_sem_t joinable_sem;
+ /* cancel state and type */
+ rt_uint8_t cancelstate;
+ volatile rt_uint8_t canceltype;
+ volatile rt_uint8_t canceled;
+
_pthread_cleanup_t* cleanup;
void** tls; /* thread-local storage area */
};