summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authordyson <dyson@FreeBSD.org>1997-06-16 00:29:36 +0000
committerdyson <dyson@FreeBSD.org>1997-06-16 00:29:36 +0000
commit1dcc2689e70c9a1ef6ab3fdc4cd16d3ccaa83c7d (patch)
treee5651aa05b6b49b6cd9fe5e8b7a44c6f4b09b6ee /sys/sys
parent195ce8e1d024251eb78a9b82a8ab980dadb12efe (diff)
downloadFreeBSD-src-1dcc2689e70c9a1ef6ab3fdc4cd16d3ccaa83c7d.zip
FreeBSD-src-1dcc2689e70c9a1ef6ab3fdc4cd16d3ccaa83c7d.tar.gz
Modifications to existing files to support the initial AIO/LIO and
kernel based threading support.
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/proc.h11
-rw-r--r--sys/sys/syscall-hide.h12
-rw-r--r--sys/sys/syscall.h14
-rw-r--r--sys/sys/sysproto.h55
-rw-r--r--sys/sys/unistd.h4
5 files changed, 93 insertions, 3 deletions
diff --git a/sys/sys/proc.h b/sys/sys/proc.h
index 54b3205..2c18e4e 100644
--- a/sys/sys/proc.h
+++ b/sys/sys/proc.h
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)proc.h 8.15 (Berkeley) 5/19/95
- * $Id: proc.h,v 1.38 1997/05/22 07:24:46 phk Exp $
+ * $Id: proc.h,v 1.39 1997/06/01 08:49:49 peter Exp $
*/
#ifndef _SYS_PROC_H_
@@ -178,6 +178,12 @@ struct proc {
u_short p_xstat; /* Exit status for wait; also stop signal. */
u_short p_acflag; /* Accounting flags. */
struct rusage *p_ru; /* Exit information. XXX */
+
+ int p_nthreads; /* number of threads (only in leader) */
+ int p_npeers; /* number of kernel threads (only in leader) */
+ int p_wakeup; /* thread id */
+ struct proc *p_peers;
+ struct proc *p_leader;
};
#define p_session p_pgrp->pg_session
@@ -218,6 +224,9 @@ struct proc {
#define P_SWAPINREQ 0x80000 /* Swapin request due to wakeup */
#define P_IDLEPROC 0x100000 /* Process is an idle-eater, don't count */
+/* Marked a kernel thread */
+#define P_KTHREADP 0x200000 /* Process is really a kernel thread */
+
/*
* MOVE TO ucred.h?
*
diff --git a/sys/sys/syscall-hide.h b/sys/sys/syscall-hide.h
index e1d8420..9719618 100644
--- a/sys/sys/syscall-hide.h
+++ b/sys/sys/syscall-hide.h
@@ -229,3 +229,15 @@ HIDE_BSD(kldnext)
HIDE_BSD(kldstat)
HIDE_BSD(kldfirstmod)
HIDE_BSD(signanosleep)
+HIDE_BSD(aio_return)
+HIDE_BSD(aio_suspend)
+HIDE_BSD(aio_cancel)
+HIDE_BSD(aio_error)
+HIDE_BSD(aio_read)
+HIDE_BSD(aio_write)
+HIDE_BSD(lio_listio)
+HIDE_BSD(yield)
+HIDE_BSD(thr_sleep)
+HIDE_BSD(thr_wakeup)
+HIDE_BSD(mlockall)
+HIDE_BSD(munlockall)
diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h
index 3049384..bd7b41d 100644
--- a/sys/sys/syscall.h
+++ b/sys/sys/syscall.h
@@ -223,4 +223,16 @@
#define SYS_kldstat 308
#define SYS_kldfirstmod 309
#define SYS_signanosleep 313
-#define SYS_MAXSYSCALL 314
+#define SYS_aio_return 314
+#define SYS_aio_suspend 315
+#define SYS_aio_cancel 316
+#define SYS_aio_error 317
+#define SYS_aio_read 318
+#define SYS_aio_write 319
+#define SYS_lio_listio 320
+#define SYS_yield 321
+#define SYS_thr_sleep 322
+#define SYS_thr_wakeup 323
+#define SYS_mlockall 324
+#define SYS_munlockall 325
+#define SYS_MAXSYSCALL 326
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index fb6a79e..cf0015b 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -8,6 +8,7 @@
#ifndef _SYS_SYSPROTO_H_
#define _SYS_SYSPROTO_H_
+#include <sys/aio.h>
#include <sys/signal.h>
struct nosys_args {
@@ -786,6 +787,48 @@ struct signanosleep_args {
struct timespec * rmtp;
sigset_t * mask;
};
+struct aio_return_args {
+ struct aiocb * aiocbp;
+};
+struct aio_suspend_args {
+ struct aiocb *const * aiocbp;
+ int nent;
+ const struct timespec * timeout;
+};
+struct aio_cancel_args {
+ int fd;
+ struct aiocb * aiocbp;
+};
+struct aio_error_args {
+ struct aiocb * aiocbp;
+};
+struct aio_read_args {
+ struct aiocb * aiocbp;
+};
+struct aio_write_args {
+ struct aiocb * aiocbp;
+};
+struct lio_listio_args {
+ int mode;
+ struct aiocb *const * acb_list;
+ int nent;
+ struct sigevent * sig;
+};
+struct yield_args {
+ int dummy;
+};
+struct thr_sleep_args {
+ const struct timespec * timeout;
+};
+struct thr_wakeup_args {
+ pid_t pid;
+};
+struct mlockall_args {
+ int how;
+};
+struct munlockall_args {
+ int dummy;
+};
int nosys __P((struct proc *, struct nosys_args *, int []));
void exit __P((struct proc *, struct rexit_args *, int [])) __dead2;
int fork __P((struct proc *, struct fork_args *, int []));
@@ -973,6 +1016,18 @@ int kldnext __P((struct proc *, struct kldnext_args *, int []));
int kldstat __P((struct proc *, struct kldstat_args *, int []));
int kldfirstmod __P((struct proc *, struct kldfirstmod_args *, int []));
int signanosleep __P((struct proc *, struct signanosleep_args *, int []));
+int aio_return __P((struct proc *, struct aio_return_args *, int []));
+int aio_suspend __P((struct proc *, struct aio_suspend_args *, int []));
+int aio_cancel __P((struct proc *, struct aio_cancel_args *, int []));
+int aio_error __P((struct proc *, struct aio_error_args *, int []));
+int aio_read __P((struct proc *, struct aio_read_args *, int []));
+int aio_write __P((struct proc *, struct aio_write_args *, int []));
+int lio_listio __P((struct proc *, struct lio_listio_args *, int []));
+int yield __P((struct proc *, struct yield_args *, int []));
+int thr_sleep __P((struct proc *, struct thr_sleep_args *, int []));
+int thr_wakeup __P((struct proc *, struct thr_wakeup_args *, int []));
+int mlockall __P((struct proc *, struct mlockall_args *, int []));
+int munlockall __P((struct proc *, struct munlockall_args *, int []));
#ifdef COMPAT_43
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h
index fc34139..efe6785 100644
--- a/sys/sys/unistd.h
+++ b/sys/sys/unistd.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)unistd.h 8.2 (Berkeley) 1/7/94
- * $Id$
+ * $Id: unistd.h,v 1.13 1997/02/22 09:46:21 peter Exp $
*/
#ifndef _SYS_UNISTD_H_
@@ -138,7 +138,9 @@
#define RFCNAMEG (1<<10) /* UNIMPL zero plan9 `name space' */
#define RFCENVG (1<<11) /* UNIMPL zero plan9 `env space' */
#define RFCFDG (1<<12) /* zero fd table */
+#define RFTHREAD (1<<13) /* enable kernel thread support */
#define RFPPWAIT (1<<31) /* parent sleeps until child exits (vfork) */
+
#endif /* !_POSIX_SOURCE */
#endif /* !_SYS_UNISTD_H_ */
OpenPOWER on IntegriCloud