aboutsummaryrefslogtreecommitdiff
path: root/include/buf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/buf.h')
-rw-r--r--include/buf.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/buf.h b/include/buf.h
new file mode 100644
index 0000000..a49e0fa
--- /dev/null
+++ b/include/buf.h
@@ -0,0 +1,31 @@
1// buf.h --- buffer -*- C -*-
2//
3// Copyright (c) 2026 Martin Michalec <martin@michalec.dev>
4//
5// SPDX-License-Identifier: MIT
6//
7// This file is part of COSMOS Codebase.
8//
9// Commentary:
10//
11// Code:
12
13#ifndef INCLUDED_COSMOS_BUF_H
14#define INCLUDED_COSMOS_BUF_H
15
16#include "types.h"
17
18struct buf {
19 u8 *beg;
20 u8 *ptr;
21 u8 *end;
22};
23
24struct buf buf_from (void *beg, void *ptr, void *end);
25struct buf buf_from_mb (struct mb);
26
27#define DBG_ASSERT_BUF(buf) /* TODO(cmmm): implement */
28
29#endif // INCLUDED_COSMOS_BUF_H
30
31// buf.h ends here