diff options
| author | John Birrell <jb@FreeBSD.org> | 1998-04-03 09:31:15 +0000 |
|---|---|---|
| committer | John Birrell <jb@FreeBSD.org> | 1998-04-03 09:31:15 +0000 |
| commit | ed92686917250ff0cd818edae39dc79dc0795409 (patch) | |
| tree | c8efaea56aab15f31cb9144f71c44364e138e8c0 /lib/libpthread/thread/thr_create.c | |
| parent | 4d2c1d2306f9bf8197b7321352fa2a82ae10e1a6 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
| -rw-r--r-- | lib/libpthread/thread/thr_create.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index da00e4d44038..412f5580174c 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -60,6 +60,12 @@ _thread_create(pthread_t * thread, const pthread_attr_t * attr, /* Insufficient memory to create a thread: */ ret = EAGAIN; } else { + /* + * Write a magic value to the thread structure to help + * identify valid ones: + */ + new_thread->magic = PTHREAD_MAGIC; + /* Check if default thread attributes are required: */ if (attr == NULL || *attr == NULL) { /* Use the default thread attributes: */ |
