| .. | .. |
|---|
| 21 | 21 | int nr_alloc; |
|---|
| 22 | 22 | int nr_autogrow; |
|---|
| 23 | 23 | 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; |
|---|
| 27 | 30 | } *priv; |
|---|
| 31 | +}; |
|---|
| 32 | + |
|---|
| 33 | +enum fdarray_flags { |
|---|
| 34 | + fdarray_flag__default = 0x00000000, |
|---|
| 35 | + fdarray_flag__nonfilterable = 0x00000001 |
|---|
| 28 | 36 | }; |
|---|
| 29 | 37 | |
|---|
| 30 | 38 | void fdarray__init(struct fdarray *fda, int nr_autogrow); |
|---|
| .. | .. |
|---|
| 33 | 41 | struct fdarray *fdarray__new(int nr_alloc, int nr_autogrow); |
|---|
| 34 | 42 | void fdarray__delete(struct fdarray *fda); |
|---|
| 35 | 43 | |
|---|
| 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); |
|---|
| 37 | 45 | int fdarray__poll(struct fdarray *fda, int timeout); |
|---|
| 38 | 46 | int fdarray__filter(struct fdarray *fda, short revents, |
|---|
| 39 | 47 | void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), |
|---|