Changeset 519f11c


Ignore:
Timestamp:
Jul 16, 2020, 2:59:50 PM (14 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
463cb33
Parents:
79306383
Message:

Minor fixes in concurrency lib.
Remove async support for sendfile as a single call to splice

Location:
libcfa/src/concurrency
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/iocall.cfa

    r79306383 r519f11c  
    345345}
    346346
     347int cfa_statx(int dirfd, const char *pathname, int flags, unsigned int mask, struct statx *statxbuf) {
     348        #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_STATX)
     349                return syscall( __NR_statx, dirfd, pathname, flags, mask, statxbuf );
     350        #else
     351                __submit_prelude
     352
     353                (*sqe){ IORING_OP_STATX, dirfd, pathname, mask, (uint64_t)statxbuf };
     354                sqe->flags = flags;
     355
     356                __submit_wait
     357        #endif
     358}
     359
    347360ssize_t cfa_read(int fd, void *buf, size_t count) {
    348361        #if !defined(HAVE_LINUX_IO_URING_H) || !defined(IORING_OP_READ)
     
    396409                __submit_wait
    397410        #endif
    398 }
    399 
    400 ssize_t cfa_sendfile(int out_fd, int in_fd, off_t *offset, size_t count) {
    401         return cfa_splice(in_fd, offset, out_fd, 0p, count, 0);
    402411}
    403412
  • libcfa/src/concurrency/iofwd.hfa

    r79306383 r519f11c  
    1616#pragma once
    1717
     18#include <unistd.h>
    1819extern "C" {
    1920        #include <sys/types.h>
    2021}
     22#include "bits/defs.hfa"
     23
     24struct iovec;
     25struct msghdr;
     26struct sockaddr;
     27struct statx;
    2128
    2229extern ssize_t cfa_preadv2(int fd, const struct iovec *iov, int iovcnt, off_t offset, int flags);
     
    4047extern ssize_t cfa_splice(int fd_in, loff_t *off_in, int fd_out, loff_t *off_out, size_t len, unsigned int flags);
    4148extern ssize_t cfa_tee(int fd_in, int fd_out, size_t len, unsigned int flags);
    42 extern ssize_t cfa_sendfile(int out_fd, int in_fd, off_t *offset, size_t count);
    4349
    4450//-----------------------------------------------------------------------------
  • libcfa/src/concurrency/mutex.cfa

    r79306383 r519f11c  
    3030        this.lock{};
    3131        this.blocked_threads{};
     32        this.is_locked = false;
    3233}
    3334
Note: See TracChangeset for help on using the changeset viewer.