Changeset 231b3fd in mainline for uspace/lib/drv/generic/remote_nic.c


Ignore:
Timestamp:
2018-08-25T21:35:26Z (6 years ago)
Author:
GitHub <noreply@…>
Parents:
e2625b1a (diff), 3c45353 (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.
git-author:
Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
git-committer:
GitHub <noreply@…> (2018-08-25 21:35:26)
Message:

Merge 3c453534a2b093c8039d8e8059b923c71f3492a3 into e2625b1a1e5a2895b86f0e39c2d70a39e49e042a

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/remote_nic.c

    re2625b1a r231b3fd  
    3939#include <errno.h>
    4040#include <ipc/services.h>
    41 #include <sys/time.h>
     41#include <time.h>
    4242#include <macros.h>
    4343
     
    12621262 */
    12631263errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
    1264     struct timeval *period)
     1264    struct timespec *period)
    12651265{
    12661266        assert(mode);
     
    12801280
    12811281        if (period != NULL)
    1282                 rc = async_data_read_start(exch, period, sizeof(struct timeval));
     1282                rc = async_data_read_start(exch, period, sizeof(struct timespec));
    12831283
    12841284        async_exchange_end(exch);
     
    12961296 */
    12971297errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
    1298     const struct timeval *period)
     1298    const struct timespec *period)
    12991299{
    13001300        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    13051305        errno_t rc;
    13061306        if (period)
    1307                 rc = async_data_write_start(exch, period, sizeof(struct timeval));
     1307                rc = async_data_write_start(exch, period, sizeof(struct timespec));
    13081308        else
    13091309                rc = EOK;
     
    24052405        nic_poll_mode_t mode = NIC_POLL_IMMEDIATE;
    24062406        int request_data = IPC_GET_ARG2(*call);
    2407         struct timeval period = {
     2407        struct timespec period = {
    24082408                .tv_sec = 0,
    2409                 .tv_usec = 0
     2409                .tv_nsec = 0
    24102410        };
    24112411
     
    24212421                }
    24222422
    2423                 if (max_len != sizeof(struct timeval)) {
     2423                if (max_len != sizeof(struct timespec)) {
    24242424                        async_answer_0(&data, ELIMIT);
    24252425                        async_answer_0(call, ELIMIT);
     
    24282428
    24292429                async_data_read_finalize(&data, &period,
    2430                     sizeof(struct timeval));
     2430                    sizeof(struct timespec));
    24312431        }
    24322432
     
    24412441        nic_poll_mode_t mode = IPC_GET_ARG2(*call);
    24422442        int has_period = IPC_GET_ARG3(*call);
    2443         struct timeval period_buf;
    2444         struct timeval *period = NULL;
     2443        struct timespec period_buf;
     2444        struct timespec *period = NULL;
    24452445        size_t length;
    24462446
     
    24532453                }
    24542454
    2455                 if (length != sizeof(struct timeval)) {
     2455                if (length != sizeof(struct timespec)) {
    24562456                        async_answer_0(&data, ELIMIT);
    24572457                        async_answer_0(call, ELIMIT);
Note: See TracChangeset for help on using the changeset viewer.