Add ring buffer comment about shm
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 4 Aug 2011 22:36:12 +0000 (18:36 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 4 Aug 2011 22:36:12 +0000 (18:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/ring_buffer_frontend.c

index 01d0f5e87007c269f15026366a35fc1ae9827e85..b45ec543981c940b7beacce8dbc885625efb9a3a 100644 (file)
 #define max(a, b)      ((a) > (b) ? (a) : (b))
 #endif
 
+/*
+ * Use POSIX SHM: shm_open(3) and shm_unlink(3).
+ * close(2) to close the fd returned by shm_open.
+ * shm_unlink releases the shared memory object name.
+ * ftruncate(2) sets the size of the memory object.
+ * mmap/munmap maps the shared memory obj to a virtual address in the
+ * calling proceess (should be done both in libust and consumer).
+ * See shm_overview(7) for details.
+ * Pass file descriptor returned by shm_open(3) to ltt-sessiond through
+ * a UNIX socket.
+ *
+ * Since we don't need to access the object using its name, we can
+ * immediately shm_unlink(3) it, and only keep the handle with its file
+ * descriptor.
+ */
+
 /*
  * Internal structure representing offsets to use at a sub-buffer switch.
  */
This page took 0.025658 seconds and 4 git commands to generate.