Reuse ktr_unused field in ktr_header structure as ktr_tid; populate

ktr_tid as part of gathering of ktr header data for new ktrace
records.  The continued use of intptr_t is required for file layout
reasons, and cannot be changed to lwpid_t at this point.

MFC after:	1 month
Reviewed by:	davidxu
This commit is contained in:
Robert Watson 2005-11-01 14:46:37 +00:00
parent bff49d66ab
commit 2bdeb3f9f2
2 changed files with 2 additions and 2 deletions

View File

@ -237,8 +237,8 @@ ktr_getrequest(int type)
mtx_unlock(&ktrace_mtx);
microtime(&req->ktr_header.ktr_time);
req->ktr_header.ktr_pid = p->p_pid;
req->ktr_header.ktr_tid = td->td_tid;
bcopy(p->p_comm, req->ktr_header.ktr_comm, MAXCOMLEN + 1);
req->ktr_header.ktr_unused = 0;
req->ktr_buffer = NULL;
req->ktr_header.ktr_len = 0;
} else {

View File

@ -54,7 +54,7 @@ struct ktr_header {
pid_t ktr_pid; /* process id */
char ktr_comm[MAXCOMLEN+1]; /* command name */
struct timeval ktr_time; /* timestamp */
intptr_t ktr_unused; /* was ktr_buffer */
intptr_t ktr_tid; /* was ktr_buffer */
};
/*