kernel/poll.c
/* must be called with interrupts locked */
must be called with interrupts locked
must be called with interrupts locked
static inline void clear_event_registration(struct k_poll_event *event)
{
	event->poller = NULL;
	switch (event->type) {
	case K_POLL_TYPE_SEM_AVAILABLE:
		__ASSERT(event->sem, "invalid semaphore\n");
		event->sem->poll_event = NULL;
		break;
	case K_POLL_TYPE_DATA_AVAILABLE:
		__ASSERT(event->queue, "invalid queue\n");
		event->queue->poll_event = NULL;
		break;
	case K_POLL_TYPE_SIGNAL:
		__ASSERT(event->signal, "invalid poll signal\n");
		event->signal->poll_event = NULL;
		break;
	case K_POLL_TYPE_IGNORE:
		break;
	default:
		__ASSERT(0, "invalid event type\n");
		break;
	}
}
static inline void clear_event_registration ( struct k_poll_event * event ) { event -> poller = NULL ; switch ( event -> type ) { case K_POLL_TYPE_SEM_AVAILABLE : __ASSERT ( event -> sem , " \n " ) ; event -> sem -> poll_event = NULL ; break ; case K_POLL_TYPE_DATA_AVAILABLE : __ASSERT ( event -> queue , " \n " ) ; event -> queue -> poll_event = NULL ; break ; case K_POLL_TYPE_SIGNAL : __ASSERT ( event -> signal , " \n " ) ; event -> signal -> poll_event = NULL ; break ; case K_POLL_TYPE_IGNORE : break ; default : __ASSERT ( 0 , " \n " ) ; break ; } }
must be called with interrupts locked
must be called with interrupts locked
/* nothing to do */