Ignore:
Timestamp:
Jul 16, 2020, 2:56:45 PM (17 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, master, new-ast, new-ast-unique-expr
Children:
79306383
Parents:
0aec496
Message:

Added support for argument parsing.
Removed unnecessary headers.
Fixed magic number in splice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/worker.cfa

    r0aec496 r7f389a5c  
    77#include <string.h>
    88extern "C" {
     9        #include <fcntl.h>
    910        #include <sys/socket.h>
    1011        #include <sys/types.h>
    11         #include <linux/fcntl.h>
    12         #include <linux/stat.h>
    1312        #include <netinet/in.h>
    1413}
     
    3736        ssize_t ret;
    3837        SPLICE1: while(count > 0) {
    39                 ret = cfa_splice(ans_fd, &offset, this.pipe[1], 0p, count, 5);
     38                ret = cfa_splice(ans_fd, &offset, this.pipe[1], 0p, count, SPLICE_F_MOVE | SPLICE_F_MORE);
    4039                if( ret < 0 ) {
    4140                        if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE1;
     
    4746                size_t in_pipe = ret;
    4847                SPLICE2: while(in_pipe > 0) {
    49                         ret = cfa_splice(this.pipe[0], 0p, fd, 0p, in_pipe, 5);
     48                        ret = cfa_splice(this.pipe[0], 0p, fd, 0p, in_pipe, SPLICE_F_MOVE | SPLICE_F_MORE);
    5049                        if( ret < 0 ) {
    5150                                if( errno != EAGAIN && errno != EWOULDBLOCK) continue SPLICE2;
Note: See TracChangeset for help on using the changeset viewer.