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:
rwatson 2005-11-01 14:46:37 +00:00
parent 326dbaf282
commit c6854c347f
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 */
};
/*