Commit Graph

2541 Commits

Author SHA1 Message Date
manu a3703d68ef Backed out a previous commit that was incomplete and hence broke several
emulation package build
2001-05-19 17:28:33 +00:00
manu 37a42fd1bf Moved e_flags outsied of ifdef __HAVE_MINIMAL_EMUL in struct emul
and removed an ifdef that was taking care of this problem
2001-05-19 08:52:05 +00:00
perry 4be93c9ed7 Add a /* LINTSTUB: include <foo.h> */ mechanism. 2001-05-16 04:17:04 +00:00
perry bf16779f43 allow long typed functions 2001-05-16 03:58:14 +00:00
perry 3fe923fc2c I -> Ignore 2001-05-15 22:32:02 +00:00
perry 7cb4818421 awk script to automatically generate lint stub files from stylized
comments in .S files.
2001-05-15 22:23:09 +00:00
lukem 6cb5e77db5 remove use of gcc syntax for designated initialisers when initialising
unions `union_elem: ...', and use c99 syntax `.union_elem = ...' only
where necessary.
in this case, there's no need to tag elf_probe_func because that's the
first union element, and therefore, the implicit case. only specifically
mention ecoff_probe_func where necessary.

if we decide to not use this c99 feature for now, at least there's now
less stuff to rip out.
2001-05-15 02:00:12 +00:00
sommerfeld b4c4ecb455 Make this build again ifdef DIAGNOSTIC (oops) 2001-05-13 17:17:34 +00:00
sommerfeld 5b2241ad77 Remove pool reentrancy testing overhead unless DIAGNOSTIC is defined.
Previously, we passed __FILE__ and __LINE__ on all pool_get/pool_set calls.

This change results in a measured 1.2% performance improvement in
ping-flood packets-per-second as reported by ping(8).
2001-05-13 17:06:58 +00:00
thorpej 2f58df9a8f Rearrange the code that adds pages of objects to the pool; require
that the caller allocate the pool_item_header when it allocates the
pool page, so we can avoid a locking pitfall (sleeping with a simple
lock held).

Also revive pool_prime(), as there are some letigimate uses of it,
but in doing so, eliminate some of the bogosities of the old version
(i.e. don't do an implicit "setlowat", just prime the pool, and incr
the minpages for each additional page we add, and compute the number
of pages to prime in a way that callers would expect).
2001-05-10 04:51:41 +00:00
thorpej 6ec67f871a Use POOL_NEEDS_CATCHUP() in one more place. 2001-05-10 02:19:32 +00:00
thorpej db26619a5e Encapsulate the test for a pool needing a pool_catchup() in a macro. 2001-05-10 01:37:40 +00:00
thorpej 627edfcb50 Remove pool_create() and pool_prime(). Nothing except pool_create()
used pool_prime(), and no one uses pool_create() anymore.

This makes it easier to fix a locking pitfall.
2001-05-09 23:46:02 +00:00
thorpej 626cb1c3ce Use pool_init() rather then pool_create(). 2001-05-09 23:38:20 +00:00
jdolecek 27a5a43c04 In the check_header() function, bump the number of allowed section headers
to 512. Apparently, there are ELF binaries with more than 128 section
headers - an example is one of Linux Word Perfect 8 utilities.

This fixes kern/12455 by Mark Davies.
2001-05-07 17:09:13 +00:00
manu 7e6929fe90 Changed EMUL_BSD_ASYNCIO_PIPE to EMUL_NO_BSD_ASYNCIO_PIPE, so that
the native emulation (NetBSD) does not have a flag.
2001-05-07 09:55:12 +00:00
lukem 5b2ac78763 regen from vnode_if.sh rev 1.29 2001-05-07 08:48:07 +00:00
lukem e1adc31453 delint: vop_default_desc was declared const but not defined const. 2001-05-07 08:46:02 +00:00
enami 8e5a4722c5 Make this file *just* compiles again when __HAVE_MINIMAL_EMUL is defined. 2001-05-07 02:51:53 +00:00
enami 362af21bc7 Fix broken indentation introduced by previous commit. 2001-05-07 02:28:55 +00:00
manu 573ce64c6b implement the recently introduced EMUL_BSD_ASYNCIO_PIPE emulation package
flag.

EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.
2001-05-06 19:22:32 +00:00
manu 5a6b8191b5 Added two flags to emulation packages:
EMUL_BSD_ASYNCIO_PIPE notes that the emulated binaries expect the original
BSD pipe behavior for asynchronous I/O, which is to fire SIGIO on read() and
write(). OSes without this flag do not expect any SIGIO to be fired on
read() and write() for pipes, even when async I/O was requested. As far as
we know, the OSes that need EMUL_BSD_ASYNCIO_PIPE are NetBSD, OSF/1 and
Darwin.

EMUL_NO_SIGIO_ON_READ notes that the emulated binaries that requested
asynchrnous I/O expect the reader process to be notified by a SIGIO, but
not the writer process. OSes without this flag expect the reader and the
writer to be notified when some data has arrived or when some data have been
read. As far as we know, the OSes that need EMUL_NO_SIGIO_ON_READ are Linux
and SunOS.
2001-05-06 19:09:52 +00:00
simonb cbbd901bdc Declare schedhz. 2001-05-06 13:46:34 +00:00
simonb 6a2acde042 Save the start and end positions in the message buffer of the formatted
panic string.

Suggested by Jason Thorpe eons ago.
2001-05-06 13:23:42 +00:00
thorpej da1f26d65f Add pool_cache_destruct_object(), used to force destruction of
an object and release back into the pool.
2001-05-04 19:41:25 +00:00
scw 2963ff5c58 Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
2001-05-02 10:32:08 +00:00
enami bda65c7816 Define local variable cpu_id only when either MULTIPROCESSOR or DIAGNOSTIC
is defined since it isn't used otherwise.
2001-05-01 04:30:04 +00:00
kleink 50d738a0f0 Add %j, %t and %z modifiers. 2001-04-30 21:29:45 +00:00
kml fc1ebff2b2 Large values of sb_max would cause an overflow in sbreserve(); cast to
u_quad_t to avoid this.  (from FreeBSD uipc_socket2.c v1.19)
2001-04-30 03:32:56 +00:00
bjh21 beb69f2aad Before allowing kgmon to do anything, check that we managed to allocate the
profiling buffer at startup.  If not, pretend the kernel doesn't have
profiling support at all.
2001-04-28 12:56:00 +00:00
jdolecek 27706951af Slighly improve comment for ltsleep(), the previous formulation might
be understood incorrectly (at least, it confused me at first, before
I looked at the actual code).
2001-04-27 08:00:03 +00:00
lukem cdf90834d5 put TAB after #defines 2001-04-27 06:07:27 +00:00
marcus 11ac2c3105 STDC cleanup: multi line string literal removed. 2001-04-27 00:06:11 +00:00
marcus b6240639a2 STDC cleanup: volatile needs to be cast away for lk_flags as well. 2001-04-27 00:05:13 +00:00
enami 5a6a17f734 Make sysctl_msgbuf() to copy message buffer to userland even if
the write pointer points to the beginning of message buffer.
2001-04-26 06:07:13 +00:00
thorpej c24c3604b0 SPINLOCK_INTERLOCK_RELEASE_HOOK should actually be
SPINLOCK_SPIN_HOOK, so that we actually check for
pending IPIs on the Alpha more than once.  Also,
when we call alpha_ipi_process(), make sure to go
to splipi().
2001-04-20 22:58:39 +00:00
thorpej a18eaa4cb6 Make sure there is there is a curproc in ltsleep(). 2001-04-20 17:58:49 +00:00
lukem 63a13d4499 use ${.CURDIR:H:H} instead of ../.. for default setting of SYSDIR,
because the latter doesn't work with objdirs
2001-04-18 11:21:24 +00:00
thorpej 5b35dc8136 When unmounting a file system, acquire the syncer_lock before
vfs_busy'ing just before the dounmount() call.  This is to avoid
sleeping with the mountlist_slock held -- but we must acquire
syncer_lock before vfs_busy because the syncer itself uses
syncer_lock -> vfs_busy locking order.
2001-04-16 22:41:09 +00:00
thorpej bf2dcec4f5 Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
2001-04-13 23:29:55 +00:00
thorpej 4cb159296b Remove an splimp() that really has no purpose in life. 2001-04-12 03:08:42 +00:00
kleink fba80da1d1 Regen. 2001-04-10 11:06:20 +00:00
kleink c73bcbb0f8 Slight indentation nit. 2001-04-10 11:03:56 +00:00
enami c75004b245 Fix the name of some bits in struct vnode.v_flag. 2001-04-09 14:14:10 +00:00
jdolecek b6d1d4db02 Change the first arg to fileops fo_stat routine to struct file *, adjust
callers and appropriate routines to cope. This makes fo_stat more
consistent with rest of fileops routines and also makes the fo_stat
match FreeBSD as an added bonus.
Discussed with Luke Mewburn on tech-kern@.
2001-04-09 10:22:00 +00:00
jdolecek 16b1272b3f Add new 'stat' fileop and call the stat function via f_ops rather
than directly.
For compat syscalls, also add necessary FILE_USE()/FILE_UNUSE().
Now that soo_stat() gets a proc arg, pass it on to usrreq function.
2001-04-07 09:00:57 +00:00
jhawk 4f4abf46ee SYSDIR should be relative here, too.
And actually use it after we define it.

Optimize the find expression (use -prune over -path)
2001-04-05 19:49:40 +00:00
jhawk 0ee6a7e6e9 Remove grossly inefficient "! -path /sys/arch*" construct in favor of -prune.
Use a relative path (../..) instead of /sys.

Enhance the sed expression to work with .'s in paths.
Quote sed expressions in single quotes rather than double
quotes unless there's a good reason otherwise.
2001-04-03 16:56:16 +00:00
chs 702fa72b16 in bwrite(), when deciding whether to convert sync writes into delayed writes,
examine the filesystem contained in a block device rather than the filesystem
containing the block device vnode.  fixes PR 12484.
2001-04-01 16:16:56 +00:00
enami 2ceebb6c0e Remove unnecessary test of tp->t_linesw against NULL; they are results
of confusion while correcting compilation error after t_line is
replaced with t_linesw.
2001-03-31 00:35:21 +00:00