mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-28 04:34:47 +00:00
Supply a decidate thread, which can moniter a set of fds with epoll, when the data is ready, call the corresponding callback. This iothread will be created automatically with the first successful call to iothread_add, and will be destroyed in iothread_deinit if it was created. Note, currenlty only support one iothread. Tracked-On: #7940 Signed-off-by: Conghui <conghui.chen@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
20 lines
349 B
C
20 lines
349 B
C
/* Copyright (C) 2022 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
*/
|
|
|
|
#ifndef _iothread_CTX_H_
|
|
#define _iothread_CTX_H_
|
|
|
|
struct iothread_mevent {
|
|
void (*run)(void *);
|
|
void *arg;
|
|
};
|
|
int iothread_add(int fd, struct iothread_mevent *aevt);
|
|
int iothread_del(int fd);
|
|
int iothread_init(void);
|
|
void iothread_deinit(void);
|
|
|
|
#endif
|