linux/arch/um/drivers/ubd.h
Tiwei Bie d7f89a9da4 um: ubd: Switch to the pthread-based helper
The ubd io thread and UML kernel thread share the same errno, which
can lead to conflicts when both call syscalls concurrently. Switch to
the pthread-based helper to address this issue.

Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20250319135523.97050-3-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2025-03-20 09:26:38 +01:00

22 lines
463 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
* Copyright (C) 2001 RidgeRun, Inc (glonnon@ridgerun.com)
*/
#ifndef __UM_UBD_USER_H
#define __UM_UBD_USER_H
#include <os.h>
int start_io_thread(struct os_helper_thread **td_out, int *fd_out);
void *io_thread(void *arg);
extern int kernel_fd;
extern int ubd_read_poll(int timeout);
extern int ubd_write_poll(int timeout);
#define UBD_REQ_BUFFER_SIZE 64
#endif