In C++, g++ complains that the mmap_align free function shadows the
constructor of the structure of the same name. Rename the structure to
mmap_align_data to avoid that.
Change-Id: Iae5e0175e3530ebc51804602240ca3037bc02c5b
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/7099
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
* cannot be forced, so we allocate at an address chosen by the OS.
*/
* cannot be forced, so we allocate at an address chosen by the OS.
*/
+struct mmap_align_data {
void *page_aligned_addr; /* mmap address, aligned to floor */
size_t page_aligned_length; /* mmap length, containing range */
void *page_aligned_addr; /* mmap address, aligned to floor */
size_t page_aligned_length; /* mmap length, containing range */
-struct mmap_align *mmap_align(size_t length, int prot,
+struct mmap_align_data *mmap_align(size_t length, int prot,
int flags, int fd, off_t offset, int log_level)
{
int flags, int fd, off_t offset, int log_level)
{
- struct mmap_align *mma;
+ struct mmap_align_data *mma;
off_t page_aligned_offset; /* mmap offset, aligned to floor */
size_t page_size;
off_t page_aligned_offset; /* mmap offset, aligned to floor */
size_t page_size;
-int munmap_align(struct mmap_align *mma)
+int munmap_align(struct mmap_align_data *mma)
{
void *page_aligned_addr;
size_t page_aligned_length;
{
void *page_aligned_addr;
size_t page_aligned_length;
-void *mmap_align_addr(struct mmap_align *mma)
+void *mmap_align_addr(struct mmap_align_data *mma)
* Helper for special-cases, normally unused.
*/
static inline
* Helper for special-cases, normally unused.
*/
static inline
-void mmap_align_set_addr(struct mmap_align *mma, void *addr)
+void mmap_align_set_addr(struct mmap_align_data *mma, void *addr)
uint64_t stream_size_bytes;
/* Memory map base address */
uint64_t stream_size_bytes;
/* Memory map base address */
- struct mmap_align *base_mma;
+ struct mmap_align_data *base_mma;
/* Stream file's path (for debugging) */
GString *path;
/* Stream file's path (for debugging) */
GString *path;