Skip to content
Snippets Groups Projects
Commit 91aabc8d authored by Hans-Peter Nilsson's avatar Hans-Peter Nilsson
Browse files

* sim/cris/c/mmap1.c (MMAP_FLAGS): Default-define to

	MAP_PRIVATE and use this macro in the mmap call.
	* sim/cris/c/mmap4.c: New test.
parent a349c9b6
No related branches found
No related tags found
No related merge requests found
2009-01-03 Hans-Peter Nilsson <hp@axis.com> 2009-01-03 Hans-Peter Nilsson <hp@axis.com>
* sim/cris/c/mmap1.c (MMAP_FLAGS): Default-define to
MAP_PRIVATE and use this macro in the mmap call.
* sim/cris/c/mmap4.c: New test.
* sim/cris/c/access1.c: New test. * sim/cris/c/access1.c: New test.
* sim/cris/asm/pid1.ms: New test. * sim/cris/asm/pid1.ms: New test.
......
...@@ -38,7 +38,11 @@ int main (int argc, char *argv[]) ...@@ -38,7 +38,11 @@ int main (int argc, char *argv[])
if ((size & 8191) == 0) if ((size & 8191) == 0)
size--; size--;
a = mmap (NULL, size, PROT_READ, MAP_PRIVATE, fd, 0); #ifndef MMAP_FLAGS
#define MMAP_FLAGS MAP_PRIVATE
#endif
a = mmap (NULL, size, PROT_READ, MMAP_FLAGS, fd, 0);
if (memmem (a, size, str, strlen (str) + 1) == NULL) if (memmem (a, size, str, strlen (str) + 1) == NULL)
abort (); abort ();
......
/* Just check that MAP_DENYWRITE is "honored" (ignored).
#notarget: cris*-*-elf
*/
#define MMAP_FLAGS (MAP_PRIVATE|MAP_DENYWRITE)
#include "mmap1.c"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment