summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2003-01-18 10:32:11 +0000
committerthorpej <thorpej@NetBSD.org>2003-01-18 10:32:11 +0000
commitc62a74e6d5cfb2fb5034e98b983da7e2fc87709d (patch)
treef1281fd7111ddb57951e4472b342b53a2f56244a /include
parentaf919042eceb8c19f42acd688efa8cf58168af5d (diff)
Merge the nathanw_sa branch.
Diffstat (limited to 'include')
-rw-r--r--include/Makefile8
-rw-r--r--include/kvm.h4
-rw-r--r--include/lwp.h60
-rw-r--r--include/sa.h58
-rw-r--r--include/signal.h6
-rw-r--r--include/stdio.h6
-rw-r--r--include/ucontext.h53
7 files changed, 186 insertions, 9 deletions
diff --git a/include/Makefile b/include/Makefile
index 698e1aea259..373b21e2a65 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.105 2002/09/18 06:17:38 lukem Exp $
+# $NetBSD: Makefile,v 1.106 2003/01/18 10:32:11 thorpej Exp $
# @(#)Makefile 8.2 (Berkeley) 1/4/94
# Doing a make includes builds /usr/include
@@ -12,14 +12,14 @@ INCS= a.out.h ar.h assert.h bitstring.h bm.h cpio.h ctype.h db.h dirent.h \
getopt.h glob.h grp.h ifaddrs.h \
inttypes.h iso646.h kvm.h langinfo.h libgen.h \
limits.h link.h link_aout.h link_elf.h locale.h \
- login_cap.h malloc.h math.h md2.h md4.h md5.h \
+ login_cap.h lwp.h malloc.h math.h md2.h md4.h md5.h \
memory.h mpool.h ndbm.h netconfig.h netdb.h netgroup.h nlist.h \
nl_types.h \
nsswitch.h paths.h pwd.h ranlib.h re_comp.h regex.h regexp.h \
- resolv.h rmd160.h rmt.h sched.h search.h setjmp.h sgtty.h sha1.h \
+ resolv.h rmd160.h rmt.h sa.h sched.h search.h setjmp.h sgtty.h sha1.h \
signal.h stab.h stddef.h stdio.h stdlib.h string.h strings.h \
stringlist.h struct.h sysexits.h tar.h time.h ttyent.h tzfile.h \
- ulimit.h unistd.h util.h utime.h utmp.h utmpx.h vis.h wchar.h wctype.h
+ ucontext.h ulimit.h unistd.h util.h utime.h utmp.h utmpx.h vis.h wchar.h wctype.h
INCS+= arpa/ftp.h arpa/inet.h arpa/nameser.h arpa/telnet.h arpa/tftp.h
INCS+= protocols/dumprestore.h protocols/routed.h protocols/rwhod.h \
protocols/talkd.h protocols/timed.h
diff --git a/include/kvm.h b/include/kvm.h
index a9ca6a9907f..42eb665221e 100644
--- a/include/kvm.h
+++ b/include/kvm.h
@@ -1,4 +1,4 @@
-/* $NetBSD: kvm.h,v 1.10 2000/06/26 06:38:02 kleink Exp $ */
+/* $NetBSD: kvm.h,v 1.11 2003/01/18 10:32:11 thorpej Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -71,6 +71,8 @@ char **kvm_getenvv2 __P((kvm_t *, const struct kinfo_proc2 *, int));
char *kvm_geterr __P((kvm_t *));
int kvm_getloadavg __P((kvm_t *, double [], int));
char *kvm_getfiles __P((kvm_t *, int, int, int *));
+struct kinfo_lwp *
+ kvm_getlwps __P((kvm_t *, int, u_long, size_t, int *));
struct kinfo_proc2 *
kvm_getproc2 __P((kvm_t *, int, int, size_t, int *));
struct kinfo_proc *
diff --git a/include/lwp.h b/include/lwp.h
new file mode 100644
index 00000000000..6e7047602f1
--- /dev/null
+++ b/include/lwp.h
@@ -0,0 +1,60 @@
+/* $NetBSD: lwp.h,v 1.2 2003/01/18 10:32:11 thorpej Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nathan Williams.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _LWP_H_
+#define _LWP_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/ucontext.h>
+
+__BEGIN_DECLS
+int _lwp_self __P((void));
+int _lwp_create __P((const ucontext_t *, unsigned long, lwpid_t *));
+int _lwp_exit __P((void));
+int _lwp_wait __P((lwpid_t, lwpid_t *));
+int _lwp_suspend __P((lwpid_t));
+int _lwp_continue __P((lwpid_t));
+int _lwp_wakeup __P((lwpid_t));
+void _lwp_makecontext __P((ucontext_t *, void (*)(void *), void *, void *,
+ caddr_t, size_t));
+void *_lwp_getprivate __P((void));
+void _lwp_setprivate __P((void *));
+__END_DECLS
+
+#endif /* !_LWP_H_ */
diff --git a/include/sa.h b/include/sa.h
new file mode 100644
index 00000000000..200c737b02a
--- /dev/null
+++ b/include/sa.h
@@ -0,0 +1,58 @@
+/* $NetBSD: sa.h,v 1.2 2003/01/18 10:32:11 thorpej Exp $ */
+
+/*-
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nathan Williams.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _SA_H_
+#define _SA_H_
+
+#include <sys/cdefs.h>
+#include <sys/types.h>
+#include <sys/ucontext.h>
+#include <sys/sa.h>
+
+
+__BEGIN_DECLS
+int sa_register __P((sa_upcall_t, sa_upcall_t *, int));
+int sa_stacks __P((int, stack_t *));
+size_t sa_getstacksize __P((void));
+int sa_enable __P((void));
+int sa_setconcurrency __P((int));
+int sa_yield __P((void));
+int sa_preempt __P((int));
+__END_DECLS
+
+#endif /* !_SA_H_ */
diff --git a/include/signal.h b/include/signal.h
index e63357312c7..44a2f52d76e 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -1,4 +1,4 @@
-/* $NetBSD: signal.h,v 1.22 2003/01/15 23:55:41 kleink Exp $ */
+/* $NetBSD: signal.h,v 1.23 2003/01/18 10:32:11 thorpej Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -63,9 +63,13 @@ int raise __P((int));
#ifndef _ANSI_SOURCE
int kill __P((pid_t, int));
+int pthread_sigmask __P((int, const sigset_t *, sigset_t *));
+
#ifdef __LIBC12_SOURCE__
int sigaction __P((int, const struct sigaction13 *, struct sigaction13 *));
int __sigaction14 __P((int, const struct sigaction *, struct sigaction *));
+int __libc_sigaction14 __P((int, const struct sigaction *,
+ struct sigaction *));
int sigaddset __P((sigset13_t *, int));
int __sigaddset14 __P((sigset_t *, int));
int sigdelset __P((sigset13_t *, int));
diff --git a/include/stdio.h b/include/stdio.h
index dc35643640f..08d27515123 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -1,4 +1,4 @@
-/* $NetBSD: stdio.h,v 1.47 2002/12/20 20:59:22 atatat Exp $ */
+/* $NetBSD: stdio.h,v 1.48 2003/01/18 10:32:11 thorpej Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -251,6 +251,8 @@ FILE *tmpfile __P((void));
int ungetc __P((int, FILE *));
int vfprintf __P((FILE * __restrict, const char * __restrict,
_BSD_VA_LIST_));
+int vfprintf_unlocked __P((FILE * __restrict, const char * __restrict,
+ _BSD_VA_LIST_));
int vprintf __P((const char * __restrict, _BSD_VA_LIST_));
#ifndef __AUDIT__
@@ -294,11 +296,9 @@ __END_DECLS
!defined(_XOPEN_SOURCE)) || (_POSIX_C_SOURCE - 0) >= 199506L || \
(_XOPEN_SOURCE - 0) >= 500 || defined(_REENTRANT)
__BEGIN_DECLS
-#if 0 /* not yet */
void flockfile __P((FILE *));
int ftrylockfile __P((FILE *));
void funlockfile __P((FILE *));
-#endif /* 0 */
int getc_unlocked __P((FILE *));
int getchar_unlocked __P((void));
int putc_unlocked __P((int, FILE *));
diff --git a/include/ucontext.h b/include/ucontext.h
new file mode 100644
index 00000000000..feabd9d385a
--- /dev/null
+++ b/include/ucontext.h
@@ -0,0 +1,53 @@
+/* $NetBSD: ucontext.h,v 1.2 2003/01/18 10:32:11 thorpej Exp $ */
+
+/*-
+ * Copyright (c) 1999 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Klaus Klein.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _UCONTEXT_H_
+#define _UCONTEXT_H_
+
+#include <sys/cdefs.h>
+#include <sys/ucontext.h>
+
+__BEGIN_DECLS
+int getcontext(ucontext_t *);
+int setcontext(const ucontext_t *);
+void makecontext(ucontext_t *, void (*)(), int, ...);
+int swapcontext(ucontext_t *, const ucontext_t *);
+
+__END_DECLS
+
+#endif /* !_UCONTEXT_H_ */