Exec the getpid atom when testing for syslet support
[fio.git] / engines / syslet-rw.c
index 7e407d785bfbcbb73125214d48e88d1bbd679c9f..83c9842404ed424fc6512828510cd7d7498de54c 100644 (file)
@@ -253,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;
@@ -279,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;
 }
@@ -294,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;