Date: Sun, 1 Dec 2002 21:06:17 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 21799 for review Message-ID: <200212020506.gB256HRg011254@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=21799 Change 21799 by marcel@marcel_nfs on 2002/12/01 21:06:01 Argh... I forgot we had a broken header file that merely made libc_r compile and I obviously didn't pay attention to the merge conflicts. This is the working version... Affected files ... .. //depot/projects/ia64/lib/libc_r/uthread/pthread_private.h#14 edit Differences ... ==== //depot/projects/ia64/lib/libc_r/uthread/pthread_private.h#14 (text+ko) ==== @@ -101,17 +101,21 @@ (jb)[0]._jb[R_RA + 4] = (long)(ra); \ (jb)[0]._jb[R_T12 + 4] = (long)(ra); \ } while (0) -#elif defined(__ia64__) +#elif defined(__ia64__) +#define GET_BSP_JB(jb) (*((unsigned long*)JMPBUF_ADDR_OF(jb,J_BSP))) #define GET_STACK_JB(jb) (*((unsigned long*)JMPBUF_ADDR_OF(jb,J_SP))) -#define GET_STACK_SJB(sjb) (*((unsigned long*)JMPBUF_ADDR_OF(sjb,J_SP))) -#define GET_STACK_UC(ucp) ((ucp)->uc_mcontext.mc_sp) -#define SET_STACK_JB(jb, stk) GET_STACK_JB(jb) = (long)(stk) -#define SET_STACK_SJB(sjb, stk) GET_STACK_SJB(sjb) = (long)(stk) -#define SET_STACK_UC(ucp, stk) (ucp)->uc_mcontext.mc_sp = (unsigned long)(stk) -#define FP_SAVE_UC(ucp) -#define FP_RESTORE_UC(ucp) -#define SET_RETURN_ADDR_JB(jb, ra) \ - (*((unsigned long*)JMPBUF_ADDR_OF(jb,J_B0)) = (long)(ra)) +#define GET_STACK_SJB(sjb) GET_STACK_JB(sjb) +#define SET_RETURN_ADDR_JB(jb, ra) \ +do { \ + *((unsigned long*)JMPBUF_ADDR_OF(jb,J_B0)) = ((long*)(ra))[0]; \ + *((unsigned long*)JMPBUF_ADDR_OF(jb,J_PFS)) &= ~0x1FFFFFFFFFUL; \ +} while (0) +#define SET_STACK_JB(jb, stk, sz) \ +do { \ + UPD_STACK_JB(jb, stk + sz - 16); \ + GET_BSP_JB(jb) = (long)(stk); \ +} while (0) +#define UPD_STACK_JB(jb, stk) GET_STACK_JB(jb) = (long)(stk) #else #error "Don't recognize this architecture!" #endif @@ -210,21 +214,6 @@ } \ _thread_kern_new_state = 0; \ } while (0) -#elif defined(__ia64__) -#define GET_BSP_JB(jb) (*((unsigned long*)JMPBUF_ADDR_OF(jb,J_BSP))) -#define GET_STACK_JB(jb) (*((unsigned long*)JMPBUF_ADDR_OF(jb,J_SP))) -#define GET_STACK_SJB(sjb) GET_STACK_JB(sjb) -#define SET_RETURN_ADDR_JB(jb, ra) \ -do { \ - *((unsigned long*)JMPBUF_ADDR_OF(jb,J_B0)) = ((long*)(ra))[0]; \ - *((unsigned long*)JMPBUF_ADDR_OF(jb,J_PFS)) &= ~0x1FFFFFFFFFUL; \ -} while (0) -#define SET_STACK_JB(jb, stk, sz) \ -do { \ - UPD_STACK_JB(jb, stk + sz - 16); \ - GET_BSP_JB(jb) = (long)(stk); \ -} while (0) -#define UPD_STACK_JB(jb, stk) GET_STACK_JB(jb) = (long)(stk) #else #define PTHREAD_ASSERT(cond, msg) #define PTHREAD_ASSERT_NOT_IN_SYNCQ(thrd) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200212020506.gB256HRg011254>