Exec the getpid atom when testing for syslet support
[fio.git] / engines / syslet-rw.c
index d225cc41630d0a4838da6d41ae1b7da485f11fa6..83c9842404ed424fc6512828510cd7d7498de54c 100644 (file)
@@ -13,7 +13,6 @@
 #include <asm/unistd.h>
 
 #include "../fio.h"
-#include "../os.h"
 
 #ifdef FIO_HAVE_SYSLET
 
@@ -254,6 +253,8 @@ static int fio_syslet_queue(struct thread_data *td, struct io_u *io_u)
 {
        struct syslet_data *sd = td->io_ops->data;
 
+       fio_ro_check(td, io_u);
+
        if (sd->tail) {
                sd->tail->next = &io_u->req.atom;
                sd->tail = &io_u->req.atom;
@@ -280,6 +281,7 @@ static int async_head_init(struct syslet_data *sd, unsigned int depth)
        sd->ahu.head_stack = thread_stack_alloc();
        sd->ahu.head_eip = (unsigned long) cachemiss_thread_start;
        sd->ahu.new_thread_eip = (unsigned long) cachemiss_thread_start;
+       sd->ahu.new_thread_stack = thread_stack_alloc();
 
        return 0;
 }
@@ -295,7 +297,7 @@ static int check_syslet_support(struct syslet_data *sd)
        void *ret;
 
        init_atom(&atom, __NR_getpid, NULL, NULL, NULL, NULL, NULL, 0, NULL);
-       ret = async_exec(sd->head, &sd->ahu);
+       ret = async_exec(&atom, &sd->ahu);
        if (ret == (void *) -1)
                return 1;