From f4a6a577ab133781c06aec029c806c878555730a Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 17 Nov 2014 00:16:14 +0200 Subject: stream: Convert .ioctl() to take fixed number of args. This is more efficient, as allows to use register calling convention. If needed, a structure pointer can be passed as argument to pass more data. --- stmhal/moduselect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'stmhal/moduselect.c') diff --git a/stmhal/moduselect.c b/stmhal/moduselect.c index d1bf52289..ec5910a71 100644 --- a/stmhal/moduselect.c +++ b/stmhal/moduselect.c @@ -44,7 +44,7 @@ typedef struct _poll_obj_t { mp_obj_t obj; - mp_uint_t (*ioctl)(mp_obj_t obj, mp_uint_t request, int *errcode, ...); + mp_uint_t (*ioctl)(mp_obj_t obj, mp_uint_t request, mp_uint_t arg, int *errcode); mp_uint_t flags; mp_uint_t flags_ret; } poll_obj_t; @@ -85,7 +85,7 @@ STATIC mp_uint_t poll_map_poll(mp_map_t *poll_map, mp_uint_t *rwx_num) { poll_obj_t *poll_obj = (poll_obj_t*)poll_map->table[i].value; int errcode; - mp_int_t ret = poll_obj->ioctl(poll_obj->obj, MP_IOCTL_POLL, &errcode, poll_obj->flags); + mp_int_t ret = poll_obj->ioctl(poll_obj->obj, MP_IOCTL_POLL, poll_obj->flags, &errcode); poll_obj->flags_ret = ret; if (ret == -1) { -- cgit v1.2.3