diff options
author | phk <phk@FreeBSD.org> | 1998-05-28 09:30:28 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1998-05-28 09:30:28 +0000 |
commit | d3d65c6b2e376ac074f3ca386b6f5b70ea37636f (patch) | |
tree | 6beef0d8c93f6063bf0b9870b87a8c1ef8267cd4 /sys/sys/msgbuf.h | |
parent | 3654f28d394a609d42e7000c62963c45e3bba3db (diff) | |
download | FreeBSD-src-d3d65c6b2e376ac074f3ca386b6f5b70ea37636f.zip FreeBSD-src-d3d65c6b2e376ac074f3ca386b6f5b70ea37636f.tar.gz |
Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.
Use an inline function rather than a macro for timecounter delta.
Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.
Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()
This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.
WARNING: Programs which muck about with struct proc in userland
will have to be fixed.
Reviewed, but found imperfect by: bde
Diffstat (limited to 'sys/sys/msgbuf.h')
-rw-r--r-- | sys/sys/msgbuf.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sys/sys/msgbuf.h b/sys/sys/msgbuf.h index 2a153c8..4cfd004 100644 --- a/sys/sys/msgbuf.h +++ b/sys/sys/msgbuf.h @@ -31,27 +31,30 @@ * SUCH DAMAGE. * * @(#)msgbuf.h 8.1 (Berkeley) 6/2/93 - * $Id: msgbuf.h,v 1.9 1997/02/22 09:45:37 peter Exp $ + * $Id: msgbuf.h,v 1.10 1998/05/19 08:58:35 phk Exp $ */ #ifndef _SYS_MSGBUF_H_ #define _SYS_MSGBUF_H_ -#if defined(KERNEL) && !defined(MSGBUF_SIZE) -#define MSGBUF_SIZE 8192 -#endif - struct msgbuf { #define MSG_MAGIC 0x063062 unsigned int msg_magic; - unsigned int msg_size; /* MSG_BSIZE */ + unsigned int msg_size; /* size of buffer area */ unsigned int msg_bufx; /* write pointer */ unsigned int msg_bufr; /* read pointer */ char * msg_ptr; /* pointer to buffer */ }; + #ifdef KERNEL extern int msgbufmapped; extern struct msgbuf *msgbufp; +void msgbufinit __P((void *ptr, size_t size)); + +#if !defined(MSGBUF_SIZE) +#define MSGBUF_SIZE 8192 +#endif + #endif #endif |