Hoist the Blackfin implementation up to the common one.
+2021-04-18 Mike Frysinger <vapier@gentoo.org>
+
+ * interp.c (bfin_syscall): Delete CB_SYS_getpid handling.
+
2021-04-12 Mike Frysinger <vapier@gentoo.org>
* interp.c (sim_open): Delete 3rd arg to sim_cpu_alloc_all.
sc.result = setgid (sc.arg1);
goto sys_finish;
- case CB_SYS_getpid:
- tbuf += sprintf (tbuf, "getpid()");
- sc.result = getpid ();
- goto sys_finish;
case CB_SYS_kill:
tbuf += sprintf (tbuf, "kill(%u, %i)", args[0], args[1]);
/* Only let the app kill itself. */
+2021-04-18 Mike Frysinger <vapier@gentoo.org>
+
+ * syscall.c (cb_syscall): Implement CB_SYS_getpid.
+
2021-04-15 John Baldwin <jhb@FreeBSD.org>
* Make-common.in (CONFIG_CFLAGS): Remove SIM_EXTRA_CFLAGS.
}
break;
+ case CB_SYS_getpid:
+ result = getpid ();
+ break;
+
case CB_SYS_time :
{
/* FIXME: May wish to change CB_SYS_time to something else.
+2021-04-18 Mike Frysinger <vapier@gentoo.org>
+
+ * getpid.c: New test.
+
2021-04-08 Mike Frysinger <vapier@gentoo.org>
* allinsn.exp (arch): Delete.
--- /dev/null
+/* 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;
+}