#include <stdint.h>
#include "ust/core.h"
+#include "usterr_signal_safe.h"
#define SHM_MAGIC 0x54335433
#define SHM_MAJOR 0
DECLARE_SHMP(struct channel, chan);
};
+struct shm_handle {
+ struct shm_header *header; /* beginning of mapping */
+ int shmfd; /* process-local file descriptor */
+};
+
#define shmp(shm_offset) \
((__typeof__(****(shm_offset))) (((char *) &(shm_offset)) + (ptrdiff_t) (shm_offset)))
return ret;
}
+static inline
+void align_shm(struct shm_header *shm_header, size_t align)
+{
+ size_t offset_len = offset_align(shm_header->shm_allocated, align);
+ shm_header->shm_allocated += offset_len;
+}
+
#endif /* _LIBRINGBUFFER_SHM_H */