Port: Add bt_common_get_page_size
[babeltrace.git] / include / babeltrace / ctf-writer / serialize-internal.h
index 39cb791361aa47bd818ccf8ea6dbed78023d1b93..e029764e53b2c917b0e664bac31a16f2fd06a426 100644 (file)
@@ -26,6 +26,7 @@
  * http://www.efficios.com/ctf
  */
 
+#include <stdlib.h>
 #include <stdint.h>
 #include <limits.h>
 #include <sys/mman.h>
 #include <babeltrace/ctf-ir/fields.h>
 #include <babeltrace/ctf-ir/fields-internal.h>
 #include <babeltrace/align-internal.h>
+#include <babeltrace/common-internal.h>
 #include <babeltrace/mmap-align-internal.h>
 #include <babeltrace/types.h>
 
+#define PACKET_LEN_INCREMENT   (bt_common_get_page_size() * 8 * CHAR_BIT)
+
 struct bt_ctf_stream_pos {
        int fd;
        int prot;               /* mmap protection */
@@ -131,7 +135,7 @@ int bt_ctf_stream_pos_init(struct bt_ctf_stream_pos *pos,
                pos->flags = MAP_SHARED;
                break;
        default:
-               assert(BT_FALSE);
+               abort();
        }
 
        return 0;
This page took 0.025469 seconds and 4 git commands to generate.