]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
spu_run.2: Use syscall(SYS_...) for system calls without a wrapper
authorAlejandro Colomar <alx.manpages@gmail.com>
Sat, 12 Jun 2021 08:31:23 +0000 (10:31 +0200)
committerAlejandro Colomar <alx.manpages@gmail.com>
Sun, 1 May 2022 20:54:25 +0000 (22:54 +0200)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
man2/spu_run.2

index 495735538d6090a5f315e481310d3f3502e3d960..62e355029ca1b6fea845a7b225f33f2de8017708 100644 (file)
@@ -21,7 +21,8 @@ Standard C library
 .BR "#include <sys/syscall.h>" "      /* Definition of " SYS_* " constants */"
 .B #include <unistd.h>
 .PP
-.BI "int spu_run(int " fd ", uint32_t *" npc ", uint32_t *" event );
+.BI "int syscall(SYS_spu_run, int " fd ", uint32_t *" npc \
+", uint32_t *" event );
 .fi
 .PP
 .IR Note :
@@ -219,7 +220,7 @@ int main(void)
     int context, fd, spu_status;
     uint32_t instruction, npc;
 
-    context = spu_create("/spu/example\-context", 0, 0755);
+    context = syscall(SYS_spu_create, "/spu/example\-context", 0, 0755);
     if (context == \-1)
         handle_error("spu_create");
 
@@ -241,7 +242,7 @@ int main(void)
      */
     npc = 0;
 
-    spu_status = spu_run(context, &npc, NULL);
+    spu_status = syscall(SYS_spu_run, context, &npc, NULL);
     if (spu_status == \-1)
         handle_error("open");