#define _GNU_SOURCE /* needed to get the defines */ #include /* in glibc 2.2 this has the needed values defined */ #include #include #include static volatile int event_fd; static void handler(int sig, siginfo_t *si, void *data) { event_fd = si->si_fd; } int main(void) { struct sigaction act; int fd; act.sa_sigaction = handler; sigemptyset(&act.sa_mask); act.sa_flags = SA_SIGINFO; sigaction(SIGRTMIN + 1, &act, NULL); fd = open(".", O_RDONLY); fcntl(fd, F_SETSIG, SIGRTMIN + 1); fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT); /* we will now be notified if any of the files in "." is modified or new files are created */ while (1) { pause(); printf("Got event on fd=%d\n", event_fd); } } ef='/cgit.cgi/'>cgit logo index : net-next.git
net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2017-01-27 11:56:06 -0700
committerJens Axboe <axboe@fb.com>2017-01-27 11:56:06 -0700
commitc14024dbb156c8392908aaa822097d27c6af8ec8 (patch)
tree02f6ffa664b16bd76750c05f62708a518de2acdc /drivers/usb/atm/Makefile
parent08965c2eba135bdfb6e86cf25308e01421c7e0ce (diff)
parent3b4f18843e511193e7eb616710e838f5852e661d (diff)
Merge branch 'stable/for-jens-4.10' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen into for-linus
Konrad writes: Please pull in your 'for-linus' branch two little fixes for Xen block front: One fix is for handling the XEN_PAGE_SIZE != PAGE_SIZE (4KB vs 64KB on ARM for example) mishandling while the other is fixing the accounting for the configuration changes.
Diffstat (limited to 'drivers/usb/atm/Makefile')