skygw_logmanager_init is still useful because it allows for providing memory address for log manager where it can store a list of preallocated write buffers. TBD. Logmanager access is now protected with spinlock familiar from epoll/core/spinlock.c . It is modified to avoid trashing; misses are counted and every tenth subsequent lock acquiring attempt triggers short random sleep.
40 lines
788 B
Makefile
40 lines
788 B
Makefile
include ../build_gateway.inc
|
|
include ../makefile.inc
|
|
|
|
CC = gcc
|
|
CPP = g++
|
|
|
|
LOG_WRITER_PATH := $(shell pwd)
|
|
|
|
makeall: clean all
|
|
|
|
clean:
|
|
make -C ../utils clean
|
|
- $(DEL) *.o
|
|
- $(DEL) *.so
|
|
- $(DEL) *.so.1.0.1
|
|
- $(DEL) *~
|
|
|
|
all: utils lib
|
|
|
|
utils:
|
|
make -C $(ROOT_PATH)/utils clean all
|
|
$(COPY) $(ROOT_PATH)/utils/skygw_utils.o ./
|
|
|
|
lib: libcomp liblink
|
|
|
|
libcomp:
|
|
$(COPY) ../epoll_v1.0/core/atomic.o ./
|
|
$(CPP) -c $(CFLAGS) \
|
|
-I$(MARIADB_SRC_PATH)/include/ -I$(ROOT_PATH)/epoll_v1.0/include \
|
|
-I../utils/ -I./ \
|
|
-fPIC ./log_manager.cc -o log_manager.o $(LDLIBS)
|
|
|
|
liblink:
|
|
$(CPP) -shared \
|
|
-Wl,-soname,liblog_manager.so \
|
|
-o liblog_manager.so.1.0.1 log_manager.o atomic.o \
|
|
$(LDLIBS) $(CPP_LDLIBS)
|
|
$(DEL) ./liblog_manager.so
|
|
$(LINK) ./liblog_manager.so.1.0.1 ./liblog_manager.so
|