* SOFTWARE.
*/
+#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <babeltrace/ctf-ir/field-types.h>
break;
}
default:
- assert(BT_FALSE);
+ abort();
}
} else {
switch (size) {
break;
}
default:
- assert(BT_FALSE);
+ abort();
}
}
/* unmap old base */
ret = munmap_align(pos->base_mma);
if (ret) {
- assert(BT_FALSE);
+ // FIXME: this can legitimately fail?
+ abort();
}
pos->base_mma = NULL;
}
/* The writer will add padding */
pos->mmap_offset += pos->packet_size / CHAR_BIT;
- pos->content_size = -1U; /* Unknown at this point */
pos->packet_size = getpagesize() * 8 * CHAR_BIT;
do {
ret = bt_posix_fallocate(pos->fd, pos->mmap_offset,
pos->base_mma = mmap_align(pos->packet_size / CHAR_BIT, pos->prot,
pos->flags, pos->fd, pos->mmap_offset);
if (pos->base_mma == MAP_FAILED) {
- assert(BT_FALSE);
+ // FIXME: this can legitimately fail?
+ abort();
}
}