chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: the chattr flags field is actually unsigned, judging by kernel sources
[elogind.git]
/
src
/
shared
/
fdset.h
diff --git
a/src/shared/fdset.h
b/src/shared/fdset.h
index 6277e464d837a86b9051c4602a4fd8c49c9e2cde..c3c5e5228697e1ae128f1bb497dee744e00a0ebc 100644
(file)
--- a/
src/shared/fdset.h
+++ b/
src/shared/fdset.h
@@
-27,27
+27,32
@@
typedef struct FDSet FDSet;
FDSet* fdset_new(void);
typedef struct FDSet FDSet;
FDSet* fdset_new(void);
-
void
fdset_free(FDSet *s);
+
FDSet*
fdset_free(FDSet *s);
int fdset_put(FDSet *s, int fd);
int fdset_put_dup(FDSet *s, int fd);
int fdset_put(FDSet *s, int fd);
int fdset_put_dup(FDSet *s, int fd);
+int fdset_consume(FDSet *s, int fd);
bool fdset_contains(FDSet *s, int fd);
int fdset_remove(FDSet *s, int fd);
bool fdset_contains(FDSet *s, int fd);
int fdset_remove(FDSet *s, int fd);
-int fdset_new_fill(FDSet **_s);
-int fdset_new_listen_fds(FDSet **_s, bool unset);
+int fdset_new_array(FDSet **ret, int *fds, unsigned n_fds);
+int fdset_new_fill(FDSet **ret);
+int fdset_new_listen_fds(FDSet **ret, bool unset);
int fdset_cloexec(FDSet *fds, bool b);
int fdset_close_others(FDSet *fds);
unsigned fdset_size(FDSet *fds);
int fdset_cloexec(FDSet *fds, bool b);
int fdset_close_others(FDSet *fds);
unsigned fdset_size(FDSet *fds);
+bool fdset_isempty(FDSet *fds);
int fdset_iterate(FDSet *s, Iterator *i);
int fdset_iterate(FDSet *s, Iterator *i);
+int fdset_steal_first(FDSet *fds);
+
#define FDSET_FOREACH(fd, fds, i) \
for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i)))
#define FDSET_FOREACH(fd, fds, i) \
for ((i) = ITERATOR_FIRST, (fd) = fdset_iterate((fds), &(i)); (fd) >= 0; (fd) = fdset_iterate((fds), &(i)))
-define_trivial_cleanup_func(FDSet*, fdset_free)
+DEFINE_TRIVIAL_CLEANUP_FUNC(FDSet*, fdset_free);
#define _cleanup_fdset_free_ _cleanup_(fdset_freep)
#define _cleanup_fdset_free_ _cleanup_(fdset_freep)