Sun Nov 26 02:00:02 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>

* misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio.

Thu Nov 23 02:21:55 1995  Ulrich Drepper  <drepper@gnu.ai.mit.edu>

	* sysdeps/unix/sysv/linux/{mlock,munlock,mlockall,munlockall}.S:
	New files.
	* sysdeps/unix/sysv/linux/mman.h: Add prototypes for new functions
	mlock, munlock, mlockall, and munlockall.
This commit is contained in:
Roland McGrath 1995-11-26 17:32:10 +00:00
parent f44820454c
commit fbaad1494f
7 changed files with 133 additions and 4 deletions

View File

@ -1,3 +1,14 @@
Sun Nov 26 02:00:02 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* misc/syslog.c (vsyslog) [USE_IN_LIBIO]: Adapted for libio.
Thu Nov 23 02:21:55 1995 Ulrich Drepper <drepper@gnu.ai.mit.edu>
* sysdeps/unix/sysv/linux/{mlock,munlock,mlockall,munlockall}.S:
New files.
* sysdeps/unix/sysv/linux/mman.h: Add prototypes for new functions
mlock, munlock, mlockall, and munlockall.
Thu Nov 23 18:26:52 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* configure.in (--enable-libio): Set $stdio based on $enableval,

View File

@ -122,8 +122,14 @@ vsyslog(pri, fmt, ap)
f = open_memstream (&buf, &bufsize);
prioff = fprintf (f, "<%d>", pri);
(void) time (&now);
#ifdef USE_IN_LIBIO
f->_IO_write_ptr += strftime (f->_IO_write_ptr,
f->_IO_write_end - f->_IO_write_ptr,
"%h %e %T ", localtime (&now));
#else
f->__bufp += strftime (f->__bufp, f->__put_limit - f->__bufp,
"%h %e %T ", localtime (&now));
#endif
msgoff = ftell (f);
if (LogTag == NULL)
LogTag = __progname;

View File

@ -0,0 +1,24 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (mlock, 2)
ret
weak_alias (__mlock, mlock)

View File

@ -0,0 +1,24 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (mlockall, 1)
ret
weak_alias (__mlockall, mlockall)

View File

@ -0,0 +1,24 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (munlock, 2)
ret
weak_alias (__munlock, munlock)

View File

@ -0,0 +1,24 @@
/* Copyright (C) 1995 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
#include <sysdep.h>
SYSCALL__ (munlockall, 0)
ret
weak_alias (__munlockall, munlockall)

View File

@ -17,10 +17,6 @@ License along with the GNU C Library; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
/* These are the bits used by 4.4 BSD and its derivatives. On systems
(such as GNU) where these facilities are not system services but can be
emulated in the C library, these are the definitions we emulate. */
#ifndef _SYS_MMAN_H
#define _SYS_MMAN_H 1
@ -70,6 +66,10 @@ Cambridge, MA 02139, USA. */
#define MADV_WILLNEED 3 /* Will need these pages. */
#define MADV_DONTNEED 4 /* Don't need these pages. */
/* Flags to `mlockall'. */
#define MCL_CURRENT 1 /* Lock all current mappings. */
#define MCL_FUTURE 2 /* Lock all future mappings. */
#include <sys/cdefs.h>
__BEGIN_DECLS
@ -106,6 +106,22 @@ int msync __P ((__caddr_t __addr, size_t __len));
for the region starting at ADDR and extending LEN bytes. */
int madvise __P ((__caddr_t __addr, size_t __len, int __advice));
/* Cause all currently mapped pages of the process to be memory resident
until unlocked by a call to the `munlockall', until the process exits,
or until the process calls `execve'. */
int mlockall __P ((int __flags));
/* All currently mapped pages of the process' address space become
unlocked. */
int munlockall __P ((void));
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
int mlock __P ((__caddr_t __addr, size_t __len));
/* Unlock whole pages previously mapped by the range [ADDR,ADDR+LEN). */
int munlock __P ((__caddr_t __addr, size_t __len));
__END_DECLS