On Mon, 9 Jul 2001 03:20:44 -0500,
  Alfred Perlstein <[EMAIL PROTECTED]> said:

Alfred> I'm also quite sure that you can't call the ktrace functions with
Alfred> any mutexes held so the code is doing to need some help, basically
Alfred> the trick in trapsig() and postsig() is to generate the ktrace
Alfred> IO after the locks have been dropped, this means somehow caching
Alfred> the info sent to ktrace where it's currently called, and calling
Alfred> it later with the cached info after the locks are dropped.

We can cache ktrace information into struct proc and mark the
existence of cache in p_traceflag. Then we send the information to
ktrace upon returning from trapsignal() or CURSIG(), or in sigexit(). 

Another problem I noticed is bogus unlock and lock around call of
machine-and-maybe-executable-format-dependent sendsig(), found in
sys/*/*/machdep.c. Instead of locking curproc in sendsig() once again,
we should call sendsig() with curproc locked, and release the lock
only in sendsig().


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to