chiark / gitweb /
Use getxpid syscall on alpha for raw_getpid()
authorMatt Turner <mattst88@gmail.com>
Tue, 4 Aug 2015 21:47:01 +0000 (14:47 -0700)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:18:46 +0000 (10:18 +0100)
Alpha does not have a getpid syscall, but rather has getxpid to match
OSF/1.

src/basic/missing.h

index aad00b965e906d6ba7467cd28991adf0c6585488..37e1133d3aceb6633f174f0bd8ebf922a51bf121 100644 (file)
@@ -957,7 +957,11 @@ static inline int raw_clone(unsigned long flags, void *child_stack) {
 }
 
 static inline pid_t raw_getpid(void) {
+#if defined(__alpha__)
+        return (pid_t) syscall(__NR_getxpid);
+#else
         return (pid_t) syscall(__NR_getpid);
+#endif
 }
 
 #if !HAVE_DECL_RENAMEAT2