2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 #ifndef __EVENT_FIFO_PUBLIC_H
16 #define __EVENT_FIFO_PUBLIC_H
18 #include <type_support.h>
19 #include "system_types.h"
21 /*! Blocking read from an event source EVENT[ID]
23 \param ID[in] EVENT identifier
25 \return none, dequeue(event_queue[ID])
27 STORAGE_CLASS_EVENT_H void event_wait_for(
30 /*! Conditional blocking wait for an event source EVENT[ID]
32 \param ID[in] EVENT identifier
33 \param cnd[in] predicate
35 \return none, if(cnd) dequeue(event_queue[ID])
37 STORAGE_CLASS_EVENT_H void cnd_event_wait_for(
41 /*! Blocking read from an event source EVENT[ID]
43 \param ID[in] EVENT identifier
45 \return dequeue(event_queue[ID])
47 STORAGE_CLASS_EVENT_H hrt_data event_receive_token(
50 /*! Blocking write to an event sink EVENT[ID]
52 \param ID[in] EVENT identifier
53 \param token[in] token to be written on the event
55 \return none, enqueue(event_queue[ID])
57 STORAGE_CLASS_EVENT_H void event_send_token(
59 const hrt_data token);
61 /*! Query an event source EVENT[ID]
63 \param ID[in] EVENT identifier
65 \return !isempty(event_queue[ID])
67 STORAGE_CLASS_EVENT_H bool is_event_pending(
70 /*! Query an event sink EVENT[ID]
72 \param ID[in] EVENT identifier
74 \return !isfull(event_queue[ID])
76 STORAGE_CLASS_EVENT_H bool can_event_send_token(
79 #endif /* __EVENT_FIFO_PUBLIC_H */