/* SPDX-License-Identifier: GPL-2.0 */ /* * KVM userfaultfd util * * Copyright (C) 2018, Red Hat, Inc. * Copyright (C) 2019-2022 Google LLC
*/ #include <inttypes.h> #include <time.h> #include <pthread.h> #include <linux/userfaultfd.h>
#include"test_util.h"
typedefint (*uffd_handler_t)(int uffd_mode, int uffd, struct uffd_msg *msg);
struct uffd_reader_args { int uffd_mode; int uffd;
useconds_t delay;
uffd_handler_t handler; /* Holds the read end of the pipe for killing the reader. */ int pipe;
};
struct uffd_desc { int uffd;
uint64_t num_readers; /* Holds the write ends of the pipes for killing the readers. */ int *pipefds;
pthread_t *readers; struct uffd_reader_args *reader_args;
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.