diff options
| author | Jiri Kosina <[email protected]> | 2020-10-15 20:37:01 +0200 |
|---|---|---|
| committer | Jiri Kosina <[email protected]> | 2020-10-15 20:37:01 +0200 |
| commit | 62b31a045757eac81fed94b19df47418a0818528 (patch) | |
| tree | 285fda56df8304dff6ba929bad65ddfb4e4fd726 /tools/lib/api/fd/array.h | |
| parent | cc51d171776f3a6acb6828bad0b780a4cacf5423 (diff) | |
| parent | c27e08820bc6cb7d483a8d87589bdbbbf10f2306 (diff) | |
Merge branch 'for-5.10/core' into for-linus
- nonblocking read semantics fix for hid-debug
Diffstat (limited to 'tools/lib/api/fd/array.h')
| -rw-r--r-- | tools/lib/api/fd/array.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/lib/api/fd/array.h b/tools/lib/api/fd/array.h index b39557d1a88f..7fcf21a33c0c 100644 --- a/tools/lib/api/fd/array.h +++ b/tools/lib/api/fd/array.h @@ -21,19 +21,27 @@ struct fdarray { int nr_alloc; int nr_autogrow; struct pollfd *entries; - union { - int idx; - void *ptr; + struct priv { + union { + int idx; + void *ptr; + }; + unsigned int flags; } *priv; }; +enum fdarray_flags { + fdarray_flag__default = 0x00000000, + fdarray_flag__nonfilterable = 0x00000001 +}; + void fdarray__init(struct fdarray *fda, int nr_autogrow); void fdarray__exit(struct fdarray *fda); struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow); void fdarray__delete(struct fdarray *fda); -int fdarray__add(struct fdarray *fda, int fd, short revents); +int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags); int fdarray__poll(struct fdarray *fda, int timeout); int fdarray__filter(struct fdarray *fda, short revents, void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), |