parlib: Add __uth_sync_swap and __uth_sync_is_empty
[akaros.git] / user / parlib / asynccall.c
index ab525fb..f9c18bd 100644 (file)
@@ -1,15 +1,17 @@
 #include <stdlib.h>
 
-#include <ros/common.h>
+#include <parlib/common.h>
+#include <parlib/assert.h>
+#include <parlib/stdio.h>
 #include <ros/syscall.h>
 #include <ros/ring_syscall.h>
 #include <ros/sysevent.h>
-#include <arc.h>
+#include <parlib/arc.h>
 #include <errno.h>
-#include <arch/arch.h>
+#include <parlib/arch/arch.h>
 #include <sys/param.h>
-#include <arch/atomic.h>
-#include <vcore.h>
+#include <parlib/arch/atomic.h>
+#include <parlib/vcore.h>
 
 syscall_desc_pool_t syscall_desc_pool;
 async_desc_pool_t async_desc_pool;
@@ -186,7 +188,7 @@ int waiton_syscall(syscall_desc_t* desc)
 {
        int retval = 0;
        if (desc == NULL || desc->channel == NULL){
-               errno = EFAIL;
+               errno = EFAULT;
                return -1;
        }
        // Make sure we were given a desc with a non-NULL frontring.  This could
@@ -194,7 +196,7 @@ int waiton_syscall(syscall_desc_t* desc)
        syscall_front_ring_t *fr =  &desc->channel->sysfr;
        
        if (!fr){
-               errno = EFAIL;
+               errno = EFAULT;
                return -1;
        }
        printf("waiting %d\n", vcore_id());