Loading...
Searching...
No Matches
pktbuf_static.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2014-2015 Martine S. Lenders <m.lenders@fu-berlin.de>
3 * SPDX-FileCopyrightText: 2014-2021 Freie Universität Berlin
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
20
21#include <sys/types.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
30#define GNRC_PKTBUF_STATIC_ALIGN_MASK (sizeof(_unused_t) - 1)
31
35typedef struct _unused {
36 struct _unused *next;
37 unsigned int size;
39
44static inline size_t _align(size_t size)
45{
48}
49
50#ifdef __cplusplus
51}
52#endif
53
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