7 #define iris_likely(x) __builtin_expect(!!(long)(x), 1)
8 #define iris_unlikely(x) __builtin_expect(!!(long)(x), 0)
11 // @pbuffer holds formatter function address and arguments
13 size_t rbuf_alloc_size;
14 loglet_t(char * ptr = nullptr, size_t alloc_size = 0):rbuf_ptr(ptr), rbuf_alloc_size(alloc_size) {}
17 #if defined(IOV_MAX) /* Linux x86 (glibc-2.3.6-3) */
18 #define MAX_IOVECS IOV_MAX
19 #elif defined(MAX_IOVEC) /* Linux ia64 (glibc-2.3.3-98.28) */
20 #define MAX_IOVECS MAX_IOVEC
21 #elif defined(UIO_MAXIOV) /* Linux x86 (glibc-2.2.5-233) */
22 #define MAX_IOVECS UIO_MAXIOV
23 #elif (defined(__FreeBSD__) && __FreeBSD_version < 500000) || defined(__DragonFly__) || defined(__APPLE__)
26 * (covered in -DKERNEL)
28 #define MAX_IOVECS 1024
30 #error "can't deduce the maximum number of iovec in a readv/writev syscall"