summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/moduselect.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-11-17 00:16:14 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-11-17 00:16:14 +0200
commitf4a6a577ab133781c06aec029c806c878555730a (patch)
tree0ef4da33c7e796c215daac7b74167ce74ba1fd28 /stmhal/moduselect.c
parent5228854f0e026838c21a1e603dab77bb61d2fada (diff)
downloadmicropython-f4a6a577ab133781c06aec029c806c878555730a.tar.gz
micropython-f4a6a577ab133781c06aec029c806c878555730a.zip
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.
Diffstat (limited to 'stmhal/moduselect.c')
-rw-r--r--stmhal/moduselect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/moduselect.c b/stmhal/moduselect.c
index d1bf522893..ec5910a712 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) {