Lines Matching defs:notification

796 /*!	From the specified \a notification, it will remove the lowest pending
801 get_next_pending_event(cache_notification* notification, int32* _event)
804 int32 pending = atomic_and(&notification->events_pending,
827 cache_notification* notification = cache->pending_notifications.Head();
828 if (notification == NULL)
833 if (!get_next_pending_event(notification, &event)) {
834 // remove the notification if this was the last pending event
835 cache->pending_notifications.Remove(notification);
836 deleteAfterEvent = notification->delete_after_event;
840 // Notify listener, we need to copy the notification, as it might
842 cache_notification copy = *notification;
851 delete notification;
874 /*! Initializes the \a notification as specified. */
877 cache_notification &notification, int32 events,
880 notification.transaction_id = transaction != NULL ? transaction->id : -1;
881 notification.events_pending = 0;
882 notification.events = events;
883 notification.hook = hook;
884 notification.data = data;
885 notification.delete_after_event = false;
889 /*! Makes sure the notification is deleted. It either deletes it directly,
890 when possible, or marks it for deletion if the notification is pending.
893 delete_notification(cache_notification* notification)
897 if (notification->events_pending != 0)
898 notification->delete_after_event = true;
900 delete notification;
904 /*! Adds the notification to the pending notifications list, or, if it's
906 Also marks the notification to be deleted if \a deleteNotification
911 add_notification(block_cache* cache, cache_notification* notification,
914 if (notification->hook == NULL)
917 int32 pending = atomic_or(&notification->events_pending, event);
919 // not yet part of the notification list
922 notification->delete_after_event = true;
923 cache->pending_notifications.Add(notification);
926 delete_notification(notification);
2272 cache_notification* notification = iterator.Next();
2274 kprintf(" %p %5" B_PRIx32 " %p - %p\n", notification,
2275 notification->events_pending, notification->hook,
2276 notification->data);
2716 // add sync notification
2717 cache_notification notification;
2718 set_notification(NULL, notification, TRANSACTION_WRITTEN, notify_sync,
2724 add_notification(cache, &notification, TRANSACTION_WRITTEN, false);
2727 // wait for notification hook to be called