diff options
| author | Jason Evans <jasone@FreeBSD.org> | 2000-01-19 07:04:50 +0000 |
|---|---|---|
| committer | Jason Evans <jasone@FreeBSD.org> | 2000-01-19 07:04:50 +0000 |
| commit | 0a3fa43c7e06dfbd6ddde4767d9c8a0c6a2ad51f (patch) | |
| tree | d60f837da3362893d30d022990c52c439190405b /lib/libpthread/thread/thr_create.c | |
| parent | 1c12990b99e0a50adad4fb4691b64378de2f1b12 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
| -rw-r--r-- | lib/libpthread/thread/thr_create.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index fd9e7464a995..b8a1c466b978 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -189,19 +189,24 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, */ #if defined(__FreeBSD__) #if defined(__alpha__) - new_thread->saved_jmp_buf[0]._jb[2] = (long) _thread_start; - new_thread->saved_jmp_buf[0]._jb[4 + R_RA] = 0; - new_thread->saved_jmp_buf[0]._jb[4 + R_T12] = (long) _thread_start; + new_thread->saved_jmp_buf[0]._jb[2] = + (long)_thread_start; + new_thread->saved_jmp_buf[0]._jb[4 + R_RA] = + 0; + new_thread->saved_jmp_buf[0]._jb[4 + R_T12] = + (long)_thread_start; #else - new_thread->saved_jmp_buf[0]._jb[0] = (long) _thread_start; + new_thread->saved_jmp_buf[0]._jb[0] = + (long)_thread_start; #endif #elif defined(__NetBSD__) #if defined(__alpha__) - new_thread->saved_jmp_buf[2] = (long) _thread_start; + new_thread->saved_jmp_buf[2] = (long)_thread_start; new_thread->saved_jmp_buf[4 + R_RA] = 0; - new_thread->saved_jmp_buf[4 + R_T12] = (long) _thread_start; + new_thread->saved_jmp_buf[4 + R_T12] = + (long)_thread_start; #else - new_thread->saved_jmp_buf[0] = (long) _thread_start; + new_thread->saved_jmp_buf[0] = (long)_thread_start; #endif #else #error "Don't recognize this operating system!" @@ -210,15 +215,22 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, /* The stack starts high and builds down: */ #if defined(__FreeBSD__) #if defined(__alpha__) - new_thread->saved_jmp_buf[0]._jb[4 + R_SP] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double); + new_thread->saved_jmp_buf[0]._jb[4 + R_SP] = + (long)new_thread->stack + pattr->stacksize_attr + - sizeof(double); #else - new_thread->saved_jmp_buf[0]._jb[2] = (int) (new_thread->stack + pattr->stacksize_attr - sizeof(double)); + new_thread->saved_jmp_buf[0]._jb[2] = + (int)(new_thread->stack + pattr->stacksize_attr - + sizeof(double)); #endif #elif defined(__NetBSD__) #if defined(__alpha__) - new_thread->saved_jmp_buf[4 + R_SP] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double); + new_thread->saved_jmp_buf[4 + R_SP] = + (long)new_thread->stack + pattr->stacksize_attr - + sizeof(double); #else - new_thread->saved_jmp_buf[2] = (long) new_thread->stack + pattr->stacksize_attr - sizeof(double); + new_thread->saved_jmp_buf[2] = (long)new_thread->stack + + pattr->stacksize_attr - sizeof(double); #endif #else #error "Don't recognize this operating system!" @@ -263,6 +275,8 @@ pthread_create(pthread_t * thread, const pthread_attr_t * attr, new_thread->flags = 0; new_thread->poll_data.nfds = 0; new_thread->poll_data.fds = NULL; + new_thread->jmpflags = 0; + new_thread->continuation = NULL; /* * Defer signals to protect the scheduling queues |
