[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] CVS: pnetC/libc/misc madvise.c, NONE, 1.1 mincore.
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] CVS: pnetC/libc/misc madvise.c, NONE, 1.1 mincore.c, NONE, 1.1 mlock.c, NONE, 1.1 mlockall.c, NONE, 1.1 mmap.c, NONE, 1.1 mmap64.c, NONE, 1.1 mprotect.c, NONE, 1.1 msync.c, NONE, 1.1 munlock.c, NONE, 1.1 munlockall.c, NONE, 1.1 munmap.c, NONE, 1.1 Makefile.am, 1.1.1.1, 1.2 |
Date: |
Thu, 14 Aug 2003 03:51:55 -0400 |
Update of /cvsroot/dotgnu-pnet/pnetC/libc/misc
In directory subversions:/tmp/cvs-serv26399/libc/misc
Modified Files:
Makefile.am
Added Files:
madvise.c mincore.c mlock.c mlockall.c mmap.c mmap64.c
mprotect.c msync.c munlock.c munlockall.c munmap.c
Log Message:
Stub out the mmap-related system calls.
--- NEW FILE ---
/* Copyright (C) 1994, 1995, 1996, 1997, 2000 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Advise the system about particular usage patterns the program follows
for the region starting at ADDR and extending LEN bytes. */
int
posix_madvise (__ptr_t addr, size_t len, int advice)
{
__set_errno (ENOSYS);
return -1;
}
weak_alias (posix_madvise, madvise)
--- NEW FILE ---
/* Copyright (C) 2000 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/mman.h>
#include <errno.h>
int
mincore (void *__start, size_t __len, unsigned char *__vec)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* mlock -- guarantee pages are resident in memory. Stub version.
Copyright (C) 2001 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Guarantee all whole pages mapped by the range [ADDR,ADDR+LEN) to
be memory resident. */
int
mlock (const void *addr, size_t len)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* mlockall -- lock in core all the pages in this process. Stub version.
Copyright (C) 2001 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* 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 (int flags)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* Copyright (C) 1994, 1995, 1996, 1997 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Map addresses starting near ADDR and extending for LEN bytes. From
OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
__ptr_t
__mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
__set_errno (ENOSYS);
return MAP_FAILED;
}
weak_alias (__mmap, mmap)
--- NEW FILE ---
/* Copyright (C) 1997 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <errno.h>
#include <sys/mman.h>
#include <sys/types.h>
/* Map addresses starting near ADDR and extending for LEN bytes. From
OFFSET into the file FD describes according to PROT and FLAGS. If ADDR
is nonzero, it is the desired mapping address. If the MAP_FIXED bit is
set in FLAGS, the mapping will be at ADDR exactly (which must be
page-aligned); otherwise the system chooses a convenient nearby address.
The return value is the actual mapping address chosen or MAP_FAILED
for errors (in which case `errno' is set). A successful `mmap' call
deallocates any previous mapping for the affected region. */
__ptr_t
__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd,
__off64_t offset)
{
off_t small_offset = (off_t) offset;
if (small_offset != offset)
{
/* We cannot do this since the offset is too large. */
__set_errno (EOVERFLOW);
return MAP_FAILED;
}
return __mmap (addr, len, prot, flags, fd, small_offset);
}
weak_alias (__mmap64, mmap64)
--- NEW FILE ---
/* Copyright (C) 1994, 1995, 1996, 1997 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Change the memory protection of the region starting at ADDR and
extending LEN bytes to PROT. Returns 0 if successful, -1 for errors
(and sets errno). */
int
__mprotect (__ptr_t addr, size_t len, int prot)
{
__set_errno (ENOSYS);
return -1;
}
weak_alias (__mprotect, mprotect)
--- NEW FILE ---
/* Copyright (C) 1994, 1995, 1996, 1997 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Synchronize the region starting at ADDR and extending LEN bytes with the
file it maps. Filesystem operations on a file being mapped are
unpredictable before this is done. */
int
msync (__ptr_t addr, size_t len, int flags)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* munlock -- undo the effects of prior mlock calls. Stub version.
Copyright (C) 2001 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Undo the effects on these whole pages of any prior mlock calls. */
int
munlock (const void *addr, size_t len)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* munlockall -- undo the effects of all prior mlock calls. Stub version.
Copyright (C) 2001 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Undo the effects of all prior mlock calls in this process. */
int
munlockall (void)
{
__set_errno (ENOSYS);
return -1;
}
--- NEW FILE ---
/* Copyright (C) 1994, 1995, 1996, 1997 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 Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, write to the Free
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/types.h>
#include <sys/mman.h>
#include <errno.h>
/* Deallocate any mapping for the region starting at ADDR and extending LEN
bytes. Returns 0 if successful, -1 for errors (and sets errno). */
int
__munmap (__ptr_t addr, size_t len)
{
__set_errno (ENOSYS);
return -1;
}
weak_alias (__munmap, munmap)
Index: Makefile.am
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetC/libc/misc/Makefile.am,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Makefile.am 16 Aug 2002 03:19:44 -0000 1.1.1.1
--- Makefile.am 14 Aug 2003 07:51:53 -0000 1.2
***************
*** 4,8 ****
libCMisc_a_SOURCES = errno.c \
! longjmp.c
AM_CFLAGS = -I$(top_srcdir)/include \
--- 4,19 ----
libCMisc_a_SOURCES = errno.c \
! longjmp.c \
! mmap.c \
! mmap64.c \
! munmap.c \
! mprotect.c \
! msync.c \
! mlock.c \
! mlockall.c \
! munlock.c \
! munlockall.c \
! madvise.c \
! mincore.c
AM_CFLAGS = -I$(top_srcdir)/include \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] CVS: pnetC/libc/misc madvise.c, NONE, 1.1 mincore.c, NONE, 1.1 mlock.c, NONE, 1.1 mlockall.c, NONE, 1.1 mmap.c, NONE, 1.1 mmap64.c, NONE, 1.1 mprotect.c, NONE, 1.1 msync.c, NONE, 1.1 munlock.c, NONE, 1.1 munlockall.c, NONE, 1.1 munmap.c, NONE, 1.1 Makefile.am, 1.1.1.1, 1.2,
Rhys Weatherley <address@hidden> <=
- Prev by Date:
[Dotgnu-pnet-commits] CVS: pnetC/include/bits mman.h, NONE, 1.1 Makefile.am, 1.2, 1.3
- Next by Date:
[Dotgnu-pnet-commits] CVS: pnetC ChangeLog,1.34,1.35
- Previous by thread:
[Dotgnu-pnet-commits] CVS: pnetC/include/bits mman.h, NONE, 1.1 Makefile.am, 1.2, 1.3
- Next by thread:
[Dotgnu-pnet-commits] CVS: pnetC ChangeLog,1.34,1.35
- Index(es):