Changeset 5751a56
- Timestamp:
- Jul 23, 2020, 1:33:29 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 54eb5ebd
- Parents:
- d9c2284
- Location:
- libcfa
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/configure
rd9c2284 r5751a56 677 677 AMDEP_FALSE 678 678 AMDEP_TRUE 679 am__quote680 679 am__include 681 680 DEPDIR … … 784 783 PACKAGE_NAME 785 784 PATH_SEPARATOR 786 SHELL' 785 SHELL 786 am__quote' 787 787 ac_subst_files='' 788 788 ac_user_opts=' … … 2054 2054 2055 2055 } # ac_fn_c_check_header_mongrel 2056 2057 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 2058 # --------------------------------------------- 2059 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 2060 # accordingly. 2061 ac_fn_c_check_decl () 2062 { 2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2064 as_decl_name=`echo $2|sed 's/ *(.*//'` 2065 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 2066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 2067 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } 2068 if eval \${$3+:} false; then : 2069 $as_echo_n "(cached) " >&6 2070 else 2071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2072 /* end confdefs.h. */ 2073 $4 2074 int 2075 main () 2076 { 2077 #ifndef $as_decl_name 2078 #ifdef __cplusplus 2079 (void) $as_decl_use; 2080 #else 2081 (void) $as_decl_name; 2082 #endif 2083 #endif 2084 2085 ; 2086 return 0; 2087 } 2088 _ACEOF 2089 if ac_fn_c_try_compile "$LINENO"; then : 2090 eval "$3=yes" 2091 else 2092 eval "$3=no" 2093 fi 2094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2095 fi 2096 eval ac_res=\$$3 2097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2098 $as_echo "$ac_res" >&6; } 2099 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2100 2101 } # ac_fn_c_check_decl 2056 2102 cat >config.log <<_ACEOF 2057 2103 This file contains any messages produced by compilers while … … 2486 2532 2487 2533 2488 am__api_version='1.1 5'2534 am__api_version='1.16' 2489 2535 2490 2536 # Find a good install program. We prefer a C program (faster), … … 2963 3009 # For better backward compatibility. To be removed once Automake 1.9.x 2964 3010 # dies out for good. For more background, see: 2965 # <http ://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>2966 # <http ://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>3011 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 3012 # <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 2967 3013 mkdir_p='$(MKDIR_P)' 2968 3014 … … 3015 3061 3016 3062 You can download and install GNU coreutils to get an 'rm' implementation 3017 that behaves properly: <http ://www.gnu.org/software/coreutils/>.3063 that behaves properly: <https://www.gnu.org/software/coreutils/>. 3018 3064 3019 3065 If you want to complete the configuration process using your problematic … … 3399 3445 ac_config_commands="$ac_config_commands depfiles" 3400 3446 3401 3402 am_make=${MAKE-make}3403 cat > confinc << 'END'3447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 3448 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } 3449 cat > confinc.mk << 'END' 3404 3450 am__doit: 3405 @echo this is the am__doit target 3451 @echo this is the am__doit target >confinc.out 3406 3452 .PHONY: am__doit 3407 3453 END 3408 # If we don't find an include directive, just comment out the code.3409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&53410 $as_echo_n "checking for style of include used by $am_make... " >&6; }3411 3454 am__include="#" 3412 3455 am__quote= 3413 _am_result=none 3414 # First try GNU make style include. 3415 echo "include confinc" > confmf 3416 # Ignore all kinds of additional output from 'make'. 3417 case `$am_make -s -f confmf 2> /dev/null` in #( 3418 *the\ am__doit\ target*) 3419 am__include=include 3420 am__quote= 3421 _am_result=GNU 3422 ;; 3456 # BSD make does it like this. 3457 echo '.include "confinc.mk" # ignored' > confmf.BSD 3458 # Other make implementations (GNU, Solaris 10, AIX) do it like this. 3459 echo 'include confinc.mk # ignored' > confmf.GNU 3460 _am_result=no 3461 for s in GNU BSD; do 3462 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 3463 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 3464 ac_status=$? 3465 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3466 (exit $ac_status); } 3467 case $?:`cat confinc.out 2>/dev/null` in #( 3468 '0:this is the am__doit target') : 3469 case $s in #( 3470 BSD) : 3471 am__include='.include' am__quote='"' ;; #( 3472 *) : 3473 am__include='include' am__quote='' ;; 3474 esac ;; #( 3475 *) : 3476 ;; 3423 3477 esac 3424 # Now try BSD make style include. 3425 if test "$am__include" = "#"; then 3426 echo '.include "confinc"' > confmf 3427 case `$am_make -s -f confmf 2> /dev/null` in #( 3428 *the\ am__doit\ target*) 3429 am__include=.include 3430 am__quote="\"" 3431 _am_result=BSD 3432 ;; 3433 esac 3434 fi 3435 3436 3437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 3438 $as_echo "$_am_result" >&6; } 3439 rm -f confinc confmf 3478 if test "$am__include" != "#"; then 3479 _am_result="yes ($s style)" 3480 break 3481 fi 3482 done 3483 rm -f confinc.* confmf.* 3484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 3485 $as_echo "${_am_result}" >&6; } 3440 3486 3441 3487 # Check whether --enable-dependency-tracking was given. … … 5941 5987 5942 5988 : ${AR=ar} 5943 : ${AR_FLAGS=cr u}5989 : ${AR_FLAGS=cr} 5944 5990 5945 5991 … … 6442 6488 # Now try to grab the symbols. 6443 6489 nlist=conftest.nm 6444 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 6445 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 6446 ac_status=$? 6447 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6448 test $ac_status = 0; } && test -s "$nlist"; then 6490 $ECHO "$as_me:$LINENO: $NM conftest.$ac_objext | $lt_cv_sys_global_symbol_pipe > $nlist" >&5 6491 if eval "$NM" conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist 2>&5 && test -s "$nlist"; then 6449 6492 # Try sorting and uniquifying the output. 6450 6493 if sort "$nlist" | uniq > "$nlist"T; then … … 7665 7708 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 7666 7709 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 7667 echo "$AR cr ulibconftest.a conftest.o" >&57668 $AR cr ulibconftest.a conftest.o 2>&57710 echo "$AR cr libconftest.a conftest.o" >&5 7711 $AR cr libconftest.a conftest.o 2>&5 7669 7712 echo "$RANLIB libconftest.a" >&5 7670 7713 $RANLIB libconftest.a 2>&5 … … 8792 8835 lt_prog_compiler_wl='-Wl,' 8793 8836 lt_prog_compiler_pic='-KPIC' 8837 lt_prog_compiler_static='-static' 8838 ;; 8839 # flang / f18. f95 an alias for gfortran or flang on Debian 8840 flang* | f18* | f95*) 8841 lt_prog_compiler_wl='-Wl,' 8842 lt_prog_compiler_pic='-fPIC' 8794 8843 lt_prog_compiler_static='-static' 8795 8844 ;; … … 13154 13203 # what "hidden" libraries, object files and flags are used when 13155 13204 # linking a shared library. 13156 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'13205 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 13157 13206 13158 13207 else … … 13646 13695 # from the output so that they don't get included in the library 13647 13696 # dependencies. 13648 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'13697 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 13649 13698 ;; 13650 13699 *) … … 13711 13760 # from the output so that they don't get included in the library 13712 13761 # dependencies. 13713 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'13762 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP " \-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 13714 13763 ;; 13715 13764 *) … … 14050 14099 # what "hidden" libraries, object files and flags are used when 14051 14100 # linking a shared library. 14052 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'14101 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 14053 14102 14054 14103 else … … 14134 14183 # what "hidden" libraries, object files and flags are used when 14135 14184 # linking a shared library. 14136 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'14185 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 14137 14186 else 14138 14187 # g++ 2.7 appears to require '-G' NOT '-shared' on this … … 14145 14194 # what "hidden" libraries, object files and flags are used when 14146 14195 # linking a shared library. 14147 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"'14196 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP " \-L"' 14148 14197 fi 14149 14198 … … 16962 17011 16963 17012 17013 17014 17015 #io_uring 5.4 and earlier uses defines 17016 #io_uring 5.5 uses enum values 17017 #io_uring 5.6 and later uses probes 17018 16964 17019 for ac_header in linux/io_uring.h 16965 17020 do : … … 16969 17024 #define HAVE_LINUX_IO_URING_H 1 16970 17025 _ACEOF 17026 17027 $as_echo "#define CFA_HAVE_LINUX_IO_URING_H 1" >>confdefs.h 17028 17029 # AC_CHECK_HEADER([liburing.h], [ 17030 # AC_CHECK_LIB([uring], [io_uring_get_probe]) 17031 # ]) 17032 17033 ac_fn_c_check_decl "$LINENO" "IORING_OP_NOP" "ac_cv_have_decl_IORING_OP_NOP" "#include <linux/io_uring.h> 17034 " 17035 if test "x$ac_cv_have_decl_IORING_OP_NOP" = xyes; then : 17036 $as_echo "#define CFA_HAVE_IORING_OP_NOP 1" >>confdefs.h 17037 17038 fi 17039 17040 17041 ac_fn_c_check_decl "$LINENO" "IORING_OP_READV" "ac_cv_have_decl_IORING_OP_READV" "#include <linux/io_uring.h> 17042 " 17043 if test "x$ac_cv_have_decl_IORING_OP_READV" = xyes; then : 17044 $as_echo "#define CFA_HAVE_IORING_OP_READV 1" >>confdefs.h 17045 17046 fi 17047 17048 17049 ac_fn_c_check_decl "$LINENO" "IORING_OP_WRITEV" "ac_cv_have_decl_IORING_OP_WRITEV" "#include <linux/io_uring.h> 17050 " 17051 if test "x$ac_cv_have_decl_IORING_OP_WRITEV" = xyes; then : 17052 $as_echo "#define CFA_HAVE_IORING_OP_WRITEV 1" >>confdefs.h 17053 17054 fi 17055 17056 17057 ac_fn_c_check_decl "$LINENO" "IORING_OP_FSYNC" "ac_cv_have_decl_IORING_OP_FSYNC" "#include <linux/io_uring.h> 17058 " 17059 if test "x$ac_cv_have_decl_IORING_OP_FSYNC" = xyes; then : 17060 $as_echo "#define CFA_HAVE_IORING_OP_FSYNC 1" >>confdefs.h 17061 17062 fi 17063 17064 17065 ac_fn_c_check_decl "$LINENO" "IORING_OP_READ_FIXED" "ac_cv_have_decl_IORING_OP_READ_FIXED" "#include <linux/io_uring.h> 17066 " 17067 if test "x$ac_cv_have_decl_IORING_OP_READ_FIXED" = xyes; then : 17068 $as_echo "#define CFA_HAVE_IORING_OP_READ_FIXED 1" >>confdefs.h 17069 17070 fi 17071 17072 17073 ac_fn_c_check_decl "$LINENO" "IORING_OP_WRITE_FIXED" "ac_cv_have_decl_IORING_OP_WRITE_FIXED" "#include <linux/io_uring.h> 17074 " 17075 if test "x$ac_cv_have_decl_IORING_OP_WRITE_FIXED" = xyes; then : 17076 $as_echo "#define CFA_HAVE_IORING_OP_WRITE_FIXED 1" >>confdefs.h 17077 17078 fi 17079 17080 17081 ac_fn_c_check_decl "$LINENO" "IORING_OP_POLL_ADD" "ac_cv_have_decl_IORING_OP_POLL_ADD" "#include <linux/io_uring.h> 17082 " 17083 if test "x$ac_cv_have_decl_IORING_OP_POLL_ADD" = xyes; then : 17084 $as_echo "#define CFA_HAVE_IORING_OP_POLL_ADD 1" >>confdefs.h 17085 17086 fi 17087 17088 17089 ac_fn_c_check_decl "$LINENO" "IORING_OP_POLL_REMOVE" "ac_cv_have_decl_IORING_OP_POLL_REMOVE" "#include <linux/io_uring.h> 17090 " 17091 if test "x$ac_cv_have_decl_IORING_OP_POLL_REMOVE" = xyes; then : 17092 $as_echo "#define CFA_HAVE_IORING_OP_POLL_REMOVE 1" >>confdefs.h 17093 17094 fi 17095 17096 17097 ac_fn_c_check_decl "$LINENO" "IORING_OP_SYNC_FILE_RANGE" "ac_cv_have_decl_IORING_OP_SYNC_FILE_RANGE" "#include <linux/io_uring.h> 17098 " 17099 if test "x$ac_cv_have_decl_IORING_OP_SYNC_FILE_RANGE" = xyes; then : 17100 $as_echo "#define CFA_HAVE_IORING_OP_SYNC_FILE_RANGE 1" >>confdefs.h 17101 17102 fi 17103 17104 17105 ac_fn_c_check_decl "$LINENO" "IORING_OP_SENDMSG" "ac_cv_have_decl_IORING_OP_SENDMSG" "#include <linux/io_uring.h> 17106 " 17107 if test "x$ac_cv_have_decl_IORING_OP_SENDMSG" = xyes; then : 17108 $as_echo "#define CFA_HAVE_IORING_OP_SENDMSG 1" >>confdefs.h 17109 17110 fi 17111 17112 17113 ac_fn_c_check_decl "$LINENO" "IORING_OP_RECVMSG" "ac_cv_have_decl_IORING_OP_RECVMSG" "#include <linux/io_uring.h> 17114 " 17115 if test "x$ac_cv_have_decl_IORING_OP_RECVMSG" = xyes; then : 17116 $as_echo "#define CFA_HAVE_IORING_OP_RECVMSG 1" >>confdefs.h 17117 17118 fi 17119 17120 17121 ac_fn_c_check_decl "$LINENO" "IORING_OP_TIMEOUT" "ac_cv_have_decl_IORING_OP_TIMEOUT" "#include <linux/io_uring.h> 17122 " 17123 if test "x$ac_cv_have_decl_IORING_OP_TIMEOUT" = xyes; then : 17124 $as_echo "#define CFA_HAVE_IORING_OP_TIMEOUT 1" >>confdefs.h 17125 17126 fi 17127 17128 17129 ac_fn_c_check_decl "$LINENO" "IORING_OP_TIMEOUT_REMOVE" "ac_cv_have_decl_IORING_OP_TIMEOUT_REMOVE" "#include <linux/io_uring.h> 17130 " 17131 if test "x$ac_cv_have_decl_IORING_OP_TIMEOUT_REMOVE" = xyes; then : 17132 $as_echo "#define CFA_HAVE_IORING_OP_TIMEOUT_REMOVE 1" >>confdefs.h 17133 17134 fi 17135 17136 17137 ac_fn_c_check_decl "$LINENO" "IORING_OP_ACCEPT" "ac_cv_have_decl_IORING_OP_ACCEPT" "#include <linux/io_uring.h> 17138 " 17139 if test "x$ac_cv_have_decl_IORING_OP_ACCEPT" = xyes; then : 17140 $as_echo "#define CFA_HAVE_IORING_OP_ACCEPT 1" >>confdefs.h 17141 17142 fi 17143 17144 17145 ac_fn_c_check_decl "$LINENO" "IORING_OP_ASYNC_CANCEL" "ac_cv_have_decl_IORING_OP_ASYNC_CANCEL" "#include <linux/io_uring.h> 17146 " 17147 if test "x$ac_cv_have_decl_IORING_OP_ASYNC_CANCEL" = xyes; then : 17148 $as_echo "#define CFA_HAVE_IORING_OP_ASYNC_CANCEL 1" >>confdefs.h 17149 17150 fi 17151 17152 17153 ac_fn_c_check_decl "$LINENO" "IORING_OP_LINK_TIMEOUT" "ac_cv_have_decl_IORING_OP_LINK_TIMEOUT" "#include <linux/io_uring.h> 17154 " 17155 if test "x$ac_cv_have_decl_IORING_OP_LINK_TIMEOUT" = xyes; then : 17156 $as_echo "#define CFA_HAVE_IORING_OP_LINK_TIMEOUT 1" >>confdefs.h 17157 17158 fi 17159 17160 17161 ac_fn_c_check_decl "$LINENO" "IORING_OP_CONNECT" "ac_cv_have_decl_IORING_OP_CONNECT" "#include <linux/io_uring.h> 17162 " 17163 if test "x$ac_cv_have_decl_IORING_OP_CONNECT" = xyes; then : 17164 $as_echo "#define CFA_HAVE_IORING_OP_CONNECT 1" >>confdefs.h 17165 17166 fi 17167 17168 17169 ac_fn_c_check_decl "$LINENO" "IORING_OP_FALLOCATE" "ac_cv_have_decl_IORING_OP_FALLOCATE" "#include <linux/io_uring.h> 17170 " 17171 if test "x$ac_cv_have_decl_IORING_OP_FALLOCATE" = xyes; then : 17172 $as_echo "#define CFA_HAVE_IORING_OP_FALLOCATE 1" >>confdefs.h 17173 17174 fi 17175 17176 17177 ac_fn_c_check_decl "$LINENO" "IORING_OP_OPENAT" "ac_cv_have_decl_IORING_OP_OPENAT" "#include <linux/io_uring.h> 17178 " 17179 if test "x$ac_cv_have_decl_IORING_OP_OPENAT" = xyes; then : 17180 $as_echo "#define CFA_HAVE_IORING_OP_OPENAT 1" >>confdefs.h 17181 17182 fi 17183 17184 17185 ac_fn_c_check_decl "$LINENO" "IORING_OP_CLOSE" "ac_cv_have_decl_IORING_OP_CLOSE" "#include <linux/io_uring.h> 17186 " 17187 if test "x$ac_cv_have_decl_IORING_OP_CLOSE" = xyes; then : 17188 $as_echo "#define CFA_HAVE_IORING_OP_CLOSE 1" >>confdefs.h 17189 17190 fi 17191 17192 17193 ac_fn_c_check_decl "$LINENO" "IORING_OP_FILES_UPDATE" "ac_cv_have_decl_IORING_OP_FILES_UPDATE" "#include <linux/io_uring.h> 17194 " 17195 if test "x$ac_cv_have_decl_IORING_OP_FILES_UPDATE" = xyes; then : 17196 $as_echo "#define CFA_HAVE_IORING_OP_FILES_UPDATE 1" >>confdefs.h 17197 17198 fi 17199 17200 17201 ac_fn_c_check_decl "$LINENO" "IORING_OP_STATX" "ac_cv_have_decl_IORING_OP_STATX" "#include <linux/io_uring.h> 17202 " 17203 if test "x$ac_cv_have_decl_IORING_OP_STATX" = xyes; then : 17204 $as_echo "#define CFA_HAVE_IORING_OP_STATX 1" >>confdefs.h 17205 17206 fi 17207 17208 17209 ac_fn_c_check_decl "$LINENO" "IORING_OP_READ" "ac_cv_have_decl_IORING_OP_READ" "#include <linux/io_uring.h> 17210 " 17211 if test "x$ac_cv_have_decl_IORING_OP_READ" = xyes; then : 17212 $as_echo "#define CFA_HAVE_IORING_OP_READ 1" >>confdefs.h 17213 17214 fi 17215 17216 17217 ac_fn_c_check_decl "$LINENO" "IORING_OP_WRITE" "ac_cv_have_decl_IORING_OP_WRITE" "#include <linux/io_uring.h> 17218 " 17219 if test "x$ac_cv_have_decl_IORING_OP_WRITE" = xyes; then : 17220 $as_echo "#define CFA_HAVE_IORING_OP_WRITE 1" >>confdefs.h 17221 17222 fi 17223 17224 17225 ac_fn_c_check_decl "$LINENO" "IORING_OP_FADVISE" "ac_cv_have_decl_IORING_OP_FADVISE" "#include <linux/io_uring.h> 17226 " 17227 if test "x$ac_cv_have_decl_IORING_OP_FADVISE" = xyes; then : 17228 $as_echo "#define CFA_HAVE_IORING_OP_FADVISE 1" >>confdefs.h 17229 17230 fi 17231 17232 17233 ac_fn_c_check_decl "$LINENO" "IORING_OP_MADVISE" "ac_cv_have_decl_IORING_OP_MADVISE" "#include <linux/io_uring.h> 17234 " 17235 if test "x$ac_cv_have_decl_IORING_OP_MADVISE" = xyes; then : 17236 $as_echo "#define CFA_HAVE_IORING_OP_MADVISE 1" >>confdefs.h 17237 17238 fi 17239 17240 17241 ac_fn_c_check_decl "$LINENO" "IORING_OP_SEND" "ac_cv_have_decl_IORING_OP_SEND" "#include <linux/io_uring.h> 17242 " 17243 if test "x$ac_cv_have_decl_IORING_OP_SEND" = xyes; then : 17244 $as_echo "#define CFA_HAVE_IORING_OP_SEND 1" >>confdefs.h 17245 17246 fi 17247 17248 17249 ac_fn_c_check_decl "$LINENO" "IORING_OP_RECV" "ac_cv_have_decl_IORING_OP_RECV" "#include <linux/io_uring.h> 17250 " 17251 if test "x$ac_cv_have_decl_IORING_OP_RECV" = xyes; then : 17252 $as_echo "#define CFA_HAVE_IORING_OP_RECV 1" >>confdefs.h 17253 17254 fi 17255 17256 17257 ac_fn_c_check_decl "$LINENO" "IORING_OP_OPENAT2" "ac_cv_have_decl_IORING_OP_OPENAT2" "#include <linux/io_uring.h> 17258 " 17259 if test "x$ac_cv_have_decl_IORING_OP_OPENAT2" = xyes; then : 17260 $as_echo "#define CFA_HAVE_IORING_OP_OPENAT2 1" >>confdefs.h 17261 17262 fi 17263 17264 17265 ac_fn_c_check_decl "$LINENO" "IORING_OP_EPOLL_CTL" "ac_cv_have_decl_IORING_OP_EPOLL_CTL" "#include <linux/io_uring.h> 17266 " 17267 if test "x$ac_cv_have_decl_IORING_OP_EPOLL_CTL" = xyes; then : 17268 $as_echo "#define CFA_HAVE_IORING_OP_EPOLL_CTL 1" >>confdefs.h 17269 17270 fi 17271 17272 17273 ac_fn_c_check_decl "$LINENO" "IORING_OP_SPLICE" "ac_cv_have_decl_IORING_OP_SPLICE" "#include <linux/io_uring.h> 17274 " 17275 if test "x$ac_cv_have_decl_IORING_OP_SPLICE" = xyes; then : 17276 $as_echo "#define CFA_HAVE_IORING_OP_SPLICE 1" >>confdefs.h 17277 17278 fi 17279 17280 17281 ac_fn_c_check_decl "$LINENO" "IORING_OP_PROVIDE_BUFFERS" "ac_cv_have_decl_IORING_OP_PROVIDE_BUFFERS" "#include <linux/io_uring.h> 17282 " 17283 if test "x$ac_cv_have_decl_IORING_OP_PROVIDE_BUFFERS" = xyes; then : 17284 $as_echo "#define CFA_HAVE_IORING_OP_PROVIDE_BUFFERS 1" >>confdefs.h 17285 17286 fi 17287 17288 17289 ac_fn_c_check_decl "$LINENO" "IORING_OP_REMOVE_BUFFER" "ac_cv_have_decl_IORING_OP_REMOVE_BUFFER" "#include <linux/io_uring.h> 17290 " 17291 if test "x$ac_cv_have_decl_IORING_OP_REMOVE_BUFFER" = xyes; then : 17292 $as_echo "#define CFA_HAVE_IORING_OP_REMOVE_BUFFER 1" >>confdefs.h 17293 17294 fi 17295 17296 16971 17297 16972 17298 fi … … 17728 18054 # INIT-COMMANDS 17729 18055 # 17730 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"18056 AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" 17731 18057 17732 18058 … … 18724 19050 # are listed without --file. Let's play safe and only enable the eval 18725 19051 # if we detect the quoting. 18726 case $CONFIG_FILES in 18727 *\'*) eval set x "$CONFIG_FILES" ;; 18728 *) set x $CONFIG_FILES ;; 18729 esac 19052 # TODO: see whether this extra hack can be removed once we start 19053 # requiring Autoconf 2.70 or later. 19054 case $CONFIG_FILES in #( 19055 *\'*) : 19056 eval set x "$CONFIG_FILES" ;; #( 19057 *) : 19058 set x $CONFIG_FILES ;; #( 19059 *) : 19060 ;; 19061 esac 18730 19062 shift 18731 for mf 19063 # Used to flag and report bootstrapping failures. 19064 am_rc=0 19065 for am_mf 18732 19066 do 18733 19067 # Strip MF so we end up with the name of the file. 18734 mf=`echo "$mf" | sed -e 's/:.*$//'` 18735 # Check whether this is an Automake generated Makefile or not. 18736 # We used to match only the files named 'Makefile.in', but 18737 # some people rename them; so instead we look at the file content. 18738 # Grep'ing the first line is not enough: some people post-process 18739 # each Makefile.in and add a new line on top of each file to say so. 18740 # Grep'ing the whole file is not good either: AIX grep has a line 19068 am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` 19069 # Check whether this is an Automake generated Makefile which includes 19070 # dependency-tracking related rules and includes. 19071 # Grep'ing the whole file directly is not great: AIX grep has a line 18741 19072 # limit of 2048, but all sed's we know have understand at least 4000. 18742 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 18743 dirpart=`$as_dirname -- "$mf" || 18744 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 18745 X"$mf" : 'X\(//\)[^/]' \| \ 18746 X"$mf" : 'X\(//\)$' \| \ 18747 X"$mf" : 'X\(/\)' \| . 2>/dev/null || 18748 $as_echo X"$mf" | 19073 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 19074 || continue 19075 am_dirpart=`$as_dirname -- "$am_mf" || 19076 $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 19077 X"$am_mf" : 'X\(//\)[^/]' \| \ 19078 X"$am_mf" : 'X\(//\)$' \| \ 19079 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || 19080 $as_echo X"$am_mf" | 18749 19081 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 18750 19082 s//\1/ … … 18764 19096 } 18765 19097 s/.*/./; q'` 18766 else 18767 continue 18768 fi 18769 # Extract the definition of DEPDIR, am__include, and am__quote 18770 # from the Makefile without running 'make'. 18771 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 18772 test -z "$DEPDIR" && continue 18773 am__include=`sed -n 's/^am__include = //p' < "$mf"` 18774 test -z "$am__include" && continue 18775 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 18776 # Find all dependency output files, they are included files with 18777 # $(DEPDIR) in their names. We invoke sed twice because it is the 18778 # simplest approach to changing $(DEPDIR) to its actual value in the 18779 # expansion. 18780 for file in `sed -n " 18781 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 18782 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 18783 # Make sure the directory exists. 18784 test -f "$dirpart/$file" && continue 18785 fdir=`$as_dirname -- "$file" || 18786 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 18787 X"$file" : 'X\(//\)[^/]' \| \ 18788 X"$file" : 'X\(//\)$' \| \ 18789 X"$file" : 'X\(/\)' \| . 2>/dev/null || 18790 $as_echo X"$file" | 18791 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 19098 am_filepart=`$as_basename -- "$am_mf" || 19099 $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ 19100 X"$am_mf" : 'X\(//\)$' \| \ 19101 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || 19102 $as_echo X/"$am_mf" | 19103 sed '/^.*\/\([^/][^/]*\)\/*$/{ 18792 19104 s//\1/ 18793 19105 q 18794 19106 } 18795 /^X\ (\/\/\)[^/].*/{19107 /^X\/\(\/\/\)$/{ 18796 19108 s//\1/ 18797 19109 q 18798 19110 } 18799 /^X\(\/\/\)$/{ 18800 s//\1/ 18801 q 18802 } 18803 /^X\(\/\).*/{ 19111 /^X\/\(\/\).*/{ 18804 19112 s//\1/ 18805 19113 q 18806 19114 } 18807 19115 s/.*/./; q'` 18808 as_dir=$dirpart/$fdir; as_fn_mkdir_p 18809 # echo "creating $dirpart/$file" 18810 echo '# dummy' > "$dirpart/$file" 18811 done 19116 { echo "$as_me:$LINENO: cd "$am_dirpart" \ 19117 && sed -e '/# am--include-marker/d' "$am_filepart" \ 19118 | $MAKE -f - am--depfiles" >&5 19119 (cd "$am_dirpart" \ 19120 && sed -e '/# am--include-marker/d' "$am_filepart" \ 19121 | $MAKE -f - am--depfiles) >&5 2>&5 19122 ac_status=$? 19123 echo "$as_me:$LINENO: \$? = $ac_status" >&5 19124 (exit $ac_status); } || am_rc=$? 18812 19125 done 19126 if test $am_rc -ne 0; then 19127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 19128 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 19129 as_fn_error $? "Something went wrong bootstrapping makefile fragments 19130 for automatic dependency tracking. Try re-running configure with the 19131 '--disable-dependency-tracking' option to at least be able to build 19132 the package (albeit without support for automatic dependency tracking). 19133 See \`config.log' for more details" "$LINENO" 5; } 19134 fi 19135 { am_dirpart=; unset am_dirpart;} 19136 { am_filepart=; unset am_filepart;} 19137 { am_mf=; unset am_mf;} 19138 { am_rc=; unset am_rc;} 19139 rm -f conftest-deps.mk 18813 19140 } 18814 19141 ;; … … 18828 19155 #! $SHELL 18829 19156 # Generated automatically by $as_me ($PACKAGE) $VERSION 18830 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:18831 19157 # NOTE: Changes made to this file will be lost: look at ltmain.sh. 18832 19158 -
libcfa/configure.ac
rd9c2284 r5751a56 123 123 AC_PROG_MAKE_SET 124 124 125 AC_CHECK_HEADERS([linux/io_uring.h]) 125 126 127 #io_uring 5.4 and earlier uses defines 128 #io_uring 5.5 uses enum values 129 #io_uring 5.6 and later uses probes 130 131 AC_CHECK_HEADERS([linux/io_uring.h], [ 132 AC_DEFINE(CFA_HAVE_LINUX_IO_URING_H) 133 # AC_CHECK_HEADER([liburing.h], [ 134 # AC_CHECK_LIB([uring], [io_uring_get_probe]) 135 # ]) 136 m4_foreach([op], [IORING_OP_NOP,IORING_OP_READV,IORING_OP_WRITEV,IORING_OP_FSYNC,IORING_OP_READ_FIXED,IORING_OP_WRITE_FIXED,IORING_OP_POLL_ADD,IORING_OP_POLL_REMOVE,IORING_OP_SYNC_FILE_RANGE,IORING_OP_SENDMSG,IORING_OP_RECVMSG,IORING_OP_TIMEOUT,IORING_OP_TIMEOUT_REMOVE,IORING_OP_ACCEPT,IORING_OP_ASYNC_CANCEL,IORING_OP_LINK_TIMEOUT,IORING_OP_CONNECT,IORING_OP_FALLOCATE,IORING_OP_OPENAT,IORING_OP_CLOSE,IORING_OP_FILES_UPDATE,IORING_OP_STATX,IORING_OP_READ,IORING_OP_WRITE,IORING_OP_FADVISE,IORING_OP_MADVISE,IORING_OP_SEND,IORING_OP_RECV,IORING_OP_OPENAT2,IORING_OP_EPOLL_CTL,IORING_OP_SPLICE,IORING_OP_PROVIDE_BUFFERS,IORING_OP_REMOVE_BUFFER], [ 137 AC_CHECK_DECL(op, [AC_DEFINE([CFA_HAVE_]op)], [], [[#include <linux/io_uring.h>]]) 138 ]) 139 ]) 126 140 AC_CHECK_FUNCS([preadv2 pwritev2]) 127 141 -
libcfa/prelude/defines.hfa.in
rd9c2284 r5751a56 14 14 // 15 15 16 #undef HAVE_LINUX_IO_URING_H 16 #undef CFA_HAVE_LINUX_IO_URING_H 17 18 #undef CFA_HAVE_IORING_OP_NOP 19 #undef CFA_HAVE_IORING_OP_READV 20 #undef CFA_HAVE_IORING_OP_WRITEV 21 #undef CFA_HAVE_IORING_OP_FSYNC 22 #undef CFA_HAVE_IORING_OP_READ_FIXED 23 #undef CFA_HAVE_IORING_OP_WRITE_FIXED 24 #undef CFA_HAVE_IORING_OP_POLL_ADD 25 #undef CFA_HAVE_IORING_OP_POLL_REMOVE 26 #undef CFA_HAVE_IORING_OP_SYNC_FILE_RANGE 27 #undef CFA_HAVE_IORING_OP_SENDMSG 28 #undef CFA_HAVE_IORING_OP_RECVMSG 29 #undef CFA_HAVE_IORING_OP_TIMEOUT 30 #undef CFA_HAVE_IORING_OP_TIMEOUT_REMOVE 31 #undef CFA_HAVE_IORING_OP_ACCEPT 32 #undef CFA_HAVE_IORING_OP_ASYNC_CANCEL 33 #undef CFA_HAVE_IORING_OP_LINK_TIMEOUT 34 #undef CFA_HAVE_IORING_OP_CONNECT 35 #undef CFA_HAVE_IORING_OP_FALLOCATE 36 #undef CFA_HAVE_IORING_OP_OPENAT 37 #undef CFA_HAVE_IORING_OP_CLOSE 38 #undef CFA_HAVE_IORING_OP_FILES_UPDATE 39 #undef CFA_HAVE_IORING_OP_STATX 40 #undef CFA_HAVE_IORING_OP_READ 41 #undef CFA_HAVE_IORING_OP_WRITE 42 #undef CFA_HAVE_IORING_OP_FADVISE 43 #undef CFA_HAVE_IORING_OP_MADVISE 44 #undef CFA_HAVE_IORING_OP_SEND 45 #undef CFA_HAVE_IORING_OP_RECV 46 #undef CFA_HAVE_IORING_OP_OPENAT2 47 #undef CFA_HAVE_IORING_OP_EPOLL_CTL 48 #undef CFA_HAVE_IORING_OP_SPLICE 49 #undef CFA_HAVE_IORING_OP_PROVIDE_BUFFERS 50 #undef CFA_HAVE_IORING_OP_REMOVE_BUFFER 17 51 18 52 #undef HAVE_PREADV2 -
libcfa/src/concurrency/io.cfa
rd9c2284 r5751a56 16 16 #if defined(__CFA_DEBUG__) 17 17 // #define __CFA_DEBUG_PRINT_IO__ 18 #define __CFA_DEBUG_PRINT_IO_CORE__18 // #define __CFA_DEBUG_PRINT_IO_CORE__ 19 19 #endif 20 20 … … 22 22 #include "bitmanip.hfa" 23 23 24 #if !defined( HAVE_LINUX_IO_URING_H)24 #if !defined(CFA_HAVE_LINUX_IO_URING_H) 25 25 void __kernel_io_startup( cluster &, unsigned, bool ) { 26 26 // Nothing to do without io_uring … … 490 490 static uint32_t __release_consumed_submission( struct __io_data & ring ); 491 491 492 static inline void process(struct io_uring_cqe & cqe, struct __processor_id_t * id ) { 493 struct __io_user_data_t * data = (struct __io_user_data_t *)(uintptr_t)cqe.user_data; 494 __cfadbg_print_safe( io, "Kernel I/O : Syscall completed : cqe %p, result %d for %p\n", data, cqe.res, data->thrd ); 495 496 data->result = cqe.res; 497 if(!id) { unpark( data->thrd __cfaabi_dbg_ctx2 ); } 498 else { __unpark( id, data->thrd __cfaabi_dbg_ctx2 ); } 499 } 500 492 501 // Process a single completion message from the io_uring 493 502 // This is NOT thread-safe … … 538 547 /* paranoid */ verify(&cqe); 539 548 540 struct __io_user_data_t * data = (struct __io_user_data_t *)(uintptr_t)cqe.user_data; 541 __cfadbg_print_safe( io, "Kernel I/O : Performed reading io cqe %p, result %d for %p\n", data, cqe.res, data->thrd ); 542 543 data->result = cqe.res; 544 if(!mask) { unpark( data->thrd __cfaabi_dbg_ctx2 ); } 545 else { __unpark( &ring.poller.slow.id, data->thrd __cfaabi_dbg_ctx2 ); } 549 process( cqe, !mask ? (struct __processor_id_t *)0p : &ring.poller.slow.id ); 546 550 } 547 551 -
libcfa/src/concurrency/iocall.cfa
rd9c2284 r5751a56 20 20 //============================================================================================= 21 21 22 #if defined( HAVE_LINUX_IO_URING_H)22 #if defined(CFA_HAVE_LINUX_IO_URING_H) 23 23 #include <stdint.h> 24 24 #include <linux/io_uring.h> … … 122 122 #if defined(HAVE_PREADV2) 123 123 ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) { 124 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READV)124 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_READV) 125 125 return preadv2(fd, iov, iovcnt, offset, flags); 126 126 #else … … 134 134 135 135 ssize_t cfa_preadv2_fixed(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) { 136 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READV)136 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_READV) 137 137 return preadv2(fd, iov, iovcnt, offset, flags); 138 138 #else … … 149 149 #if defined(HAVE_PWRITEV2) 150 150 ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) { 151 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_WRITEV)151 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_WRITEV) 152 152 return pwritev2(fd, iov, iovcnt, offset, flags); 153 153 #else … … 162 162 163 163 int cfa_fsync(int fd) { 164 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_FSYNC)164 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_FSYNC) 165 165 return fsync(fd); 166 166 #else … … 174 174 175 175 int cfa_sync_file_range(int fd, int64_t offset, int64_t nbytes, unsigned int flags) { 176 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_SYNC_FILE_RANGE)176 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_SYNC_FILE_RANGE) 177 177 return sync_file_range(fd, offset, nbytes, flags); 178 178 #else … … 190 190 191 191 ssize_t cfa_sendmsg(int sockfd, const struct msghdr *msg, int flags) { 192 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_SENDMSG)192 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_SENDMSG) 193 193 return sendmsg(sockfd, msg, flags); 194 194 #else … … 203 203 204 204 ssize_t cfa_recvmsg(int sockfd, struct msghdr *msg, int flags) { 205 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_RECVMSG)205 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_RECVMSG) 206 206 return recvmsg(sockfd, msg, flags); 207 207 #else … … 216 216 217 217 ssize_t cfa_send(int sockfd, const void *buf, size_t len, int flags) { 218 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_SEND)218 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_SEND) 219 219 return send( sockfd, buf, len, flags ); 220 220 #else … … 231 231 232 232 ssize_t cfa_recv(int sockfd, void *buf, size_t len, int flags) { 233 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_RECV)233 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_RECV) 234 234 return recv( sockfd, buf, len, flags ); 235 235 #else … … 246 246 247 247 int cfa_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int flags) { 248 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_ACCEPT)248 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_ACCEPT) 249 249 return accept4( sockfd, addr, addrlen, flags ); 250 250 #else … … 261 261 262 262 int cfa_connect(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { 263 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_CONNECT)263 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_CONNECT) 264 264 return connect( sockfd, addr, addrlen ); 265 265 #else … … 275 275 276 276 int cfa_fallocate(int fd, int mode, uint64_t offset, uint64_t len) { 277 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_FALLOCATE)277 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_FALLOCATE) 278 278 return fallocate( fd, mode, offset, len ); 279 279 #else … … 290 290 291 291 int cfa_fadvise(int fd, uint64_t offset, uint64_t len, int advice) { 292 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_FADVISE)292 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_FADVISE) 293 293 return posix_fadvise( fd, offset, len, advice ); 294 294 #else … … 305 305 306 306 int cfa_madvise(void *addr, size_t length, int advice) { 307 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_MADVISE)307 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_MADVISE) 308 308 return madvise( addr, length, advice ); 309 309 #else … … 320 320 321 321 int cfa_openat(int dirfd, const char *pathname, int flags, mode_t mode) { 322 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_OPENAT)322 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_OPENAT) 323 323 return openat( dirfd, pathname, flags, mode ); 324 324 #else … … 335 335 336 336 int cfa_close(int fd) { 337 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_CLOSE)337 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_CLOSE) 338 338 return close( fd ); 339 339 #else … … 349 349 struct statx; 350 350 int cfa_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) { 351 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_STATX)351 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_STATX) 352 352 #if defined(__NR_statx) 353 353 return syscall( __NR_statx, dirfd, pathname, flags, mask, statxbuf ); … … 367 367 368 368 ssize_t cfa_read(int fd, void *buf, size_t count) { 369 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READ)369 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_READ) 370 370 return read( fd, buf, count ); 371 371 #else … … 379 379 380 380 ssize_t cfa_write(int fd, void *buf, size_t count) { 381 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_WRITE)381 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_WRITE) 382 382 return read( fd, buf, count ); 383 383 #else … … 391 391 392 392 ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags) { 393 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_SPLICE)393 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_SPLICE) 394 394 return splice( fd_in, off_in, fd_out, off_out, len, flags ); 395 395 #else … … 405 405 } 406 406 407 ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags, int in_flags, int out_flags) { 408 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_SPLICE) 409 return splice( fd_in, off_in, fd_out, off_out, len, flags ); 410 #else 411 __submit_prelude 412 413 (*sqe){ IORING_OP_SPLICE, fd_out, 0p, len, off_out }; 414 sqe->splice_fd_in = fd_in; 415 sqe->splice_off_in = off_in; 416 sqe->splice_flags = flags | out_flags; 417 sqe->flags = in_flags; 418 419 __submit_wait 420 #endif 421 } 422 407 423 ssize_t cfa_tee(int fd_in, int fd_out, size_t len, unsigned int flags) { 408 #if !defined( HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_TEE)424 #if !defined(CFA_HAVE_LINUX_IO_URING_H) || !defined(CFA_HAVE_IORING_OP_TEE) 409 425 return tee( fd_in, fd_out, len, flags ); 410 426 #else … … 429 445 430 446 bool has_user_level_blocking( fptr_t func ) { 431 #if defined( HAVE_LINUX_IO_URING_H)447 #if defined(CFA_HAVE_LINUX_IO_URING_H) 432 448 #if defined(HAVE_PREADV2) 433 449 if( /*func == (fptr_t)preadv2 || */ 434 450 func == (fptr_t)cfa_preadv2 ) 435 #define _CFA_IO_FEATURE_ IORING_OP_READV ,436 return IS_DEFINED( IORING_OP_READV);451 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_READV , 452 return IS_DEFINED(CFA_HAVE_IORING_OP_READV); 437 453 #endif 438 454 … … 440 456 if( /*func == (fptr_t)pwritev2 || */ 441 457 func == (fptr_t)cfa_pwritev2 ) 442 #define _CFA_IO_FEATURE_ IORING_OP_WRITEV ,443 return IS_DEFINED( IORING_OP_WRITEV);458 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_WRITEV , 459 return IS_DEFINED(CFA_HAVE_IORING_OP_WRITEV); 444 460 #endif 445 461 446 462 if( /*func == (fptr_t)fsync || */ 447 463 func == (fptr_t)cfa_fsync ) 448 #define _CFA_IO_FEATURE_ IORING_OP_FSYNC ,449 return IS_DEFINED( IORING_OP_FSYNC);464 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_FSYNC , 465 return IS_DEFINED(CFA_HAVE_IORING_OP_FSYNC); 450 466 451 467 if( /*func == (fptr_t)ync_file_range || */ 452 468 func == (fptr_t)cfa_sync_file_range ) 453 #define _CFA_IO_FEATURE_ IORING_OP_SYNC_FILE_RANGE ,454 return IS_DEFINED( IORING_OP_SYNC_FILE_RANGE);469 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_SYNC_FILE_RANGE , 470 return IS_DEFINED(CFA_HAVE_IORING_OP_SYNC_FILE_RANGE); 455 471 456 472 if( /*func == (fptr_t)sendmsg || */ 457 473 func == (fptr_t)cfa_sendmsg ) 458 #define _CFA_IO_FEATURE_ IORING_OP_SENDMSG ,459 return IS_DEFINED( IORING_OP_SENDMSG);474 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_SENDMSG , 475 return IS_DEFINED(CFA_HAVE_IORING_OP_SENDMSG); 460 476 461 477 if( /*func == (fptr_t)recvmsg || */ 462 478 func == (fptr_t)cfa_recvmsg ) 463 #define _CFA_IO_FEATURE_ IORING_OP_RECVMSG ,464 return IS_DEFINED( IORING_OP_RECVMSG);479 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_RECVMSG , 480 return IS_DEFINED(CFA_HAVE_IORING_OP_RECVMSG); 465 481 466 482 if( /*func == (fptr_t)send || */ 467 483 func == (fptr_t)cfa_send ) 468 #define _CFA_IO_FEATURE_ IORING_OP_SEND ,469 return IS_DEFINED( IORING_OP_SEND);484 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_SEND , 485 return IS_DEFINED(CFA_HAVE_IORING_OP_SEND); 470 486 471 487 if( /*func == (fptr_t)recv || */ 472 488 func == (fptr_t)cfa_recv ) 473 #define _CFA_IO_FEATURE_ IORING_OP_RECV ,474 return IS_DEFINED( IORING_OP_RECV);489 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_RECV , 490 return IS_DEFINED(CFA_HAVE_IORING_OP_RECV); 475 491 476 492 if( /*func == (fptr_t)accept4 || */ 477 493 func == (fptr_t)cfa_accept4 ) 478 #define _CFA_IO_FEATURE_ IORING_OP_ACCEPT ,479 return IS_DEFINED( IORING_OP_ACCEPT);494 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_ACCEPT , 495 return IS_DEFINED(CFA_HAVE_IORING_OP_ACCEPT); 480 496 481 497 if( /*func == (fptr_t)connect || */ 482 498 func == (fptr_t)cfa_connect ) 483 #define _CFA_IO_FEATURE_ IORING_OP_CONNECT ,484 return IS_DEFINED( IORING_OP_CONNECT);499 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_CONNECT , 500 return IS_DEFINED(CFA_HAVE_IORING_OP_CONNECT); 485 501 486 502 if( /*func == (fptr_t)fallocate || */ 487 503 func == (fptr_t)cfa_fallocate ) 488 #define _CFA_IO_FEATURE_ IORING_OP_FALLOCATE ,489 return IS_DEFINED( IORING_OP_FALLOCATE);504 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_FALLOCATE , 505 return IS_DEFINED(CFA_HAVE_IORING_OP_FALLOCATE); 490 506 491 507 if( /*func == (fptr_t)posix_fadvise || */ 492 508 func == (fptr_t)cfa_fadvise ) 493 #define _CFA_IO_FEATURE_ IORING_OP_FADVISE ,494 return IS_DEFINED( IORING_OP_FADVISE);509 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_FADVISE , 510 return IS_DEFINED(CFA_HAVE_IORING_OP_FADVISE); 495 511 496 512 if( /*func == (fptr_t)madvise || */ 497 513 func == (fptr_t)cfa_madvise ) 498 #define _CFA_IO_FEATURE_ IORING_OP_MADVISE ,499 return IS_DEFINED( IORING_OP_MADVISE);514 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_MADVISE , 515 return IS_DEFINED(CFA_HAVE_IORING_OP_MADVISE); 500 516 501 517 if( /*func == (fptr_t)openat || */ 502 518 func == (fptr_t)cfa_openat ) 503 #define _CFA_IO_FEATURE_ IORING_OP_OPENAT ,504 return IS_DEFINED( IORING_OP_OPENAT);519 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_OPENAT , 520 return IS_DEFINED(CFA_HAVE_IORING_OP_OPENAT); 505 521 506 522 if( /*func == (fptr_t)close || */ 507 523 func == (fptr_t)cfa_close ) 508 #define _CFA_IO_FEATURE_ IORING_OP_CLOSE ,509 return IS_DEFINED( IORING_OP_CLOSE);524 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_CLOSE , 525 return IS_DEFINED(CFA_HAVE_IORING_OP_CLOSE); 510 526 511 527 if( /*func == (fptr_t)read || */ 512 528 func == (fptr_t)cfa_read ) 513 #define _CFA_IO_FEATURE_ IORING_OP_READ ,514 return IS_DEFINED( IORING_OP_READ);529 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_READ , 530 return IS_DEFINED(CFA_HAVE_IORING_OP_READ); 515 531 516 532 if( /*func == (fptr_t)write || */ 517 533 func == (fptr_t)cfa_write ) 518 #define _CFA_IO_FEATURE_ IORING_OP_WRITE ,519 return IS_DEFINED( IORING_OP_WRITE);534 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_WRITE , 535 return IS_DEFINED(CFA_HAVE_IORING_OP_WRITE); 520 536 521 537 if( /*func == (fptr_t)splice || */ 522 func == (fptr_t)cfa_splice ) 523 #define _CFA_IO_FEATURE_IORING_OP_SPLICE , 524 return IS_DEFINED(IORING_OP_SPLICE); 538 func == (fptr_t)(ssize_t (*)(int, loff_t *, int, loff_t *, size_t, unsigned int))cfa_splice, 539 func == (fptr_t)(ssize_t (*)(int, loff_t *, int, loff_t *, size_t, unsigned int, int, int))cfa_splice ) 540 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_SPLICE , 541 return IS_DEFINED(CFA_HAVE_IORING_OP_SPLICE); 525 542 526 543 if( /*func == (fptr_t)tee || */ 527 544 func == (fptr_t)cfa_tee ) 528 #define _CFA_IO_FEATURE_ IORING_OP_TEE ,529 return IS_DEFINED( IORING_OP_TEE);545 #define _CFA_IO_FEATURE_CFA_HAVE_IORING_OP_TEE , 546 return IS_DEFINED(CFA_HAVE_IORING_OP_TEE); 530 547 #endif 531 548 -
libcfa/src/concurrency/stats.cfa
rd9c2284 r5751a56 24 24 stats->ready.sleep.exits = 0; 25 25 26 #if defined( HAVE_LINUX_IO_URING_H)26 #if defined(CFA_HAVE_LINUX_IO_URING_H) 27 27 stats->io.submit_q.submit_avg.rdy = 0; 28 28 stats->io.submit_q.submit_avg.csm = 0; … … 59 59 __atomic_fetch_add( &cltr->ready.sleep.exits , proc->ready.sleep.exits , __ATOMIC_SEQ_CST ); 60 60 61 #if defined( HAVE_LINUX_IO_URING_H)61 #if defined(CFA_HAVE_LINUX_IO_URING_H) 62 62 __atomic_fetch_add( &cltr->io.submit_q.submit_avg.rdy , proc->io.submit_q.submit_avg.rdy , __ATOMIC_SEQ_CST ); 63 63 __atomic_fetch_add( &cltr->io.submit_q.submit_avg.csm , proc->io.submit_q.submit_avg.csm , __ATOMIC_SEQ_CST ); … … 121 121 } 122 122 123 #if defined( HAVE_LINUX_IO_URING_H)123 #if defined(CFA_HAVE_LINUX_IO_URING_H) 124 124 if( flags & CFA_STATS_IO ) { 125 125 double avgrdy = ((double)io.submit_q.submit_avg.rdy) / io.submit_q.submit_avg.cnt; -
libcfa/src/concurrency/stats.hfa
rd9c2284 r5751a56 11 11 enum { 12 12 CFA_STATS_READY_Q = 0x01, 13 #if defined( HAVE_LINUX_IO_URING_H)13 #if defined(CFA_HAVE_LINUX_IO_URING_H) 14 14 CFA_STATS_IO = 0x02, 15 15 #endif … … 64 64 }; 65 65 66 #if defined( HAVE_LINUX_IO_URING_H)66 #if defined(CFA_HAVE_LINUX_IO_URING_H) 67 67 struct __attribute__((aligned(64))) __stats_io_t{ 68 68 struct { … … 99 99 struct __attribute__((aligned(128))) __stats_t { 100 100 __stats_readQ_t ready; 101 #if defined( HAVE_LINUX_IO_URING_H)101 #if defined(CFA_HAVE_LINUX_IO_URING_H) 102 102 __stats_io_t io; 103 103 #endif
Note: See TracChangeset
for help on using the changeset viewer.