Changeset bd41ac52 in mainline for uspace/lib/drv
- Timestamp:
- 2018-08-25T22:21:25Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- cca80a2
- Parents:
- e2625b1a
- Location:
- uspace/lib/drv
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_nic.c
re2625b1a rbd41ac52 39 39 #include <errno.h> 40 40 #include <ipc/services.h> 41 #include < sys/time.h>41 #include <time.h> 42 42 #include <macros.h> 43 43 … … 1262 1262 */ 1263 1263 errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode, 1264 struct time val*period)1264 struct timespec *period) 1265 1265 { 1266 1266 assert(mode); … … 1280 1280 1281 1281 if (period != NULL) 1282 rc = async_data_read_start(exch, period, sizeof(struct time val));1282 rc = async_data_read_start(exch, period, sizeof(struct timespec)); 1283 1283 1284 1284 async_exchange_end(exch); … … 1296 1296 */ 1297 1297 errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode, 1298 const struct time val*period)1298 const struct timespec *period) 1299 1299 { 1300 1300 async_exch_t *exch = async_exchange_begin(dev_sess); … … 1305 1305 errno_t rc; 1306 1306 if (period) 1307 rc = async_data_write_start(exch, period, sizeof(struct time val));1307 rc = async_data_write_start(exch, period, sizeof(struct timespec)); 1308 1308 else 1309 1309 rc = EOK; … … 2405 2405 nic_poll_mode_t mode = NIC_POLL_IMMEDIATE; 2406 2406 int request_data = IPC_GET_ARG2(*call); 2407 struct time valperiod = {2407 struct timespec period = { 2408 2408 .tv_sec = 0, 2409 .tv_ usec = 02409 .tv_nsec = 0 2410 2410 }; 2411 2411 … … 2421 2421 } 2422 2422 2423 if (max_len != sizeof(struct time val)) {2423 if (max_len != sizeof(struct timespec)) { 2424 2424 async_answer_0(&data, ELIMIT); 2425 2425 async_answer_0(call, ELIMIT); … … 2428 2428 2429 2429 async_data_read_finalize(&data, &period, 2430 sizeof(struct time val));2430 sizeof(struct timespec)); 2431 2431 } 2432 2432 … … 2441 2441 nic_poll_mode_t mode = IPC_GET_ARG2(*call); 2442 2442 int has_period = IPC_GET_ARG3(*call); 2443 struct time valperiod_buf;2444 struct time val*period = NULL;2443 struct timespec period_buf; 2444 struct timespec *period = NULL; 2445 2445 size_t length; 2446 2446 … … 2453 2453 } 2454 2454 2455 if (length != sizeof(struct time val)) {2455 if (length != sizeof(struct timespec)) { 2456 2456 async_answer_0(&data, ELIMIT); 2457 2457 async_answer_0(call, ELIMIT); -
uspace/lib/drv/include/nic_iface.h
re2625b1a rbd41ac52 106 106 107 107 extern errno_t nic_poll_get_mode(async_sess_t *, nic_poll_mode_t *, 108 struct time val*);108 struct timespec *); 109 109 extern errno_t nic_poll_set_mode(async_sess_t *, nic_poll_mode_t, 110 const struct time val*);110 const struct timespec *); 111 111 extern errno_t nic_poll_now(async_sess_t *); 112 112 -
uspace/lib/drv/include/ops/nic.h
re2625b1a rbd41ac52 39 39 #include <ipc/services.h> 40 40 #include <nic/nic.h> 41 #include < sys/time.h>41 #include <time.h> 42 42 #include "../ddf/driver.h" 43 43 … … 104 104 105 105 errno_t (*poll_get_mode)(ddf_fun_t *, nic_poll_mode_t *, 106 struct time val*);106 struct timespec *); 107 107 errno_t (*poll_set_mode)(ddf_fun_t *, nic_poll_mode_t, 108 const struct time val*);108 const struct timespec *); 109 109 errno_t (*poll_now)(ddf_fun_t *); 110 110 } nic_iface_t; -
uspace/lib/drv/include/pci_dev_iface.h
re2625b1a rbd41ac52 37 37 #ifndef LIBDRV_PCI_DEV_IFACE_H_ 38 38 #define LIBDRV_PCI_DEV_IFACE_H_ 39 40 #include <errno.h> 39 41 40 42 #include "ddf/driver.h"
Note:
See TracChangeset
for help on using the changeset viewer.