Subject: Re: LWPs and ktrace
To: None <tech-kern@netbsd.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 08/03/2002 21:19:25
On Sun, Aug 04, 2002 at 03:20:50PM +1200, Gregory McGarry wrote:
> Changing ktrace to report the lwpid_t in struct ktr_header would
> be very useful, and probably the correct way to go. This will
> break backward compatibility. Is this an issue?
Maybe a new ktr_lwp_header could be invented, and single LWP processes
would get the old one, and multi-LWP processes would get the new one.
Maybe like:
struct ktr_lwp_header {
int ktr_len;
short ktr_type;
pid_t ktr_pid;
lwpid_t ktr_lwpid;
char ktr_comm[MAXCOMLEN+1];
struct timeval ktr_time;
caddr_t ktr_buf;
};
#define KTR_TYPE_MASK 0x0fff
#define KTR_TYPE_LWP 0x1000 /* means "ktr_lwp_header" */
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>