diff options
author | zont <zont@FreeBSD.org> | 2012-09-16 14:38:01 +0000 |
---|---|---|
committer | zont <zont@FreeBSD.org> | 2012-09-16 14:38:01 +0000 |
commit | 07b8304d19dd55a8eaac5abd279a0b195f9a2e0e (patch) | |
tree | 4414f2afd3e2d82c1cb68d3c0e47d967f00ff093 /usr.bin/truss/setup.c | |
parent | bde38da8f25291ce18341692c06e5fece707f914 (diff) | |
download | FreeBSD-src-07b8304d19dd55a8eaac5abd279a0b195f9a2e0e.zip FreeBSD-src-07b8304d19dd55a8eaac5abd279a0b195f9a2e0e.tar.gz |
- Make truss thread-aware.
Approved by: kib (mentor)
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/truss/setup.c')
-rw-r--r-- | usr.bin/truss/setup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/usr.bin/truss/setup.c b/usr.bin/truss/setup.c index c855c33..d6e4300 100644 --- a/usr.bin/truss/setup.c +++ b/usr.bin/truss/setup.c @@ -161,12 +161,10 @@ find_thread(struct trussinfo *info, lwpid_t lwpid) } } - np = (struct threadinfo *)malloc(sizeof(struct threadinfo)); + np = (struct threadinfo *)calloc(1, sizeof(struct threadinfo)); if (np == NULL) - errx(1, "malloc() failed"); + err(1, "calloc() failed"); np->tid = lwpid; - np->in_fork = 0; - np->in_syscall = 0; SLIST_INSERT_HEAD(&info->threadlist, np, entries); info->curthread = np; } |