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/db/hash/hash_page.c | |
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/db/hash/hash_page.c')
-rw-r--r-- | lib/libc/db/hash/hash_page.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/libc/db/hash/hash_page.c b/lib/libc/db/hash/hash_page.c index 7a204ab..30445e4 100644 --- a/lib/libc/db/hash/hash_page.c +++ b/lib/libc/db/hash/hash_page.c @@ -539,7 +539,7 @@ __get_page(hashp, p, bucket, is_bucket, is_disk, is_bitmap) else page = OADDR_TO_PAGE(bucket); if ((lseek(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) || - ((rsize = _libc_read(fd, p, size)) == -1)) + ((rsize = _read(fd, p, size)) == -1)) return (-1); bp = (u_int16_t *)p; if (!rsize) @@ -610,7 +610,7 @@ __put_page(hashp, p, bucket, is_bucket, is_bitmap) else page = OADDR_TO_PAGE(bucket); if ((lseek(fd, (off_t)page << hashp->BSHIFT, SEEK_SET) == -1) || - ((wsize = _libc_write(fd, p, size)) == -1)) + ((wsize = _write(fd, p, size)) == -1)) /* Errno is set */ return (-1); if (wsize != size) { @@ -714,8 +714,7 @@ overflow_page(hashp) #define OVMSG "HASH: Out of overflow pages. Increase page size\n" if (offset > SPLITMASK) { if (++splitnum >= NCACHED) { - (void)_libc_write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - - 1); + (void)_write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); return (0); } hashp->OVFL_POINT = splitnum; @@ -728,8 +727,7 @@ overflow_page(hashp) if (free_bit == (hashp->BSIZE << BYTE_SHIFT) - 1) { free_page++; if (free_page >= NCACHED) { - (void)_libc_write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - - 1); + (void)_write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); return (0); } /* @@ -753,7 +751,7 @@ overflow_page(hashp) offset++; if (offset > SPLITMASK) { if (++splitnum >= NCACHED) { - (void)_libc_write(STDERR_FILENO, OVMSG, + (void)_write(STDERR_FILENO, OVMSG, sizeof(OVMSG) - 1); return (0); } @@ -871,7 +869,7 @@ open_temp(hashp) (void)sigprocmask(SIG_BLOCK, &set, &oset); if ((hashp->fp = mkstemp(namestr)) != -1) { (void)unlink(namestr); - (void)_libc_fcntl(hashp->fp, F_SETFD, 1); + (void)_fcntl(hashp->fp, F_SETFD, 1); } (void)sigprocmask(SIG_SETMASK, &oset, (sigset_t *)NULL); return (hashp->fp != -1 ? 0 : -1); |