diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 20:53:03 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-18 21:22:31 -0400 |
commit | 7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf (patch) | |
tree | 6b5e493e21e20d52d35e251c11acf48b78919e31 /sim/testsuite/bfin/getpid.c | |
parent | d3b0ab8b36319f4232367b046ecfc0c656a177ad (diff) | |
download | binutils-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.zip binutils-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.tar.gz binutils-7da5cf78fb1ba3e93cc5e79cf5084bd2b03f0fcf.tar.bz2 |
sim: syscall: add getpid support
Hoist the Blackfin implementation up to the common one.
Diffstat (limited to 'sim/testsuite/bfin/getpid.c')
-rw-r--r-- | sim/testsuite/bfin/getpid.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sim/testsuite/bfin/getpid.c b/sim/testsuite/bfin/getpid.c new file mode 100644 index 0000000..11d5c50 --- /dev/null +++ b/sim/testsuite/bfin/getpid.c @@ -0,0 +1,18 @@ +/* Basic getpid tests. +# mach: bfin +# cc: -msim +*/ + +#include <stdio.h> +#include <unistd.h> + +int main(int argc, char *argv[]) +{ + pid_t pid = getpid(); + if (pid < 0) { + perror("getpid failed"); + return 1; + } + puts("pass"); + return 0; +} |