This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/2] Document shm_open and shm_close

> > 
> > In summary:
> > 
> > * Fix the test.
> > * Document the implementation-defined choices we've just made.
> > 
> > Post v2 please.
> > 
> > Cheers,
> > Carlos.
Here is a documentation stub. As mmap is in llio.texi I put it there.

	* manual/llio.texi (Memory-mapped I/O): Add shm_open and shm_close.

 manual/llio.texi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/manual/llio.texi b/manual/llio.texi
index dd0eaa3..899d1f5 100644
--- a/manual/llio.texi
+++ b/manual/llio.texi
@@ -1471,6 +1471,31 @@ There is no existing mapping in at least part of the given region.
 @end table
 @end deftypefun
+@comment sys/mman.h
+@comment POSIX
+@deftypefun int shm_open (const char *@var{name}, int @var{oflag}, mode_t @var{mode})
+This function returns a file descriptor that can be used to allocate shared
+memory by mmap. Unrelated processes can use same @var{name} to create or open existing
+shared memory object.
+A @var{name} argument specifies shared memory object to be opened.
+In @theglibc{} it must be a string smaller than @code{NAME_MAX} bytes starting with
+optional slash but without nonleading slashes.
+Semantics of @var{oflag} and @var{mode} arguments is same as in @code{open}.
+@code{shm_open} returns file descriptor on success and @math{-1} on error.
+@end deftypefn
+@deftypefun int shm_unlink (const char *@var{name})
+This function is inverse of @code{shm_open} and removes the object with given
+@var{name} previously created by @code{shm_open}.
+@code{shm_unlink} returns @math{0} on success and @math{-1} on error.
+@end deftypefn
 @node Waiting for I/O
 @section Waiting for Input or Output
 @cindex waiting for input or output

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]