summaryrefslogtreecommitdiff
path: root/pthread.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 /pthread.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 'pthread.h')
-rw-r--r--pthread.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/pthread.h b/pthread.h
index 70ece60..de84697 100644
--- a/pthread.h
+++ b/pthread.h
@@ -70,6 +70,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define PTHREAD_CANCEL_ASYNCHRONOUS 0
#define PTHREAD_CANCEL_DEFERRED 1
+/* Cancelation return value.
+ This value must be neither NULL nor the value of any
+ pointer to an object in memory. */
+#define PTHREAD_CANCELED ((void *) 1)
+
typedef HANDLE pthread_t;
typedef CRITICAL_SECTION pthread_mutex_t;
typedef DWORD pthread_key_t;
@@ -83,7 +88,7 @@ typedef struct {
size_t stacksize; /* PTHREAD_STACK_MIN */
#endif
- int cancelability; /* PTHREAD_CANCEL_DISABLE
+ int cancelstate; /* PTHREAD_CANCEL_DISABLE
PTHREAD_CANCEL_ENABLE */
int detached; /* PTHREAD_CREATE_DETACHED