Commit 29448298 authored by Chrysostomos Nanakos's avatar Chrysostomos Nanakos

Provide 'C' linkage

Signed-off-by: default avatarChrysostomos Nanakos <cnanakos@grnet.gr>
parent d4c277f8
......@@ -20,6 +20,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Reply structures.
* Every X_OP returns a corresponding xseg_reply_op struct
......@@ -91,4 +95,8 @@ struct xseg_request_rename {
char target[XSEG_MAX_TARGETLEN];
uint32_t targetlen;
};
#ifdef __cplusplus
}
#endif
#endif
......@@ -38,8 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
/* log stuff */
#define FMTARG(fmt, arg, format, ...) fmt format "%s", arg, ## __VA_ARGS__
#define XSEGLOG(...) (snprintf(__xseg_errbuf, 4096, FMTARG("%s: ", __func__, ## __VA_ARGS__, "")), \
__xseg_errbuf[4095] = 0, __xseg_log(__xseg_errbuf))
......@@ -74,6 +72,9 @@ void log_request(struct log_context *lc, struct xseg *xseg, struct xseg_request
#define X_LOCAL ((uint32_t) (1 << 1))
#define X_NONBLOCK ((uint32_t) (1 << 2))
#ifdef __cplusplus
extern "C" {
#endif
typedef uint64_t xpointer;
......@@ -136,4 +137,8 @@ struct log_ctx {
uint32_t flags;
};
#ifdef __cplusplus
}
#endif
#endif
......@@ -67,6 +67,10 @@ typedef xqindex xcache_handler;
* On non-zero value, user should get the entry which will be put
* to the evicted table.
*/
#ifdef __cplusplus
extern "C" {
#endif
struct xcache_ops {
int (*on_init) (void *cache_data, void *user_data);
int (*on_evict) (void *cache_data, void *evicted_user_data);
......@@ -153,4 +157,8 @@ void xcache_get(struct xcache *cache, xcache_handler h);
uint64_t xcache_free_nodes(struct xcache *cache);
void xcache_free_new(struct xcache *cache, xcache_handler h);
#ifdef __cplusplus
}
#endif
#endif /* __XCACHE_H */
......@@ -29,6 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* -- kkourt@cslab.ece.ntua.gr
*/
#ifdef __cplusplus
extern "C" {
#endif
typedef uint64_t xhashidx;
#define Noxhashidx ((xhashidx) -1)
......@@ -179,6 +183,10 @@ static inline void pset_iter_init(pset_t * pset, pset_iter_t * pi)
#endif /* if 0 */
#ifdef __cplusplus
}
#endif
#endif
// vim:expandtab:tabstop=8:shiftwidth=4:softtabstop=4
......@@ -31,6 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <xseg/xhash.h>
#include <xseg/xpool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef uint64_t xserial;
typedef uint32_t xport;
......@@ -459,4 +463,9 @@ struct xseg_port *xseg_bind_dynport(struct xseg *xseg);
int xseg_leave_dynport(struct xseg *xseg, struct xseg_port *port);
extern uint32_t xseg_portno_nonstatic(struct xseg *xseg,
struct xseg_port *port);
#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