|
Packit Service |
3975d1 |
// Copyright(c) 2018-2019, Intel Corporation
|
|
Packit Service |
3975d1 |
//
|
|
Packit Service |
3975d1 |
// Redistribution and use in source and binary forms, with or without
|
|
Packit Service |
3975d1 |
// modification, are permitted provided that the following conditions are met:
|
|
Packit Service |
3975d1 |
//
|
|
Packit Service |
3975d1 |
// * Redistributions of source code must retain the above copyright notice,
|
|
Packit Service |
3975d1 |
// this list of conditions and the following disclaimer.
|
|
Packit Service |
3975d1 |
// * Redistributions in binary form must reproduce the above copyright notice,
|
|
Packit Service |
3975d1 |
// this list of conditions and the following disclaimer in the documentation
|
|
Packit Service |
3975d1 |
// and/or other materials provided with the distribution.
|
|
Packit Service |
3975d1 |
// * Neither the name of Intel Corporation nor the names of its contributors
|
|
Packit Service |
3975d1 |
// may be used to endorse or promote products derived from this software
|
|
Packit Service |
3975d1 |
// without specific prior written permission.
|
|
Packit Service |
3975d1 |
//
|
|
Packit Service |
3975d1 |
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
Packit Service |
3975d1 |
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
Packit Service |
3975d1 |
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
Packit Service |
3975d1 |
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
Packit Service |
3975d1 |
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
Packit Service |
3975d1 |
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
Packit Service |
3975d1 |
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
Packit Service |
3975d1 |
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
Packit Service |
3975d1 |
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
Packit Service |
3975d1 |
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
Packit Service |
3975d1 |
// POSSIBILITY OF SUCH DAMAGE.
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
#ifndef __FPGAD_EVENT_DISPATCHER_THREAD_H__
|
|
Packit Service |
3975d1 |
#define __FPGAD_EVENT_DISPATCHER_THREAD_H__
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
#include "fpgad.h"
|
|
Packit Service |
3975d1 |
#include "monitored_device.h"
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
typedef struct _event_dispatcher_thread_config {
|
|
Packit Service |
3975d1 |
struct fpgad_config *global;
|
|
Packit Service |
3975d1 |
int sched_policy;
|
|
Packit Service |
3975d1 |
int sched_priority;
|
|
Packit Service |
3975d1 |
} event_dispatcher_thread_config;
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
extern event_dispatcher_thread_config event_dispatcher_config;
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
void *event_dispatcher_thread(void *);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
typedef struct _event_dispatch_queue_item {
|
|
Packit Service |
3975d1 |
fpgad_respond_event_t callback;
|
|
Packit Service |
3975d1 |
fpgad_monitored_device *device;
|
|
Packit Service |
3975d1 |
void *context;
|
|
Packit Service |
3975d1 |
} event_dispatch_queue_item;
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
bool evt_dispatcher_is_ready(void);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
bool evt_queue_response(fpgad_respond_event_t callback,
|
|
Packit Service |
3975d1 |
fpgad_monitored_device *device,
|
|
Packit Service |
3975d1 |
void *context);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
bool evt_queue_get(event_dispatch_queue_item *item);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
bool evt_queue_response_high(fpgad_respond_event_t callback,
|
|
Packit Service |
3975d1 |
fpgad_monitored_device *device,
|
|
Packit Service |
3975d1 |
void *context);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
bool evt_queue_get_high(event_dispatch_queue_item *item);
|
|
Packit Service |
3975d1 |
|
|
Packit Service |
3975d1 |
#endif /* __FPGAD_EVENT_DISPATCHER_THREAD_H__ */
|