]> Git Repo - qemu.git/blobdiff - darwin-user/syscall.c
Make PowerPC cache line size implementation dependant.
[qemu.git] / darwin-user / syscall.c
index f69a5aacd93d011f889fca0eab298d74afe367c5..f17e5910126f13b6cd8c19e05c55db3dd5148e71 100644 (file)
@@ -53,6 +53,8 @@
 #include <mach/ndr.h>
 #include <mach/mig_errors.h>
 
+#include <sys/xattr.h>
+
 #include "qemu.h"
 
 //#define DEBUG_SYSCALL
@@ -451,21 +453,49 @@ long do_mach_syscall(void *cpu_env, int num, uint32_t arg1, uint32_t arg2, uint3
     case -31:
         DPRINTF("mach_msg_trap(0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
                 arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-
         ret = target_mach_msg_trap((mach_msg_header_t *)arg1, arg2, arg3, arg4, arg5, arg6, arg7);
-
         break;
+/* may need more translation if target arch is different from host */
+#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
+    case -33:
+        DPRINTF("semaphore_signal_trap(0x%x)\n", arg1);
+        ret = semaphore_signal_trap(arg1);
+        break;
+    case -34:
+        DPRINTF("semaphore_signal_all_trap(0x%x)\n", arg1);
+        ret = semaphore_signal_all_trap(arg1);
+        break;
+    case -35:
+        DPRINTF("semaphore_signal_thread_trap(0x%x)\n", arg1, arg2);
+        ret = semaphore_signal_thread_trap(arg1,arg2);
+        break;
+#endif
     case -36:
         DPRINTF("semaphore_wait_trap(0x%x)\n", arg1);
         extern int semaphore_wait_trap(int); // XXX: is there any header for that?
         ret = semaphore_wait_trap(arg1);
         break;
+/* may need more translation if target arch is different from host */
+#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
+    case -37:
+        DPRINTF("semaphore_wait_signal_trap(0x%x, 0x%x)\n", arg1, arg2);
+        ret = semaphore_wait_signal_trap(arg1,arg2);
+        break;
+#endif
     case -43:
         DPRINTF("map_fd(0x%x, 0x%x, 0x%x, 0x%x, 0x%x)\n",
                 arg1, arg2, arg3, arg4, arg5);
         ret = map_fd(arg1, arg2, (void*)arg3, arg4, arg5);
         tswap32s((uint32_t*)arg3);
         break;
+/* may need more translation if target arch is different from host */
+#if (defined(TARGET_I386) && defined(__i386__)) || (defined(TARGET_PPC) && defined(__ppc__))
+    case -61:
+        DPRINTF("syscall_thread_switch(0x%x, 0x%x, 0x%x)\n",
+                arg1, arg2, arg3);
+        ret = syscall_thread_switch(arg1, arg2, arg3);  // just a hint to the scheduler; can drop?
+        break;
+#endif
     case -89:
         DPRINTF("mach_timebase_info(0x%x)\n", arg1);
         struct mach_timebase_info info;
@@ -1306,7 +1336,7 @@ static inline long bswap_syctl(int * mib, int count, void *buf, int size)
         if(!(sysctl = sysctl->childs))
             break;
     }
-    
+
     if(ret->childs)
         qerror("we shouldn't have a directory element\n");
 
@@ -1345,7 +1375,7 @@ long do___sysctl(int * name, uint32_t namelen, void * oldp, size_t * oldlenp, vo
         //bswap_syctl(name, namelen, newp, newlen);
         tswap32s((uint32_t*)oldlenp);
     }
-        
+
     if(name) /* Sometimes sysctl is called with no arg1, ignore */
         ret = get_errno(sysctl(name, namelen, oldp, oldlenp, newp, newlen));
 
This page took 0.025309 seconds and 4 git commands to generate.