2017-11-18 17:09:20 +01:00
|
|
|
/* SPDX-License-Identifier: LGPL-2.1+ */
|
2014-08-18 12:57:03 +02:00
|
|
|
#pragma once
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2015-10-25 13:14:12 +01:00
|
|
|
#include <inttypes.h>
|
2015-11-30 21:43:37 +01:00
|
|
|
#include <stddef.h>
|
|
|
|
#include <stdint.h>
|
2015-11-18 22:46:33 +01:00
|
|
|
#include <sys/types.h>
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-19 19:39:16 +02:00
|
|
|
int memfd_new(const char *name);
|
|
|
|
int memfd_new_and_map(const char *name, size_t sz, void **p);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_map(int fd, uint64_t offset, size_t size, void **p);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_set_sealed(int fd);
|
|
|
|
int memfd_get_sealed(int fd);
|
2013-05-10 14:34:57 +02:00
|
|
|
|
2014-08-18 13:28:43 +02:00
|
|
|
int memfd_get_size(int fd, uint64_t *sz);
|
|
|
|
int memfd_set_size(int fd, uint64_t sz);
|