tools: Pass arg to fdarray__filter's call back function
[deliverable/linux.git] / tools / lib / api / fd / array.c
index 0e636c4339b89887b805413a5bc3509585b9d346..b0a035fc87b310cb745716a5bc2af2a570dced52 100644 (file)
@@ -85,7 +85,8 @@ int fdarray__add(struct fdarray *fda, int fd, short revents)
 }
 
 int fdarray__filter(struct fdarray *fda, short revents,
-                   void (*entry_destructor)(struct fdarray *fda, int fd))
+                   void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),
+                   void *arg)
 {
        int fd, nr = 0;
 
@@ -95,7 +96,7 @@ int fdarray__filter(struct fdarray *fda, short revents,
        for (fd = 0; fd < fda->nr; ++fd) {
                if (fda->entries[fd].revents & revents) {
                        if (entry_destructor)
-                               entry_destructor(fda, fd);
+                               entry_destructor(fda, fd, arg);
 
                        continue;
                }
This page took 0.053236 seconds and 5 git commands to generate.