Commit 4b339ca6 authored by Filippos Giannakos's avatar Filippos Giannakos

Merge branch 'feature-python' into xseg-refactor

parents 5af1fb4e bbb4378a
......@@ -66,6 +66,7 @@ int dispatch(struct peerd *peer, struct peer_req *pr, struct xseg_request *req,
else {
// printf("completing req id: %u (remote %u)\n", (unsigned int) (pr - peer->peer_reqs), (unsigned int) pr->req->priv);
// nanosleep(&delay,NULL);
print_req(peer->xseg, pr->req);
complete(peer, pr);
}
return 0;
......
......@@ -55,12 +55,13 @@ SHELL=/bin/bash
default: all
all: libxseg.a libxseg.so
make -C python
make -C python MAJOR=$(MAJOR) MINOR=$(MINOR)
make -C xq all
make -C xpool all
make -C xhash all
make -C xheap all
make -C xobj all
make -C python all
COMMA=,
_initialize.c: drivers
......
......@@ -61,7 +61,12 @@ xprotocol.xml:
$(H2XML) -c $(INC) -o $@ $(BASE)/xseg/protocol.h
xseg/xseg_api.py: xseg.xml
$(XML2PY) -d -k defst -l $(BASE)/lib/user/libxseg.so -c $< -o $@
$(XML2PY) -d -k defst -l $(BASE)/lib/user/libxseg.so.$(MAJOR) -c $< -o $@
sed -i -e 's/xseg_get_data_nonstatic.restype = STRING/xseg_get_data_nonstatic.restype = POINTER(c_char)/g' xseg/xseg_api.py
sed -i -e 's/xseg_get_target_nonstatic.restype = STRING/xseg_get_target_nonstatic.restype = POINTER(c_char)/g' xseg/xseg_api.py
sed -i -e 's/STRING = 1//g' xseg/xseg_api.py
sed -i -e 's,$(BASE)/lib/user/libxseg.so.$(MAJOR),libxseg.so.$(MAJOR),g' xseg/xseg_api.py
xseg/xprotocol.py: xprotocol.xml
$(XML2PY) -d -k defst -c $< -o $@
......
This diff is collapsed.
......@@ -1193,6 +1193,8 @@ done:
return req;
}
//add flags
//do not put request if path not empty or X_FORCE set
int xseg_put_request (struct xseg *xseg, struct xseg_request *xreq,
xport portno)
{
......@@ -1804,6 +1806,17 @@ int xseg_finalize(void)
}
char* xseg_get_data_nonstatic(struct xseg* xseg, struct xseg_request *req)
{
return xseg_get_data(xseg, req);
}
char* xseg_get_target_nonstatic(struct xseg* xseg, struct xseg_request *req)
{
return xseg_get_target(xseg, req);
}
#ifdef __KERNEL__
#include <linux/module.h>
#include <xseg/xseg_exports.h>
......
......@@ -429,11 +429,14 @@ struct xseg_request * xseg_accept ( struct xseg * xseg,
struct xseg_port* xseg_get_port(struct xseg *xseg, uint32_t portno);
extern char* xseg_get_data_nonstatic(struct xseg* xseg, struct xseg_request *req);
extern char* xseg_get_target_nonstatic(struct xseg* xseg, struct xseg_request *req);
static inline uint32_t xseg_portno(struct xseg *xseg, struct xseg_port *port)
{
return port->portno;
}
static inline char* xseg_get_target(struct xseg* xseg, struct xseg_request *req)
{
return (char *) XPTR_TAKE(req->target, xseg->segment);
......
......@@ -76,6 +76,8 @@ EXPORT_SYMBOL(xseg_set_max_requests);
EXPORT_SYMBOL(xseg_get_max_requests);
EXPORT_SYMBOL(xseg_get_allocated_requests);
EXPORT_SYMBOL(xseg_set_freequeue_size);
EXPORT_SYMBOL(xseg_get_data_nonstatic);
EXPORT_SYMBOL(xseg_get_target_nonstatic);
EXPORT_SYMBOL(xseg_snprintf);
EXPORT_SYMBOL(__xseg_errbuf);
......
......@@ -59,7 +59,8 @@
struct xlock {
unsigned long owner;
} __attribute__ ((aligned (16))); /* support up to 128bit longs */
};
//} __attribute__ ((aligned (16))); /* support up to 128bit longs */
static inline unsigned long xlock_acquire(struct xlock *lock, unsigned long who)
{
......
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