Lines Matching refs:event

14 - event and timer queue
24 typedef int ossl_event_callback_fn(OSSL_EVENT *event, void *callback_data);
29 int ossl_event_queue_add(OSSL_EVENT_QUEUE *queue, OSSL_EVENT *event,
37 void ossl_event_free(OSSL_EVENT *event);
39 uint32_t ossl_event_get_type(const OSSL_EVENT *event);
40 uint32_t ossl_event_get_priority(const OSSL_EVENT *event);
41 OSSL_TIME ossl_event_get_when(const OSSL_EVENT *event);
42 void *ossl_event_get0_payload(const OSSL_EVENT *event, size_t *length);
44 int ossl_event_queue_schedule(OSSL_EVENT_QUEUE *queue, OSSL_EVENT *event);
45 int ossl_event_queue_delete(OSSL_EVENT_QUEUE *queue, OSSL_EVENT *event);
47 OSSL_TIME ossl_event_time_until(OSSL_EVENT *event);
51 OSSL_EVENT *event,
55 OSSL_EVENT **event);
59 These functions implement an event queue.
63 An event is a small structure, B<OSSL_EVENT>, carrying information:
69 A mandatory event type, which is a simple numeric identity, the
70 meaning of which is not known by the event functionality itself.
75 the event will be processed.
79 An optional time indicating when the event could be triggered. Events are
84 A reference to user supplied contextual informaton. The event queue passes
89 A reference to some event specific data of a specified length.
93 The event itself is designed for a single synchronous thread, i.e. cannot be
98 Once populated, the event type, the references to event context, and the
100 event structure is destroyed.
103 however, are considered mutable. Any event handler may "steal" them and
104 replace the reference to them in the event structure with NULL. Stealing
110 B<ossl_event_queue_add> initialises/reinitialises a static event object
111 with the specified parameters and adds it to the event queue I<queue>.
112 The event object I<event> has it's fields set to the passed parameters.
114 B<ossl_event_queue_add_new> allocates a new timer event on the heap
116 new event is returned on success and NULL is returned on error.
118 B<ossl_event_free> frees an allocated event returned by B<ossl_event_new>.
119 Does nothing if passed a pointer to a static event object which was initialised
122 B<ossl_event_time_until> returns the time until I<event> would
123 trigger. The event need not be part of an event queue.
125 B<ossl_event_queue_postpone_until> reschedules the I<event>, which must
126 be scheduled as part of timer event queue I<queue>, so that it will activate
129 B<ossl_event_get_type> returns the type of the I<event>.
131 B<ossl_event_get_priority> returns the priority of the I<event>.
133 B<ossl_event_get_when> returns the triggering time of the I<event>.
135 B<ossl_event_get0_payload> returns the payload for the I<event>, the length
141 event queue. Event queue objects can only be dynamically allocated.
143 B<ossl_event_queue_new> returns a newly allocated event queue object.
145 B<ossl_event_queue_free> frees a event queue object returned by
148 B<ossl_event_queue_schedule> adds the specified I<event> to the timer
149 event queue I<queue>. The I<event> must not already be contained by any
150 timer event queue including I<queue>.
152 B<ossl_event_queue_delete> removes the specified I<event> from the
153 timer event queue I<queue>. The event must have previously been added
158 event in the timer event queue I<queue> is scheduled to trigger.
160 B<ossl_event_queue_get1_next_event> gets the next event to process.
161 The event is removed from the event queue and, if dynamically allocated,
162 must be freed by the caller. A NULL event is returned if there is no event
169 B<ossl_event_new> returns a new event or NULL on failure.
172 B<ossl_event_get_when> return the corresponding event field.
174 B<ossl_event_get0_payload> returns a pointer to the event's payload.
181 return a time until the next event or B<OSSL_TIME_INFINITY> if there is no
182 next event.