summaryrefslogtreecommitdiff
path: root/implement.h
diff options
context:
space:
mode:
authorrpj <rpj>1998-07-24 12:21:27 +0000
committerrpj <rpj>1998-07-24 12:21:27 +0000
commiteafdb5db2871e893574fd0da01554d1a50b7471f (patch)
treed9745ff3e93354d8b836dfda8cdebd0ff8a760b4 /implement.h
parent2049e2d3f0bce851995dda72511996c14e51ac66 (diff)
Fri Jul 24 21:13:55 1998 Ross Johnson <rpj@ixobrychus.canberra.edu.au>
* cancel.c (pthread_cancel): Implement. (pthread_testcancel): Implement. * exit.c (pthread_exit): Add comment explaining the longjmp(). * implement.h (_pthread_threads_thread_t): New member cancelthread. (_PTHREAD_YES): Define. (_PTHREAD_NO): Define. (RND_SIZEOF): Remove. * create.c (pthread_create): Rename cancelability to cancelstate. * pthread.h (pthread_attr_t): Rename cancelability to cancelstate. (PTHREAD_CANCELED): Define.
Diffstat (limited to 'implement.h')
-rw-r--r--implement.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/implement.h b/implement.h
index 4a9a5ad..033e0e8 100644
--- a/implement.h
+++ b/implement.h
@@ -9,6 +9,9 @@
#define _PTHREAD_HASH_INDEX(x) (((ULONG) x) % PTHREAD_THREADS_MAX)
+#define _PTHREAD_YES 1
+#define _PTHREAD_NO 0
+
/* Handler execution flags. */
#define _PTHREAD_HANDLER_NOEXECUTE 0
#define _PTHREAD_HANDLER_EXECUTE 1
@@ -19,11 +22,6 @@ enum { _PTHREAD_HANDLER_POP_LIFO, _PTHREAD_HANDLER_POP_FIFO };
/* Special value to mark attribute objects as valid. */
#define _PTHREAD_ATTR_INVALID 0xC0FFEE
-/* Round a sizeof(type) up to a multiple of sizeof(DWORD).
- This is all compile time arithmetic.
- */
-#define RND_SIZEOF(T) (((sizeof(T) / sizeof(DWORD)) + 1) * sizeof(DWORD))
-
/* General description of a handler function on a stack. */
typedef struct _pthread_handler_node _pthread_handler_node_t;
@@ -52,6 +50,7 @@ struct _pthread_threads_thread {
pthread_t thread;
pthread_attr_t attr;
_pthread_call_t call;
+ int cancelthread;
void ** joinvalueptr;
_pthread_handler_node_t * cleanupstack;
_pthread_handler_node_t * destructorstack;