Skip to content

Commit

Permalink
Refactor the C layer to move all "triage" into C layer and minimize C…
Browse files Browse the repository at this point in the history
…Go cross-layer calls

pathname triage is managed by the mount_register structure
fd/stream triage is managed by the fd_register structure
  • Loading branch information
JCapul committed Apr 5, 2019
1 parent 1cf24f8 commit 1f53f0c
Show file tree
Hide file tree
Showing 7 changed files with 399 additions and 189 deletions.
18 changes: 17 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
FROM golang:1.11.5
FROM centos:latest

RUN yum -y update && yum -y install \
wget \
gcc \
make \
strace \
git \
glib2-devel \
yum clean all

# Go language
RUN wget -O go.tar.gz 'https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz' && \
tar xf go.tar.gz -C /usr/local && \
rm go.tar.gz

ENV PATH "/usr/local/go/bin:$PATH"

ENV GO111MODULE=on

Expand Down
2 changes: 1 addition & 1 deletion docker/banner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ echo "* To build pdwfs: *"
echo "* $ make *"
echo "* *"
echo "* To run the test suite you need a running Redis instance: *"
echo "* $ scripts/pdwfs-redis start *"
echo "* $ build/bin/pdwfs-redis restart *"
echo "* $ make test *"
echo "*************************************************************"
8 changes: 4 additions & 4 deletions src/c/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CFLAGS = -std=c99 -g -O2 -Wall -Werror
LDFLAGS =
CFLAGS = -std=c99 -g -O2 -Wall -Werror $(shell pkg-config --cflags glib-2.0)
LDFLAGS = $(shell pkg-config --libs glib-2.0)

BUILDDIR=../../build
SCRIPTSDIR=../../scripts
Expand All @@ -14,8 +14,8 @@ dirs:
$(BUILDDIR)/%.o : %.c
gcc $(CFLAGS) -fPIC -I$(BUILDDIR)/include -c $< -o $@

$(BUILDDIR)/lib/pdwfs.so: $(BUILDDIR)/lib/libpdwfs_go.so $(BUILDDIR)/pdwfs.o $(BUILDDIR)/libc.o
gcc $(LDFLAGS) -fPIC -shared -Wl,-rpath=\$$ORIGIN/../lib -o $@ $(BUILDDIR)/pdwfs.o $(BUILDDIR)/libc.o -ldl -lpdwfs_go -L$(BUILDDIR)/lib
$(BUILDDIR)/lib/pdwfs.so: $(BUILDDIR)/lib/libpdwfs_go.so $(BUILDDIR)/pdwfs.o $(BUILDDIR)/libc.o $(BUILDDIR)/utils.o
gcc $(LDFLAGS) -fPIC -shared -Wl,-rpath=\$$ORIGIN/../lib -o $@ $(BUILDDIR)/pdwfs.o $(BUILDDIR)/libc.o $(BUILDDIR)/utils.o -ldl -lpdwfs_go -L$(BUILDDIR)/lib

$(BUILDDIR)/tests/%: $(BUILDDIR)/tests/%.o
gcc $(LDFLAGS) -o $@ $^
Expand Down
Loading

0 comments on commit 1f53f0c

Please sign in to comment.