]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
test: More portable use of mmap(MAP_ANON) 10557/head
authorWillem Jan Withagen <wjw@digiware.nl>
Wed, 3 Aug 2016 13:05:52 +0000 (15:05 +0200)
committerWillem Jan Withagen <wjw@digiware.nl>
Thu, 4 Aug 2016 17:06:47 +0000 (19:06 +0200)
commit0f18c347ceb5904dc49f6ab505342a5d877b37ee
tree2bfe2ba0ea29a3c319be487ba47077636c56479a
parent9bef6cf85ac31bd103300a5b0f35a332f1d216d1
test: More portable use of mmap(MAP_ANON)

From the Linux manual:
  MAP_ANONYMOUS
     The  mapping  is  not  backed  by any file; its contents
     are initialized to zero.  The fd and offset arguments are
     ignored; however, some implementations require fd to be -1
     if MAP_ANONYMOUS (or MAP_ANON) is specified, and portable
     applications  should  ensure  this.

FreeBSD is such a case, it wil just return an error.

 - Used in:
     src/test/on_exit.cc
     src/test/system/cross_process_sem.cc

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
src/test/on_exit.cc
src/test/system/cross_process_sem.cc