summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDavid Hildenbrand2022-10-14 15:47:18 +0200
committerDavid Hildenbrand2022-10-27 11:00:56 +0200
commite04a34e55cf1911099e2d8a680f9bee4f6d90e4a (patch)
treea5bbbbb85c78a78baeb2e5d034fc4686b7258468 /include
parentutil: Add write-only "node-affinity" property for ThreadContext (diff)
downloadqemu-e04a34e55cf1911099e2d8a680f9bee4f6d90e4a.tar.gz
qemu-e04a34e55cf1911099e2d8a680f9bee4f6d90e4a.tar.xz
qemu-e04a34e55cf1911099e2d8a680f9bee4f6d90e4a.zip
util: Make qemu_prealloc_mem() optionally consume a ThreadContext
... and implement it under POSIX. When a ThreadContext is provided, create new threads via the context such that these new threads obtain a properly configured CPU affinity. Reviewed-by: Michal Privoznik <mprivozn@redhat.com> Message-Id: <20221014134720.168738-6-david@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/osdep.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index e556e45143..625298c8bc 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -568,6 +568,8 @@ unsigned long qemu_getauxval(unsigned long type);
void qemu_set_tty_echo(int fd, bool echo);
+typedef struct ThreadContext ThreadContext;
+
/**
* qemu_prealloc_mem:
* @fd: the fd mapped into the area, -1 for anonymous memory
@@ -582,7 +584,7 @@ void qemu_set_tty_echo(int fd, bool echo);
* after allocating file blocks for mapped files.
*/
void qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads,
- Error **errp);
+ ThreadContext *tc, Error **errp);
/**
* qemu_get_pid_name: