diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-08-11 19:20:32 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-08-11 19:20:32 +0300 |
commit | a82cf4ffb68126f2831ab9877a7ef283dd517690 (patch) | |
tree | 68c8c2e28dcf8b19c0caf2662a62b19132857671 /auto/make | |
parent | a1e9df2aef5a3917728c6fd37280b03020d51123 (diff) | |
download | unit-a82cf4ffb68126f2831ab9877a7ef283dd517690.tar.gz unit-a82cf4ffb68126f2831ab9877a7ef283dd517690.tar.bz2 |
Circular queues implementations and a test.
- naive circular queue, described in the article "A Scalable, Portable, and
Memory-Efficient Lock-Free FIFO Queue" by Ruslan Nikolaev:
https://drops.dagstuhl.de/opus/volltexte/2019/11335/pdf/LIPIcs-DISC-2019-28.pdf
- circular queue, proposed by Valentin Bartenev in the "Unit router application
IPC" design draft
Diffstat (limited to 'auto/make')
-rw-r--r-- | auto/make | 52 |
1 files changed, 52 insertions, 0 deletions
@@ -130,6 +130,42 @@ END done +nxt_src=src/test/nxt_cq_test.c +nxt_obj=src/test/nxt_ncq_test.o +nxt_dep=src/test/nxt_ncq_test.dep +nxt_dep_flags=`nxt_gen_dep_flags` +nxt_dep_post=`nxt_gen_dep_post` +cat << END >> $NXT_MAKEFILE + +$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H + \$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=1 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\ + -o $NXT_BUILD_DIR/$nxt_obj \\ + $nxt_dep_flags \\ + $nxt_src + $nxt_dep_post + +-include $NXT_BUILD_DIR/$nxt_dep + +END + +nxt_src=src/test/nxt_cq_test.c +nxt_obj=src/test/nxt_vbcq_test.o +nxt_dep=src/test/nxt_vbcq_test.dep +nxt_dep_flags=`nxt_gen_dep_flags` +nxt_dep_post=`nxt_gen_dep_post` +cat << END >> $NXT_MAKEFILE + +$NXT_BUILD_DIR/$nxt_obj: $nxt_src $NXT_VERSION_H + \$(CC) -c \$(CFLAGS) -DNXT_NCQ_TEST=0 \$(NXT_LIB_INCS) $NXT_LIB_AUX_CFLAGS \\ + -o $NXT_BUILD_DIR/$nxt_obj \\ + $nxt_dep_flags \\ + $nxt_src + $nxt_dep_post + +-include $NXT_BUILD_DIR/$nxt_dep + +END + $echo >> $NXT_MAKEFILE @@ -151,6 +187,8 @@ if [ $NXT_TESTS = YES ]; then .PHONY: tests tests: $NXT_BUILD_DIR/tests $NXT_BUILD_DIR/utf8_file_name_test \\ + $NXT_BUILD_DIR/ncq_test \\ + $NXT_BUILD_DIR/vbcq_test \\ $NXT_BUILD_DIR/unit_app_test $NXT_BUILD_DIR/unit_websocket_chat \\ $NXT_BUILD_DIR/unit_websocket_echo @@ -169,6 +207,20 @@ $NXT_BUILD_DIR/utf8_file_name_test: $NXT_LIB_UTF8_FILE_NAME_TEST_SRCS \\ $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS +$NXT_BUILD_DIR/ncq_test: $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\ + $NXT_BUILD_DIR/$NXT_LIB_STATIC + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/ncq_test \\ + \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_ncq_test.o \\ + $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ + $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS + +$NXT_BUILD_DIR/vbcq_test: $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\ + $NXT_BUILD_DIR/$NXT_LIB_STATIC + \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/vbcq_test \\ + \$(CFLAGS) $NXT_BUILD_DIR/src/test/nxt_vbcq_test.o \\ + $NXT_BUILD_DIR/$NXT_LIB_STATIC \\ + $NXT_LD_OPT $NXT_LIBM $NXT_LIBS $NXT_LIB_AUX_LIBS + $NXT_BUILD_DIR/unit_app_test: $NXT_BUILD_DIR/src/test/nxt_unit_app_test.o \\ $NXT_BUILD_DIR/$NXT_LIB_UNIT_STATIC \$(NXT_EXEC_LINK) -o $NXT_BUILD_DIR/unit_app_test \\ |