Changeset 4385e8b


Ignore:
Timestamp:
May 5, 2020, 4:58:23 PM (17 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
cbabfd4
Parents:
b1ac7dd (diff), 08a994e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
libcfa
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • libcfa/configure

    rb1ac7dd r4385e8b  
    1696216962done
    1696316963
     16964for ac_func in preadv2 pwritev2
     16965do :
     16966  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
     16967ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
     16968if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
     16969  cat >>confdefs.h <<_ACEOF
     16970#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
     16971_ACEOF
     16972
     16973fi
     16974done
     16975
    1696416976
    1696516977ac_config_files="$ac_config_files Makefile src/Makefile prelude/Makefile"
  • libcfa/configure.ac

    rb1ac7dd r4385e8b  
    119119
    120120AC_CHECK_HEADERS([linux/io_uring.h])
     121AC_CHECK_FUNCS([preadv2 pwritev2])
    121122
    122123AC_CONFIG_FILES([
  • libcfa/prelude/defines.hfa.in

    rb1ac7dd r4385e8b  
    1616#undef HAVE_LINUX_IO_URING_H
    1717
     18#undef HAVE_PREADV2
     19#undef HAVE_PWRITEV2
     20
    1821#undef __CFA_NO_STATISTICS__
  • libcfa/src/Makefile.in

    rb1ac7dd r4385e8b  
    241241        containers/vector.hfa bitmanip.hfa math.hfa gmp.hfa time_t.hfa \
    242242        bits/align.hfa bits/containers.hfa bits/defs.hfa \
    243         bits/debug.hfa bits/locks.hfa concurrency/coroutine.hfa \
    244         concurrency/thread.hfa concurrency/kernel.hfa \
    245         concurrency/monitor.hfa concurrency/mutex.hfa \
    246         concurrency/invoke.h
     243        bits/debug.hfa bits/locks.hfa containers/list.hfa \
     244        concurrency/coroutine.hfa concurrency/thread.hfa \
     245        concurrency/kernel.hfa concurrency/monitor.hfa \
     246        concurrency/mutex.hfa concurrency/invoke.h
    247247HEADERS = $(nobase_cfa_include_HEADERS)
    248248am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
     
    463463
    464464#----------------------------------------------------------------------------------------------------------------
    465 @BUILDLIB_TRUE@headers_nosrc = bitmanip.hfa math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa
     465@BUILDLIB_TRUE@headers_nosrc = bitmanip.hfa math.hfa gmp.hfa time_t.hfa bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa containers/list.hfa
    466466@BUILDLIB_FALSE@headers =
    467467@BUILDLIB_TRUE@headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \
  • libcfa/src/concurrency/io.cfa

    rb1ac7dd r4385e8b  
    724724        #include <sys/socket.h>
    725725        #include <sys/syscall.h>
     726
     727#if defined(HAVE_PREADV2)
    726728        struct iovec;
    727729        extern ssize_t preadv2 (int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
     730#endif
     731#if defined(HAVE_PWRITEV2)
     732        struct iovec;
    728733        extern ssize_t pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
     734#endif
    729735
    730736        extern int fsync(int fd);
     
    752758//-----------------------------------------------------------------------------
    753759// Asynchronous operations
    754 ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) {
    755         #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READV)
    756                 return preadv2(fd, iov, iovcnt, offset, flags);
    757         #else
    758                 __submit_prelude
    759 
    760                 (*sqe){ IORING_OP_READV, fd, iov, iovcnt, offset };
    761 
    762                 __submit_wait
    763         #endif
    764 }
    765 
    766 ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) {
    767         #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_WRITEV)
    768                 return pwritev2(fd, iov, iovcnt, offset, flags);
    769         #else
    770                 __submit_prelude
    771 
    772                 (*sqe){ IORING_OP_WRITEV, fd, iov, iovcnt, offset };
    773 
    774                 __submit_wait
    775         #endif
    776 }
     760#if defined(HAVE_PREADV2)
     761        ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) {
     762                #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READV)
     763                        return preadv2(fd, iov, iovcnt, offset, flags);
     764                #else
     765                        __submit_prelude
     766
     767                        (*sqe){ IORING_OP_READV, fd, iov, iovcnt, offset };
     768
     769                        __submit_wait
     770                #endif
     771        }
     772#endif
     773
     774#if defined(HAVE_PWRITEV2)
     775        ssize_t cfa_pwritev2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags) {
     776                #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_WRITEV)
     777                        return pwritev2(fd, iov, iovcnt, offset, flags);
     778                #else
     779                        __submit_prelude
     780
     781                        (*sqe){ IORING_OP_WRITEV, fd, iov, iovcnt, offset };
     782
     783                        __submit_wait
     784                #endif
     785        }
     786#endif
    777787
    778788int cfa_fsync(int fd) {
     
    10021012                        return IS_DEFINED(IORING_OP_READV);
    10031013
    1004                 if( /*func == (fptr_t)pwritev2 || */
    1005                         func == (fptr_t)cfa_pwritev2 )
    1006                         #define _CFA_IO_FEATURE_IORING_OP_WRITEV ,
    1007                         return IS_DEFINED(IORING_OP_WRITEV);
    1008 
    1009                 if( /*func == (fptr_t)fsync || */
    1010                         func == (fptr_t)cfa_fsync )
    1011                         #define _CFA_IO_FEATURE_IORING_OP_FSYNC ,
    1012                         return IS_DEFINED(IORING_OP_FSYNC);
     1014                #if defined(HAVE_PREADV2)
     1015                        if( /*func == (fptr_t)pwritev2 || */
     1016                                func == (fptr_t)cfa_pwritev2 )
     1017                                #define _CFA_IO_FEATURE_IORING_OP_WRITEV ,
     1018                                return IS_DEFINED(IORING_OP_WRITEV);
     1019                #endif
     1020
     1021                #if defined(HAVE_PWRITEV2)
     1022                        if( /*func == (fptr_t)fsync || */
     1023                                func == (fptr_t)cfa_fsync )
     1024                                #define _CFA_IO_FEATURE_IORING_OP_FSYNC ,
     1025                                return IS_DEFINED(IORING_OP_FSYNC);
     1026                #endif
    10131027
    10141028                if( /*func == (fptr_t)ync_file_range || */
Note: See TracChangeset for help on using the changeset viewer.