extern void x_query_color (struct frame *, XColor *);
-extern volatile int notification_buffer_in_use;
-extern BYTE file_notifications[16384];
-extern DWORD notifications_size;
-extern void *notifications_desc;
+#define FILE_NOTIFICATIONS_SIZE 16384
+/* Notifications come in sets. We use a doubly linked list with a
+ sentinel to communicate those sets from the watching threads to the
+ main thread. */
+struct notifications_set {
+ LPBYTE notifications;
+ DWORD size;
+ void *desc;
+ struct notifications_set *next;
+ struct notifications_set *prev;
+};
+extern struct notifications_set *notifications_set_head;
extern Lisp_Object w32_get_watch_object (void *);
extern Lisp_Object lispy_file_action (DWORD);
extern int handle_file_notifications (struct input_event *);