cvs commit: src/lib/libpthread/arch/ia64/ia64 pthread_md.c src/lib/libpthread/arch/ia64/include pthread_md.h

Marcel Moolenaar marcel at
Tue Aug 5 21:17:43 PDT 2003

marcel      2003/08/05 21:17:42 PDT

  FreeBSD src repository

  Modified files:
    lib/libpthread/arch/ia64/ia64 pthread_md.c 
    lib/libpthread/arch/ia64/include pthread_md.h 
  Avoid a level of indirection to get from the thread pointer to the
  TCB. We know that the thread pointer points to &tcb->tcb_tp, so all
  we have to do is subtract offsetof(struct tcb, tcb_tp) from the
  thread pointer to get to the TCB. Any reasonably smart compiler will
  translate accesses to fields in the TCB as negative offsets from TP.
  In _tcb_set() make sure the fake TCB gets a pointer to the current
  KCB, just like any other TCB. This fixes a NULL-pointer dereference
  in _thr_ref_add() when it tried to get the current KSE.
  Revision  Changes    Path
  1.2       +0 -2      src/lib/libpthread/arch/ia64/ia64/pthread_md.c
  1.7       +27 -37    src/lib/libpthread/arch/ia64/include/pthread_md.h

More information about the cvs-src mailing list