Displaying 5 results from an estimated 5 matches for "maxbufsiz".
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...nts = POLLIN, };
> unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0;
> int size, rc, rd;
>
> srandom(getpid());
> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1)
> perror("fcntl");
> size = MINBUFSIZ + random() % (MAXBUFSIZ - MINBUFSIZ + 1);
>
> for(;;) {
> char buf[size];
>
> if (stop)
> break;
> rc = poll(&pfd, 1, sec);
> if (rc > 0) {
> rd = read(fd, buf, sizeof(buf));
> if (rd == -1 && errno == EAGAIN)
> eagains++;
> else if (rd == -1)
&...
2020 Aug 11
3
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...nts = POLLIN, };
> unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0;
> int size, rc, rd;
>
> srandom(getpid());
> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1)
> perror("fcntl");
> size = MINBUFSIZ + random() % (MAXBUFSIZ - MINBUFSIZ + 1);
>
> for(;;) {
> char buf[size];
>
> if (stop)
> break;
> rc = poll(&pfd, 1, sec);
> if (rc > 0) {
> rd = read(fd, buf, sizeof(buf));
> if (rd == -1 && errno == EAGAIN)
> eagains++;
> else if (rd == -1)
&...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
...nts = POLLIN, };
> unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0;
> int size, rc, rd;
>
> srandom(getpid());
> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1)
> perror("fcntl");
> size = MINBUFSIZ + random() % (MAXBUFSIZ - MINBUFSIZ + 1);
>
> for(;;) {
> char buf[size];
>
> if (stop)
> break;
> rc = poll(&pfd, 1, sec);
> if (rc > 0) {
> rd = read(fd, buf, sizeof(buf));
> if (rd == -1 && errno == EAGAIN)
> eagains++;
> else if (rd == -1)
&...
2020 Aug 11
0
[PATCH v2] virtio-rng: return available data with O_NONBLOCK
...unsigned long errors = 0, eagains = 0, bytes = 0, succ = 0;
>> int size, rc, rd;
>>
>> srandom(getpid());
>> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) | O_NONBLOCK) == -1)
>> perror("fcntl");
>> size = MINBUFSIZ + random() % (MAXBUFSIZ - MINBUFSIZ + 1);
>>
>> for(;;) {
>> char buf[size];
>>
>> if (stop)
>> break;
>> rc = poll(&pfd, 1, sec);
>> if (rc > 0) {
>> rd = read(fd, buf, sizeof(buf));
>> if (rd == -1 && errno == EAGAIN)
>>...
2020 Aug 31
0
[PATCH v3] virtio-rng: return available data with O_NONBLOCK
...>>> int size, rc, rd;
>>>>
>>>> srandom(getpid());
>>>> if (CONDITION && fcntl(fd, F_SETFL, fcntl(fd, F_GETFL) |
>>>> O_NONBLOCK) == -1)
>>>> perror("fcntl");
>>>> size = MINBUFSIZ + random() % (MAXBUFSIZ - MINBUFSIZ + 1);
>>>>
>>>> for(;;) {
>>>> char buf[size];
>>>>
>>>> if (stop)
>>>> break;
>>>> rc = poll(&pfd, 1, sec);
>>>> if (rc > 0) {
>>>> rd = read(fd, buf, sizeo...