Loading...
Searching...
No Matches
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
27extern "C" {
28#endif
29
33#define GNRC_PKTBUF_STATIC_ALIGN_MASK (sizeof(_unused_t) - 1)
34
38typedef struct _unused {
39 struct _unused *next;
40 unsigned int size;
42
47static 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.
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.
Marks an unused section of the packet buffer arena array.
unsigned int size
the size of the unused section
struct _unused * next
the next unused section