diff options
author | jasone <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-01-27 23:07:25 +0000 |
commit | 8abe2a2d86ee5f72093b3feeabf05c9f6f963576 (patch) | |
tree | 2ebe01199c17764ebcd26435b5ce1c06ebb67ad5 /lib/libc/gmon | |
parent | 1731b249ccd9d7586d511eda8756f5c6b57b871c (diff) | |
download | FreeBSD-src-8abe2a2d86ee5f72093b3feeabf05c9f6f963576.zip FreeBSD-src-8abe2a2d86ee5f72093b3feeabf05c9f6f963576.tar.gz |
Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),
just use _foo() <-- foo(). In the case of a libpthread that doesn't do
call conversion (such as linuxthreads and our upcoming libpthread), this
is adequate. In the case of libc_r, we still need three names, which are
now _thread_sys_foo() <-- _foo() <-- foo().
Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(),
nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo().
Remove all internal libc usage of: creat(), pause(), sleep(), system(),
tcdrain(), wait(), and waitpid().
Make thread cancellation fully POSIX-compliant.
Suggested by: deischen
Diffstat (limited to 'lib/libc/gmon')
-rw-r--r-- | lib/libc/gmon/gmon.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/gmon/gmon.c b/lib/libc/gmon/gmon.c index 938cd02..6bf3d5b 100644 --- a/lib/libc/gmon/gmon.c +++ b/lib/libc/gmon/gmon.c @@ -62,7 +62,7 @@ static int s_scale; /* see profil(2) where this is describe (incorrectly) */ #define SCALE_1_TO_1 0x10000L -#define ERR(s) _libc_write(2, s, sizeof(s)) +#define ERR(s) _write(2, s, sizeof(s)) void moncontrol __P((int)); static int hertz __P((void)); @@ -172,20 +172,20 @@ _mcleanup() moncontrol(0); snprintf(outname,sizeof(outname),"%s.gmon",__progname); - fd = _libc_open(outname, O_CREAT|O_TRUNC|O_WRONLY, 0666); + fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY, 0666); if (fd < 0) { warnx("_mcleanup: %s - %s",outname,strerror(errno)); return; } #ifdef DEBUG - log = _libc_open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664); + log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY, 0664); if (log < 0) { perror("_mcleanup: gmon.log"); return; } len = sprintf(buf, "[mcleanup1] kcount 0x%x ssiz %d\n", p->kcount, p->kcountsize); - _libc_write(log, buf, len); + _write(log, buf, len); #endif hdr = (struct gmonhdr *)&gmonhdr; hdr->lpc = p->lowpc; @@ -193,8 +193,8 @@ _mcleanup() hdr->ncnt = p->kcountsize + sizeof(gmonhdr); hdr->version = GMONVERSION; hdr->profrate = clockinfo.profhz; - _libc_write(fd, (char *)hdr, sizeof *hdr); - _libc_write(fd, p->kcount, p->kcountsize); + _write(fd, (char *)hdr, sizeof *hdr); + _write(fd, p->kcount, p->kcountsize); endfrom = p->fromssize / sizeof(*p->froms); for (fromindex = 0; fromindex < endfrom; fromindex++) { if (p->froms[fromindex] == 0) @@ -209,15 +209,15 @@ _mcleanup() "[mcleanup2] frompc 0x%x selfpc 0x%x count %d\n" , frompc, p->tos[toindex].selfpc, p->tos[toindex].count); - _libc_write(log, buf, len); + _write(log, buf, len); #endif rawarc.raw_frompc = frompc; rawarc.raw_selfpc = p->tos[toindex].selfpc; rawarc.raw_count = p->tos[toindex].count; - _libc_write(fd, &rawarc, sizeof rawarc); + _write(fd, &rawarc, sizeof rawarc); } } - _libc_close(fd); + _close(fd); } /* |