hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/tools/lib/api/fd/array.h
....@@ -21,10 +21,18 @@
2121 int nr_alloc;
2222 int nr_autogrow;
2323 struct pollfd *entries;
24
- union {
25
- int idx;
26
- void *ptr;
24
+ struct priv {
25
+ union {
26
+ int idx;
27
+ void *ptr;
28
+ };
29
+ unsigned int flags;
2730 } *priv;
31
+};
32
+
33
+enum fdarray_flags {
34
+ fdarray_flag__default = 0x00000000,
35
+ fdarray_flag__nonfilterable = 0x00000001
2836 };
2937
3038 void fdarray__init(struct fdarray *fda, int nr_autogrow);
....@@ -33,7 +41,7 @@
3341 struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow);
3442 void fdarray__delete(struct fdarray *fda);
3543
36
-int fdarray__add(struct fdarray *fda, int fd, short revents);
44
+int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags);
3745 int fdarray__poll(struct fdarray *fda, int timeout);
3846 int fdarray__filter(struct fdarray *fda, short revents,
3947 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),