Commit Graph

168008 Commits

Author SHA1 Message Date
ad c743ad7159 File descriptor changes, discussed on tech-kern:
- Redo reference counting to be sane.  LWPs accessing files take a short
  term reference on the local file descriptor.  This is the most common
  case.  While a file is in a process descriptor table, a reference is
  held to the file.  The file reference count only changes during control
  operations like open() or close().  Code that comes at files from an
  unusual direction (i.e. foreign to the process) like procfs or sysctl
  takes a reference on the file (f_count), and not on a descriptor.

- Remove knowledge of reference counting and locking from most code that
  deals with files.

- Make the usual case of file descriptor lookup lockless.

- Make kqueue MP and MT safe. PR kern/38098, PR kern/38137.

- Fix numerous file handling bugs, and bugs in the descriptor code that
  affected multithreaded processes.

- Split descriptor system calls out into sys_descrip.c.

- A few stylistic changes: KNF, remove unused casts now that caddr_t is
  gone. Replace dumb gotos with loop control in a few places.

- Don't do redundant pointer passing (struct proc, lwp, filedesc *) unless
  the routine is likely to be inlined.  Most of the time it's about the
  current process.
2008-03-21 21:53:35 +00:00
reed 4be51e0191 Add five more tips. 2008-03-21 21:45:30 +00:00
ad 159f554369 Move pthread__errno() into pthread_specific.c so it gets the "no stack
frame" treatment.
2008-03-21 21:35:43 +00:00
reed 6a0fa0e83c Fix reference to sshd_config manpage. 2008-03-21 21:27:16 +00:00
reed b89951ff87 Add "netbsd-tips" fortune database with 23 initial fortunes --
actually hints or suggestions or tips on using NetBSD.
Please share your brief NetBSD usage tips.
If you want to discuss or share suggestions, have a look
at http://wiki.netbsd.se/netbsd-tips wiki page.
2008-03-21 21:09:48 +00:00
plunky 8b2b4c8612 use devsw_name2chr() to look up the major number of the midi device as
it is a character device
2008-03-21 19:33:24 +00:00
plunky 606c30fdca add devsw_name2chr() function to look up character devices 2008-03-21 19:32:07 +00:00
plunky 755dfb4f38 when queueing a message back to Venus, prioritise signals by inserting
them at the head of the queue.

The original code had a comment saying to do this but the INSQUE did
not have any way to do that so it didn't actually
2008-03-21 18:02:39 +00:00
plunky 72ac0bcc50 convert more insque/remque style queuing to use a queue(3) TAILQ,
this necessitates using a flag to indicate vc_open instead of abusing
the queue pointer but apart from that there is no functional
difference.
2008-03-21 17:59:57 +00:00
ad 0c65d1b648 - Use atomic_inc_uint() to maintain the global count.
- Use a barrier to sync thread start.

Ok yamt@.
2008-03-21 16:03:33 +00:00
jdc 915ba4ba52 Increment libcurses minor version (termattrs() and term_attrs() added). 2008-03-21 13:43:36 +00:00
jdc 805ac24bda Add termattrs() and term_attrs().
Order the descriptions so that functions handling normal and functions
handling wide attributes are grouped together.
2008-03-21 13:43:17 +00:00
jdc 1ac1993d5c Add termattrs() and term_attrs(). 2008-03-21 13:42:50 +00:00
jdc 56a23c4b24 Add termattrs() and term_attrs().
Conditionally define HAVE_WCHAR, so that userland programs can see wide
definitions and functions.
2008-03-21 13:42:39 +00:00
jdc 80b229386d Add termattrs() and term_attrs() (requested by wiz@).
Only allow standout and underline if the terminal can do them.
2008-03-21 13:41:49 +00:00
xtraeme c280868dfa Split device_t/softc for all hpet consumers. 2008-03-21 13:28:14 +00:00
xtraeme d749da9154 Split device_t/softc for ichlpcib(4) and all hpet consumers, plus
other related cosmetic changes.
2008-03-21 13:25:27 +00:00
ad 58668c8e48 Add PB_PREV(), RB_FOREACH_REVERSE(). From FreeBSD. 2008-03-21 13:07:15 +00:00
xtraeme 409a4c533c Split device_t/softc for amdpcib and the hpet attachment, plus other
related cosmetic changes.
2008-03-21 12:29:38 +00:00
yamt 9ff0d7c13c test select(2). 2008-03-21 12:27:12 +00:00
rtr 16ebb0dc79 when the char being searched for is not found strchr() must return NULL
not a pointer to the terminating '\0'. the only time we return a pointer
to the terminating '\0' is when the char being searched for is '\0'.

fixes problem observed booting -current install
http://mail-index.netbsd.org/current-users/2008/03/20/msg001445.html
2008-03-21 10:24:13 +00:00
spz 435d63b60c default itojuns responsibilities to core 2008-03-21 08:56:06 +00:00
spz 5bdbf3a591 fix typo noticed by Christoph Egger 2008-03-21 08:53:06 +00:00
xtraeme 79f06cdde2 Don't forget to set the atac dev pointer in the softc; ahcisata at jmide
works again after that.

Also use CFATTACH_DECL_NEW, device_t and related changes for the NJMAHCI
block.
2008-03-21 08:25:38 +00:00
dyoung 935a45a6fb Use aprint_*_dev() instead of accessing struct device member dv_xname
directly.
2008-03-21 08:20:04 +00:00
dyoung 5c37160f8b Use aprint_*_dev(), and device_xname(). Constify a bit. 2008-03-21 08:17:30 +00:00
dyoung 8ce2158b0c pci_activate() expects for its void * argument to be a device_t,
so change the type of the argument to device_t.  Update each use
of pci_activate().

Use device_t and accessors.  Use aprint_*_dev().
2008-03-21 07:47:43 +00:00
dyoung 45361f4c9c Use device_t. 2008-03-21 00:24:34 +00:00
jmcneill c44602b31a I am not responsible for SCTP. 2008-03-20 23:17:56 +00:00
agc 3a4a1863f0 fix a small copyo 2008-03-20 22:55:01 +00:00
dyoung 4957795396 Use ip6_clearpktopts() to destroy the IPv6 PCB's in6p_outputopts,
so that there's no chance of either leaking memory, or leaving
dangling pointers to a route cache.
2008-03-20 20:32:00 +00:00
nakayama fb3ca52b49 - remove disabling interrupt in IPI.
- unused VA bits in MMU demap is 13 bits, not 12 bits.
2008-03-20 19:31:33 +00:00
ad 5e7d890908 - Extract the guts of soo_poll() into sopoll(), which takes a struct socket *.
This is for netsmb which wants to poll sockets directly.
- When polling a socket, first check for pending I/O without acquring any
  locks. If no I/O seems to be pending, acquire locks/spl and check again
  doing selrecord() if necessary.
2008-03-20 19:23:15 +00:00
ad a0bce9fd99 softint_execute: add more assertions. 2008-03-20 19:12:23 +00:00
mjf 74d757d370 struct componentname has no cn_lwp member anymore. Also update the data
types for the other struct members so they actually reflect sys/sys/namei.h
2008-03-20 18:56:28 +00:00
mhitch f8f1643217 Fix weak alias. 2008-03-20 18:49:39 +00:00
mhitch 83e4fa69d9 Add wrappers for missing coshf(), expf(), logf(), sinhf(), atan2f(), and
hypotf() functions for vax.  Play the namespace and weak alias game for
functions used internally by the complex functions.  Should fix the vax
build of libm.
2008-03-20 16:41:26 +00:00
cube ee39397d84 Fix previous. *Sigh* 2008-03-20 16:15:57 +00:00
cube 4137b5c813 Don't forget to se the device_t back pointer in the softc. 2008-03-20 16:00:16 +00:00
tsutsui 5469c6de57 Add some entries for my recent changes.
(puc(4), re(4), cobalt)
2008-03-20 15:33:39 +00:00
pooka 73bad8cbdb Reserve enough memory for ops which return more than they receive. 2008-03-20 15:28:03 +00:00
tsutsui 4fc9f09750 - add manpage suffix where appropriate (for changes page on www)
- fix typo
2008-03-20 15:13:50 +00:00
kochi 07973f8d9b reorder includes, fix indentation. 2008-03-20 14:56:06 +00:00
nakayama 7249e6951e Use proper ASI macro. 2008-03-20 13:18:16 +00:00
tnozaki 7ed5b48246 add BOM to utf-16/32 stream in case that endian is not specified,
like other iconv implementation, GNU libiconv, glibc2 iconv, perl iconv.
2008-03-20 11:47:45 +00:00
tnozaki 0b9f4942b6 allow SUSv3 syntax.
if from/to code is ommitted, auto-guess'ed from current locale.
2008-03-20 11:35:44 +00:00
kochi c45bfb6fd1 Make ia64 kernel of GENERIC.SKI config compile.
Only compile tested.
2008-03-20 09:09:19 +00:00
kochi 473f1b48ee Add ia64 MI atomic ops.
(Not tested at all, just for reference)
2008-03-20 07:10:31 +00:00
lukem 235fbd4ecb pam_group needs libutil & libcrypt 2008-03-20 02:19:48 +00:00
cube 384b03ce27 Don't assume wd_softc embeds a struct device. 2008-03-19 23:43:41 +00:00