Commit Graph

3521 Commits

Author SHA1 Message Date
matt
2546f51a33 Regen. 2003-09-26 23:11:16 +00:00
matt
ebb8ea4c89 Constify __sigaction_sigtramp argument 'void * tramp'. 2003-09-26 23:08:24 +00:00
matt
6986092cfe Add a machine-dependent SIGTRAMP_VALID macro which is used to test whether
a trampoline version is valid or not.
2003-09-26 22:14:19 +00:00
christos
b2ceab3824 constify sendsig/trapsignal 2003-09-25 21:59:18 +00:00
scw
a3b1a08d1e Fix for PR kern/22933
Avoid gcc3 pointer alias bugs caused by casting between struct callout
and struct callout_circq.
2003-09-25 10:44:11 +00:00
yamt
4e746c95f7 in getblk(), don't call allocbuf() for B_LOCKED buffers.
LFS misses total size of B_LOCKED buffer (locked_queue_bytes) when
getblk() re-size them.

XXX maybe needs a better fix.
2003-09-24 10:44:44 +00:00
nathanw
b1a13994b7 When the syscall was made a compat syscall and the function name
changed to compat_16_sys___sigaction14, the name of the _args
structure chaged as well.
2003-09-23 17:59:48 +00:00
thorpej
f0d728e698 Avoid a type punning warning in the MALLOC_DEBUG case. 2003-09-23 16:36:59 +00:00
christos
643e2f262c Regen 2003-09-23 14:34:38 +00:00
christos
b601ca6ba8 __sigaction14 should have been COMPAT_16 a while ago. GC it now. 2003-09-23 14:34:07 +00:00
christos
6edc0e184e - pass signo to fownsignal [ok by jd]
- make urg signal handling use fownsignal
- remove out of band detection in sowakeup
2003-09-22 12:59:55 +00:00
jdolecek
7cea8a1389 cleanup & uniform descriptor owner handling:
* introduce fsetown(), fgetown(), fownsignal() - this sets/retrieves/signals
  the owner of descriptor, according to appropriate sematics
  of TIOCSPGRP/FIOSETOWN/SIOCSPGRP/TIOCGPGRP/FIOGETOWN/SIOCGPGRP ioctl; use
  these routines instead of custom code where appropriate
* make every place handling TIOCSPGRP/TIOCGPGRP handle also FIOSETOWN/FIOGETOWN
  properly, and remove the translation of FIO[SG]OWN to TIOC[SG]PGRP
  in sys_ioctl() & sys_fcntl()
* also remove the socket-specific hack in sys_ioctl()/sys_fcntl() and
  pass the ioctls down to soo_ioctl() as any other ioctl

change discussed on tech-kern@
2003-09-21 19:16:48 +00:00
manu
b01f5cf127 Extra sanity checks: all char devices won't have an associated tty. 2003-09-21 18:40:38 +00:00
christos
8cf3af3092 - support for siginfo_t in ktrace
- make sure allocation for ksiginfo_t worked
2003-09-19 22:51:31 +00:00
christos
070899d51e support for siginfo_t in ktrace 2003-09-19 22:50:02 +00:00
christos
59294d6a54 fix typo (ktr -> ksi) 2003-09-16 15:59:28 +00:00
drochner
3e287f891b Take into account the possibility that the ktrace flags can change
during a read(v)/write(v). If that happeded, we either passed a NULL
pointer or a pointer to something uninitialized as iov to ktrace,
or we got a memory leak. In read/write (w/o -v) we zero-initialize
the iov now to limit damage, in the -v calls the (dynamically allocated)
pointer is checked after the I/O.
2003-09-16 15:55:26 +00:00
cl
52a920b5da add comments to the pagefault code 2003-09-16 15:28:45 +00:00
cl
d973127f38 Regen. 2003-09-16 13:49:23 +00:00
cl
c08e54b26b fix SA/pthread pagefault failure:
- prevent BLOCKED upcalls on double page faults and during upcalls
- make libpthread handle blocked threads which hold locks
- prevent UNBLOCKED upcalls from overtaking their BLOCKED upcall
this adds a new syscall sa_unblockyield
see also http://mail-index.netbsd.org/tech-kern/2003/09/15/0020.html
2003-09-16 13:46:24 +00:00
christos
1f73cefd27 - convert to circleq
- add simple lock for the list
- make get function remove the item from the list
- eliminate superfluous functions
thanks to enami and matt for the feedback.
2003-09-16 12:07:11 +00:00
christos
5501eeaa6b add siginfo lock and siginfo queue initialization. 2003-09-16 12:06:07 +00:00
christos
31663f15a1 add initialization of siginfo lock and queue.
Also initialize the lock for lwps, although it is not used for proc0 for
code consistency.
2003-09-16 12:05:49 +00:00
christos
048fedf253 include opt_compat_netbsd.h, otherwise we don't get the right signal
trampoline code in compat code.
2003-09-15 00:33:35 +00:00
christos
bed9693362 include <sys/poll.h> 2003-09-15 00:22:20 +00:00
christos
e8ae1a44db ksiginfo_t support. 2003-09-14 23:47:09 +00:00
christos
cc39a7a050 remove variable name from prototype. 2003-09-14 23:45:53 +00:00
christos
ccb1345dde provide some more ksiginfo info. 2003-09-14 23:45:16 +00:00
christos
ab8558b680 - don't trash the linked list pointers in the ksiginfo_t reuse case
[thanks enami]
- fix uninitialized variable in the exit hook.
  [thanks yamt]
2003-09-14 17:39:03 +00:00
yamt
966ada0097 assert that uio passed to uiomove() has valid uio_iovcnt. 2003-09-14 11:12:14 +00:00
yamt
0a4f15d329 when allocating a new vnode,
increment numvnodes before releasing vnode_free_list_slock.
2003-09-14 11:09:48 +00:00
christos
9970fc6a83 handle siginfo for deferred signals. Allocate a ksiginfo pool, and store
the information there.
TODO:
1. since timer stuff gets called from an interrupt context, we could
   preallocate ksiginfo_t's from the pool, so we don't need a kmem
   pool.
2. probably the sa signal delivery syscall can be changed to take
   a ksiginfo_t so we can use only one pool.
3. maybe when we add realtime signal support, add a resource limit
   on the number of ksiginfo_t's a process can allocate.
2003-09-14 06:59:13 +00:00
christos
24045725fc set the sigval in the setitimer case. 2003-09-14 06:56:22 +00:00
christos
35a41eaf06 enable SI_TIMER notification. 2003-09-13 22:39:18 +00:00
christos
4148967f74 provide siginfo_t in for SIGCHLD 2003-09-13 15:32:40 +00:00
jdolecek
a034152027 move dupfd from struct proc to struct lwp - it's per-LWP, not per-process; we
use curlwp where the lwp is not directly available, i.e. in device open
routines

briefly discussed on tech-kern
2003-09-13 08:32:10 +00:00
christos
136f9cd821 PR/15397: Jason Thorpe: directory operations on pathnames that refer to
directories and have trailing slashes should succeed. Ok'd by kjk.
Fix provided by enami.
2003-09-11 17:33:42 +00:00
yamt
ec0f99a001 acquire bqueue_slock around bremfree(). 2003-09-11 15:34:26 +00:00
christos
6b4bd0dc1b regen. 2003-09-11 14:00:21 +00:00
christos
71ee0b2991 - print comment in compat syscalls too.
- print ifdef's in the header files.
2003-09-11 13:59:49 +00:00
cl
96b4f15141 KNF and use f instead of s to temporarily save l_flag 2003-09-11 01:32:09 +00:00
drochner
6fb02278a3 Fix the "COW" case if a process does a detach() between fork()
and exit(): we have to lookup the entry in the private copy
again, otherwise the wrong list is manipulated.
should fix a panic on postgres shutdown reported by Marc Recht

being here, improve sone debug messages
2003-09-10 17:01:04 +00:00
christos
cbd4e9f601 Regen 2003-09-10 16:44:12 +00:00
christos
883b4b0369 we don't need sigreturn and sigcode glue if we are not compat_16 anymore. 2003-09-10 16:43:34 +00:00
kleink
5c5edae988 sigaction1(): if SA_SIGINFO is set but not supported, fail early.
As discussed with Christos.
2003-09-10 16:41:26 +00:00
yamt
50401b2019 use curcpu() rather than curlwp->l_cpu. 2003-09-10 10:55:50 +00:00
cl
f8a1f76075 fix timerupcall breakage after SA_SIGINFO changes:
- sa_upcall only stores a pointer to the `arg'
2003-09-09 15:16:30 +00:00
drochner
00c27c6064 Make per-process shm segment descriptor magement scale better for large
shminfo.shmseg, in view of the fact that only few processes utilize a
significant fraction of it:
-turn the table into a linked list, elements allocated from a pool(9)
-On fork(), just bump a refcount instead of copying the list; it will
 be decremented on exit() and exec(). Only copy if an attach or detach
 takes place in between, which is rarely the case.
2003-09-09 15:02:45 +00:00
itojun
311078a035 truncated output from pty problem. fix by enami
http://mail-index.netbsd.org/tech-kern/2003/09/06/0002.html
2003-09-08 11:14:18 +00:00
scw
20fb5a9f59 Cast from pointer type to db_addr_t via intptr_t. 2003-09-07 21:28:16 +00:00