Commit Graph

162499 Commits

Author SHA1 Message Date
apb
ec2d191f5e Revert to revision 1.128. Now that the Var* functions no longer try to
write into const strings, it's safe to pass a truly constant string to
Var_Subst.
2007-10-13 20:01:33 +00:00
apb
7da86686ca Don't write into const strings; not even if we intend to
reinstate the original contents later.
2007-10-13 19:59:52 +00:00
rmind
d780d0c9df Missed the date in the last entry, pointed out by <xtraeme>. 2007-10-13 19:20:53 +00:00
christos
a59b81d6d8 strlen returns size_t 2007-10-13 18:28:35 +00:00
pooka
6360ca31ab Execute getattr in lookup to get file size. The kernel doesn't
anymore do this if we fail to set size.

The whole lookup procedure should be done in a smarter fashion,
but this is the quickie fix to get things working again.
2007-10-13 17:21:39 +00:00
apb
67bb324312 * Convert all uses of strdup() to estrdup();
* Use estrndup() in a few cases where it simplifies the code;
* Provide compatibility definitions of strndup and estrndup;
2007-10-13 16:16:41 +00:00
xtraeme
ed29af22c3 sme_event_drvadd: there's no need to acquire the mutex only when
setting the object on its dictionary.
2007-10-13 16:00:46 +00:00
joerg
19459bd736 Bump default size of the message buffer from 16 KB to 32 KB.
This is large enough that boot -v on most systems fits into the
message buffer, which makes it easier for debugging.
2007-10-13 14:46:54 +00:00
apb
781e1efd0c Oops, missed a few more comments in previous. 2007-10-13 14:32:18 +00:00
apb
a8bf2a2f8a Correct documentation for Var_Parse's freePtr arg. It's a pointer to
the thing to be freed (or NULL if nothing to free), not to a pointer to
boolean saying whether or not to free the result.
2007-10-13 13:54:06 +00:00
isaki
e334010e29 Correct indent. 2007-10-13 13:05:19 +00:00
yamt
2ea5c00ae9 sched_wakeup: remove a wrong assertion. 2007-10-13 12:05:32 +00:00
dsl
5dc59d0d4b When processing .include "../../foo.mk" lexically process the leading ../
against the directory name of the makefile being processed.
Shortens a lot of pathnames (especially in pkgsrc) and significantly
reduces the number of duplicate entries in .MAKE.MAKEFILES
2007-10-13 11:08:05 +00:00
rmind
aa9301c8f4 sysctl_kern_lwp: Use a correct variable when rechecking if LWP still
exists after relocking.  Found via CID: 4689.  OK by <dsl>.
2007-10-13 10:04:08 +00:00
dsl
5651920158 The 'job_prefix' string can be static but not const 'hi xtos'. 2007-10-13 08:58:48 +00:00
xtraeme
7703f72284 Use PRI_NONE for the priority argument in workqueue_create(9). 2007-10-13 02:44:19 +00:00
xtraeme
112f996fbc Use a mutex(9) rather than a rwlock(9), it's cheaper. 2007-10-13 00:56:16 +00:00
rmind
6673d94694 - Fix a comment: LSIDL is covered by spc_mutex, not spc_lwplock.
- mi_switch: Add a comment that spc_lwplock might not necessary be held.
2007-10-13 00:30:26 +00:00
rmind
337692921d sleepq_remove: Do not call sched_wakeup() when thread is running.
This fixes a locking problem, when l_cpu is changed in LSONPROC state.
Possible case was noted by <ad>.
2007-10-13 00:13:05 +00:00
dsl
fad077a68d If we are going to save the names of all opened makefiles, do so when files
are first processed, not for every line of every loop inside the file.
When (attempting) to check for duplicate names, use the spaces between names
as separators rather than using strstr() - which is slow and wont find
duplicates after an incorect early match.
However the duplicate check is rather broken (especially for pkgsrc) where
names like ../../devel/atk/../../devel/glib2/../../devel/gettext-lib/ \
../../devel/gettext-lib/../../mk/buildlink3/../../mk/bsd.prefs.mk
which need (some form of) realpath() processing.
'cd pkgsrc/xaa/gtk2; make show-var VARNAME=.MAKE.MAKEFILES' shows the problem.
2007-10-12 23:38:27 +00:00
christos
0f19d8c420 static a const string. 2007-10-12 23:13:16 +00:00
christos
31bed26f71 improve on previous 2007-10-12 23:07:04 +00:00
dsl
bb4beef604 Var_Subst() seems to write into its input string! So we do need a copy. 2007-10-12 22:49:36 +00:00
dsl
215593ad6c Remove tmp[] buffer and strncpy() call. 2007-10-12 21:47:25 +00:00
christos
019362ec2a - unlink the warmstart file first and then open it exclusively.
(From Brian Ginsbach)
- ifdef the whole file #ifdef WARMSTART to save space.
2007-10-12 21:24:01 +00:00
ad
0256cc1d6a Merge from vmlocking: fix a deadlock with (threaded) soft interrupts and
process exit.
2007-10-12 14:29:37 +00:00
ad
972c6ae552 crit_enter/crit_exit are now available. 2007-10-12 13:38:08 +00:00
ad
78e4c5b083 Merge from vmlocking:
- uiomove: don't bother dropping kernel_lock if moving less than 1k.
- Catch up with vfsops reference counting changes (for LKMs).
- Add crit_enter()/crit_exit(). These bound critical sections in which
  kernel preemption is to be disabled. Better names welcome.
2007-10-12 13:00:18 +00:00
tsutsui
312a218da4 Regen from miidevs rev 1.73:
> Add Realtek RTL8211, which has the same ID with 8169S/8110S internal PHY.
2007-10-12 10:14:03 +00:00
tsutsui
4699c7f1af Add Realtek RTL8211, which has the same ID with 8169S/8110S internal PHY. 2007-10-12 10:13:07 +00:00
martin
28da38cbee Fix command name matching, avoid jumps to null function pointers and
some minor cosmetics.
2007-10-12 09:53:07 +00:00
dogcow
5b3a726673 <sys/lock.h> wants uintptr_t, so include <sys/stdint.h>.
cf <slrnfgtjo3.rj4.mason@g.primenet.com.au>, et al.
2007-10-12 09:15:37 +00:00
skrll
0d58a1f020 Don't restrict the offset when allocating a map entry for in-kernel map -
use UVM_UNKNOWN_OFFSET in the call to uvm_map_prepare.

This fixes a '"panic: malloc: out of space in kmem_map" when it's not
really' testcase of mine, and one reported to me by chuq. This is likely
to fix PR/35587 as well.

Looks/seems fine to me from chuq and yamt. Thanks.
2007-10-12 06:45:17 +00:00
pooka
be762f2f50 add HFIW and HSIW
(these acronyms contributed by Jared D. McNeill and his contributors)
2007-10-12 00:14:20 +00:00
pooka
1ff56db239 g/c garbage 2007-10-11 23:46:08 +00:00
pooka
c0a5a05f36 Handle suspend and flush requests from the file server. 2007-10-11 23:04:21 +00:00
pooka
de3b90f940 add testing option -l, which causes the flush of the page cache of
the node under lookup (if found)
2007-10-11 23:03:00 +00:00
pooka
d0216e150a in case of version mismatch, print the numbers 2007-10-11 22:06:05 +00:00
sjg
1050c04a22 If _BASENAME_DEFSHELL is defined, it might be a full path,
in which case we should not prepend _PATH_DEFSHELLDIR.
2007-10-11 21:19:28 +00:00
dyoung
462deb7ea8 In ifreq_setaddr(), use the right buffer sizes for compat v.
non-compat commands.
2007-10-11 20:47:27 +00:00
ad
715427972b LKMs & userspace don't care about LOCKDEBUG any more. 2007-10-11 20:11:38 +00:00
ad
0336b62acd NetBSD 4.99.33 - more stuff merged from vmlocking branch. 2007-10-11 20:11:10 +00:00
ad
4c92a21547 Remove LOCK_ASSERT(!simple_lock_held(&foo)); 2007-10-11 19:53:37 +00:00
ad
112ca87c2d Use __SIMPLELOCK_LOCKED_P(). 2007-10-11 19:49:04 +00:00
xtraeme
cee3aed721 Also log the 'low-power' event via logger -p warning to have records
of what happened.
2007-10-11 19:47:26 +00:00
ad
11dc639958 Merge from vmlocking:
- G/C spinlockmgr() and simple_lock debugging.
- Always include the kernel_lock functions, for LKMs.
- Slightly improved subr_lockdebug code.
- Keep sizeof(struct lock) the same if LOCKDEBUG.
2007-10-11 19:45:24 +00:00
pooka
33c91738e5 Part 1/n of some pretty extensive changes to how the kernel module
interacts with the userspace file server:

  * since the kernel-user communication is not purely request-response
    anymore (hasn't been since 2006), try to rename some "request" to
    "message".  more similar mangling will take place in the future.

  * completely rework how messages are allocated.  previously most of
    them were borrowed from the stack (originally *all* of them),
    but now always allocate dynamically.  this makes the structure
    of the code much cleaner.  also makes it possible to fix a
    locking order violation.  it enables plenty of future enhancements.

  * start generalizing the transport interface to be independent of puffs

  * move transport interface to read/write instead of ioctl.  the
    old one had legacy design problems, and besides, ioctl's suck.
    implement a very generic version for now; this will be
    worked on later hopefully some day reaching "highly optimized".

  * implement libpuffs support behind existing library request
    interfaces.  this will change eventually (I hate those interfaces)
2007-10-11 19:41:13 +00:00
ad
7408fd8960 On NetBSD/amd64, load modules within the first 2GB of RAM.
Should fix xsrc/25170 and server crashes due to jemalloc.
2007-10-11 19:04:49 +00:00
ad
6b7322f1ed This was using mutex_exit where mutex_enter was required. 2007-10-11 18:46:19 +00:00
xtraeme
e37a405299 Remove the BUGS section, event delivery of the status has been
there for many years already.
2007-10-11 18:33:49 +00:00