Browse Source

__tfork() needs to set the stack address of the new thread in the kernel,

so that it can't get a signal while still running on the parent thread's
stack.  Also, pass in sizeof(struct __tfork) to provide forward compat
when more members are added.  This is an ABI change, so switch syscall
numbers and bump lib majors this time.
ok deraadt@ matthew@
OPENBSD_5_2
guenther 12 years ago
parent
commit
52982a7d87
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      src/include/unistd.h

+ 3
- 1
src/include/unistd.h View File

@ -1,4 +1,4 @@
/* $OpenBSD: unistd.h,v 1.72 2012/05/30 19:34:30 matthew Exp $ */
/* $OpenBSD: unistd.h,v 1.73 2012/06/21 00:56:59 guenther Exp $ */
/* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */ /* $NetBSD: unistd.h,v 1.26.4.1 1996/05/28 02:31:51 mrg Exp $ */
/*- /*-
@ -501,6 +501,8 @@ void setusershell(void);
int strtofflags(char **, u_int32_t *, u_int32_t *); int strtofflags(char **, u_int32_t *, u_int32_t *);
int swapctl(int cmd, const void *arg, int misc); int swapctl(int cmd, const void *arg, int misc);
int syscall(int, ...); int syscall(int, ...);
pid_t __tfork_thread(const struct __tfork *, size_t, void (*)(void *),
void *);
#endif /* __BSD_VISIBLE */ #endif /* __BSD_VISIBLE */
__END_DECLS __END_DECLS


Loading…
Cancel
Save