Commit 9022f069 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 847ab07e
......@@ -35,6 +35,10 @@
// XXX move everything into virtmem.h ?
#include <wendelin/bigfile/virtmem.h> // for VMA
#ifdef __cplusplus
extern "C" {
#endif
/* BigFile base class
*
......@@ -132,4 +136,8 @@ struct bigfile_ops {
};
typedef struct bigfile_ops bigfile_ops;
#ifdef __cplusplus
}
#endif
#endif
......@@ -2,7 +2,7 @@
#define _WENDELIN_BIGFILE_PAGEMAP_H_
/* Wendelin.bigfile | Pgoffset -> page mapping
* Copyright (C) 2014-2015 Nexedi SA and Contributors.
* Copyright (C) 2014-2019 Nexedi SA and Contributors.
* Kirill Smelkov <kirr@nexedi.com>
*
* This program is free software: you can Use, Study, Modify and Redistribute
......@@ -55,6 +55,10 @@
#include <wendelin/bigfile/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct Page Page;
......@@ -247,5 +251,9 @@ void pagemap_clear(PageMap *pmap);
/* - also it can say break and break the whole pagemap */ \
/* iteration */
#ifdef __cplusplus
}
#endif
#endif
......@@ -40,6 +40,10 @@
#include <wendelin/list.h>
#include <wendelin/bigfile/types.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct RAMH RAMH;
typedef struct Page Page;
......@@ -195,4 +199,8 @@ struct ram_type {
void ram_register_type(const struct ram_type *ram_type);
#ifdef __cplusplus
}
#endif
#endif
......@@ -2,7 +2,7 @@
#define _WENDELIN_BIGFILE_TYPES_H_
/* Wendelin.bigfile | Basic types definition
* Copyright (C) 2014-2015 Nexedi SA and Contributors.
* Copyright (C) 2014-2019 Nexedi SA and Contributors.
* Kirill Smelkov <kirr@nexedi.com>
*
* This program is free software: you can Use, Study, Modify and Redistribute
......@@ -24,7 +24,15 @@
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uint64_t pgoff_t; /* page # in file */
typedef uint64_t blk_t; /* block # in file */
#ifdef __cplusplus
}
#endif
#endif
......@@ -38,7 +38,11 @@
#include <wendelin/list.h>
#include <wendelin/bigfile/types.h>
#include <wendelin/bigfile/pagemap.h>
//#include <ccan/bitmap/bitmap.h> // XXX can't forward-decl for bitmap
#ifdef __cplusplus
extern "C" {
#endif
typedef struct bitmap bitmap;
typedef struct RAM RAM;
......@@ -367,5 +371,8 @@ bool __fileh_page_isdirty(BigFileH *fileh, pgoff_t pgoff);
/* what happens on out-of-memory */
void OOM(void);
#ifdef __cplusplus
}
#endif
#endif
......@@ -22,6 +22,9 @@
* See https://www.nexedi.com/licensing for rationale and options.
*/
#ifdef __cplusplus
extern "C" {
#endif
// XXX maybe not needed - just go with std assert()
......@@ -70,5 +73,8 @@ void __bug_errno(const char *, unsigned, const char *)
void __bug_fail(const char *, const char *, unsigned, const char *)
__attribute__((noreturn));
#ifdef __cplusplus
}
#endif
#endif
......@@ -26,6 +26,9 @@
#include <stdlib.h>
#include <pthread.h>
#ifdef __cplusplus
extern "C" {
#endif
/* compile-time exact ilog2(x); x must be 2^k */
#define BUILD_ILOG2_EXACT(x) ( \
......@@ -85,4 +88,8 @@ void xpthread_sigmask(int how, const sigset_t *set, sigset_t *oldset);
void xpthread_mutex_lock(pthread_mutex_t *);
void xpthread_mutex_unlock(pthread_mutex_t *);
#ifdef __cplusplus
}
#endif
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment