]> git.saurik.com Git - apple/xnu.git/blobdiff - libsyscall/xcodescripts/create-syscalls.pl
xnu-3789.70.16.tar.gz
[apple/xnu.git] / libsyscall / xcodescripts / create-syscalls.pl
index ca2700866a08882f8ec96f0e56bfbe078de3d87a..54514f454e89ddc26161aee91cdf21ae9ed6848f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl
 #
-# Copyright (c) 2006-2012 Apple Inc. All rights reserved.
+# Copyright (c) 2006-2014 Apple Inc. All rights reserved.
 #
 # @APPLE_OSREFERENCE_LICENSE_HEADER_START@
 # 
@@ -61,9 +61,9 @@ my $OutDir;
 # size in bytes of known types (only used for i386)
 my %TypeBytes = (
     'au_asid_t'                => 4,
-    'associd_t'                => 4,
+    'sae_associd_t'    => 4,
     'caddr_t'          => 4,
-    'connid_t'         => 4,
+    'sae_connid_t'     => 4,
     'gid_t'            => 4,
     'id_t'             => 4,
     'idtype_t'         => 4,
@@ -97,26 +97,6 @@ my %TypeBytes = (
 # Moving towards storing all data in this hash, then we always know
 # if data is aliased or not, or promoted or not.
 my %Symbols = (
-    "quota" => {
-        c_sym => "quota",
-        syscall => "quota",
-        asm_sym => "_quota",
-        is_private => undef,
-        is_custom => undef,
-        nargs => 4,
-        bytes => 0,
-        aliases => {},
-    },
-    "setquota" => {
-        c_sym => "setquota",
-        syscall => "setquota",
-        asm_sym => "_setquota",
-        is_private => undef,
-        is_custom => undef,
-        nargs => 2,
-        bytes => 0,
-        aliases => {},
-    },
     "syscall" => {
         c_sym => "syscall",
         syscall => "syscall",
@@ -135,17 +115,18 @@ my @Cancelable = qw/
        accept access aio_suspend
        close connect connectx
        disconnectx
-       fcntl fdatasync fpathconf fstat fsync
+       faccessat fcntl fdatasync fpathconf fstat fstatat fsync
        getlogin
        ioctl
-       link lseek lstat
+       link linkat lseek lstat
        msgrcv msgsnd msync
-       open
-       pathconf peeloff poll posix_spawn pread pwrite
-       read readv recvfrom recvmsg rename
+       open openat
+       pathconf peeloff poll posix_spawn pread pselect pwrite
+       read readv recvfrom recvmsg rename renameat
+       rename_ext
        __semwait_signal __sigwait
-       select sem_wait semop sendmsg sendto sigsuspend stat symlink sync
-       unlink
+       select sem_wait semop sendmsg sendto sigsuspend stat symlink symlinkat sync
+       unlink unlinkat
        wait4 waitid write writev
 /;
 
@@ -240,6 +221,7 @@ sub checkForCustomStubs {
         if (!$$sym{is_private}) {
             foreach my $subarch (@Architectures) {
                 (my $arch = $subarch) =~ s/arm(v.*)/arm/;
+                $arch =~ s/x86_64(.*)/x86_64/;
                 $$sym{aliases}{$arch} = [] unless $$sym{aliases}{$arch};
                 push(@{$$sym{aliases}{$arch}}, $$sym{asm_sym});
             }
@@ -261,6 +243,7 @@ sub readAliases {
     my @a = ();
     for my $arch (@Architectures) {
         (my $new_arch = $arch) =~ s/arm(v.*)/arm/g;
+        $new_arch =~ s/x86_64(.*)/x86_64/g;
         push(@a, $new_arch) unless grep { $_ eq $new_arch } @a;
     }
     
@@ -318,6 +301,7 @@ sub writeStubForSymbol {
     my @conditions;
     for my $subarch (@Architectures) {
         (my $arch = $subarch) =~ s/arm(v.*)/arm/;
+        $arch =~ s/x86_64(.*)/x86_64/;
         push(@conditions, "defined(__${arch}__)") unless grep { $_ eq $arch } @{$$symbol{except}};
     }
 
@@ -349,6 +333,7 @@ sub writeAliasesForSymbol {
     
     foreach my $subarch (@Architectures) {
         (my $arch = $subarch) =~ s/arm(v.*)/arm/;
+        $arch =~ s/x86_64(.*)/x86_64/;
         
         next unless scalar($$symbol{aliases}{$arch});