pktbuf_static.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2014-2015 Martine S. Lenders <m.lenders@fu-berlin.de>
3  * Copyright (C) 2014-2021 Freie Universität Berlin
4  *
5  * This file is subject to the terms and conditions of the GNU Lesser
6  * General Public License v2.1. See the file LICENSE in the top level
7  * directory for more details.
8  */
9 
21 #ifndef PKTBUF_STATIC_H
22 #define PKTBUF_STATIC_H
23 
24 #include <sys/types.h>
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
33 #define GNRC_PKTBUF_STATIC_ALIGN_MASK (sizeof(_unused_t) - 1)
34 
38 typedef struct _unused {
39  struct _unused *next;
40  unsigned int size;
42 
47 static inline size_t _align(size_t size)
48 {
51 }
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif /* PKTBUF_STATIC_H */
static size_t _align(size_t size)
Calculates the required space of a number of bytes including alignment to the size of _unused_t.
Definition: pktbuf_static.h:47
struct _unused _unused_t
Marks an unused section of the packet buffer arena array.
#define GNRC_PKTBUF_STATIC_ALIGN_MASK
Mask to align packet buffer allocations with size of _unused_t.
Definition: pktbuf_static.h:33
Marks an unused section of the packet buffer arena array.
Definition: pktbuf_static.h:38
unsigned int size
the size of the unused section
Definition: pktbuf_static.h:40
struct _unused * next
the next unused section
Definition: pktbuf_static.h:39