-----BEGIN PGP SIGNATURE-----
iQEcBAABAgAGBQJZ6eXRAAoJEJykq7OBq3PIBvgIAJiU2a84H0CxLxsT13DWlopv P4Q0mt4E77K/OID0PCa9CqvxN2wtsriXRsAVhDCbiZFJhUf8vGedvh1sw4DLlcvI Mq51AA81KfFCJUTSLYEahZf44ijZf5/jMRZvjRsATDP3veHuByfQazClc2ch8PvJ xVeZpzBR8nXnY0eBI0AVgY+6iNZ+4yx4LIP9hOm/p3gRWx4skyO3ZmgRhq3OqBU/ xlIoZR6Z10wNyOkbnr3DjE6BctSV9qAErm6HdhrK6zVFVIpF9Ncxp8BGixA/+XHq 0hjYtP0rkxWKTB+Nhhym9YjiwIcY9MxVdBdpUtPi49sX7yo1GADE9AKdP2zZUN0= =+W4j -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging # gpg: Signature made Fri 20 Oct 2017 13:02:25 BST # gpg: using RSA key 0x9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8 * remotes/stefanha/tags/block-pull-request: oslib-posix: Fix compiler warning and some data types Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
e822e81e35
@ -59,8 +59,8 @@
|
||||
|
||||
struct MemsetThread {
|
||||
char *addr;
|
||||
uint64_t numpages;
|
||||
uint64_t hpagesize;
|
||||
size_t numpages;
|
||||
size_t hpagesize;
|
||||
QemuThread pgthread;
|
||||
sigjmp_buf env;
|
||||
};
|
||||
@ -301,11 +301,7 @@ static void sigbus_handler(int signal)
|
||||
static void *do_touch_pages(void *arg)
|
||||
{
|
||||
MemsetThread *memset_args = (MemsetThread *)arg;
|
||||
char *addr = memset_args->addr;
|
||||
uint64_t numpages = memset_args->numpages;
|
||||
uint64_t hpagesize = memset_args->hpagesize;
|
||||
sigset_t set, oldset;
|
||||
int i = 0;
|
||||
|
||||
/* unblock SIGBUS */
|
||||
sigemptyset(&set);
|
||||
@ -315,6 +311,10 @@ static void *do_touch_pages(void *arg)
|
||||
if (sigsetjmp(memset_args->env, 1)) {
|
||||
memset_thread_failed = true;
|
||||
} else {
|
||||
char *addr = memset_args->addr;
|
||||
size_t numpages = memset_args->numpages;
|
||||
size_t hpagesize = memset_args->hpagesize;
|
||||
size_t i;
|
||||
for (i = 0; i < numpages; i++) {
|
||||
/*
|
||||
* Read & write back the same value, so we don't
|
||||
@ -351,7 +351,8 @@ static inline int get_memset_num_threads(int smp_cpus)
|
||||
static bool touch_all_pages(char *area, size_t hpagesize, size_t numpages,
|
||||
int smp_cpus)
|
||||
{
|
||||
uint64_t numpages_per_thread, size_per_thread;
|
||||
size_t numpages_per_thread;
|
||||
size_t size_per_thread;
|
||||
char *addr = area;
|
||||
int i = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user