Blame tools/fpgad/monitor_thread.h

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_MONITOR_THREAD_H__
Packit Service 3975d1
#define __FPGAD_MONITOR_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 _monitor_thread_config {
Packit Service 3975d1
	struct fpgad_config *global;
Packit Service 3975d1
	int sched_policy;
Packit Service 3975d1
	int sched_priority;
Packit Service 3975d1
} monitor_thread_config;
Packit Service 3975d1
Packit Service 3975d1
extern monitor_thread_config monitor_config;
Packit Service 3975d1
Packit Service 3975d1
void *monitor_thread(void *);
Packit Service 3975d1
Packit Service 3975d1
// 0 on success
Packit Service 3975d1
int mon_enumerate(struct fpgad_config *c);
Packit Service 3975d1
Packit Service 3975d1
void mon_destroy(struct fpgad_config *c);
Packit Service 3975d1
Packit Service 3975d1
void mon_monitor_device(fpgad_monitored_device *d);
Packit Service 3975d1
Packit Service 3975d1
#endif /* __FPGAD_MONITOR_THREAD_H__ */