Commit Graph

7797 Commits

Author SHA1 Message Date
rmind
95ea6d26ab Re-implement kthread_join(9), so that it actually works (hi haad@). 2011-05-19 03:07:29 +00:00
christos
fc6147c605 No need to mask twice. The setup function does it. 2011-05-18 14:48:04 +00:00
christos
e2543d0362 PR/43625: Mark Davies: Fix pselect(2) to honor the temporary mask. pselect(2)
(and pollts(2)) are similar to sigsuspend(2) in that they temporarily change
the process signal mask and wait for signal delivery. Factor out and share the
code that does this.
2011-05-18 03:51:41 +00:00
mrg
8169e46991 move and rename the uvm history code out of uvm_stat to "kernhist".
rename "UVMHIST" option to enable the uvm histories.

TODO:
- make UVMHIST properly depend upon KERNHIST
- enable dynamic registration of histories.  this is mostly just
  allocating something in a bitmap, and is only for viewing multiple
  histories in a merged form.


tested on amd64 and sparc64.
2011-05-17 04:18:05 +00:00
dholland
bd77476310 Hack for PR 44961: restore the prior "logic" pertaining to looking up /
to prevent a crash when attempting rename("/", "foo"). This is not really
what I want going forward and it may cause e.g. rmdir("blah/") to fail, so
if it causes trouble for anyone back it out. The right fix is going to have
to wait until the qemu/tcp_vtw problems I ran into last night get sorted out.
2011-05-16 15:09:31 +00:00
rmind
4f9fb56b98 fork1: fix stop-on-fork case, lend a correct lock to LWP for LSSTOP state.
Fixes PR/44935.
2011-05-14 18:50:07 +00:00
rmind
a4a64d151a - Sprinkle __read_mostly, consitify maxdmap and maxsmap.
- Prevent sys/resourcevar.h from inclusion in userland.
- sys_{set,get}priority: use id_t for 'who', not int.
- Make donice() routine static.
- Remove trailing spaces, KNF.
2011-05-14 17:57:05 +00:00
rmind
53963a9398 Improve/fix comments, give more meaningful names for variables. 2011-05-14 17:12:28 +00:00
rmind
2db2f4467c - Replace shmmap_entry_pool with kmem(9), as pool is not worth.
- Sprinkle __cacheline_aligned and __read_mostly.
2011-05-13 22:22:55 +00:00
rmind
7507a4555c Sprinkle __cacheline_aligned and __read_mostly, also const-ify. 2011-05-13 22:22:03 +00:00
rmind
f8060297de Sprinkle __cacheline_aligned and __read_mostly, make some functions static. 2011-05-13 22:19:41 +00:00
rmind
f132c365c0 Sprinkle __cacheline_aligned and __read_mostly. 2011-05-13 22:16:43 +00:00
matt
b2a5597aea Don't call pcu_do_op in pcu_load to save current context, use pcu_cpu_op
instead (since it will deal with ci->ci_pcu_curlwp[id] being NULL).
2011-05-02 06:33:16 +00:00
matt
ccb56f14ea A little more constification 2011-05-02 01:43:37 +00:00
rmind
38d699a20d Extend PCU:
- Add pcu_ops_t::pcu_state_release() operation for PCU_RELEASE case.
- Add pcu_switchpoint() to perform release operation on context switch.
- Sprinkle const, misc.  Also, sync MIPS with changes.

Per discussions with matt@.
2011-05-02 00:29:53 +00:00
christos
74ccadd18b if donice fails, don't keep going with the next process. 2011-05-01 02:46:19 +00:00
rmind
a38faca994 - Remove FORK_SHARELIMIT and PL_SHAREMOD, simplify lim_privatise().
- Use kmem(9) for struct plimit::pl_corename.
2011-05-01 01:15:18 +00:00
rmind
38964b45cb Merge duplicate code fragments into a new lim_setcorename() routine. 2011-05-01 00:22:36 +00:00
rmind
d636db9233 Rename limfree() to lim_free(), misc clean up. No functional change. 2011-05-01 00:11:52 +00:00
rmind
b9ca5bc92d sysctl_proc_corename: improve comments, clean up, move a check for
KAUTH_REQ_PROCESS_CORENAME_SET earlier, do not bother to strcmp().
2011-04-30 23:41:17 +00:00
rmind
e0258609a4 Small comment improvement. 2011-04-29 22:57:54 +00:00
plunky
6192253699 drop inline here, to avoid C99 vs GNU differences 2011-04-27 08:32:42 +00:00
martin
00d08a9058 Simplify previous: the original code was mostly correct but relied on
"register_t" being signed.
2011-04-27 06:22:11 +00:00
rmind
69a047faf7 Make stopsigmask static, sprinkle __cacheline_aligned and __read_mostly. 2011-04-27 00:38:37 +00:00
rmind
3d12d00f76 G/C M_EMULDATA 2011-04-27 00:36:47 +00:00
joerg
5e6a27ebbb Remove Mach specific trace points. 2011-04-27 00:00:46 +00:00
martin
6f0225fc15 Stupidly (but standards commpliant) the gidsetsize argument of the
getgroups() syscall is "int" - i.e. signed.
Explicitly check for negative values and make them fail.
2011-04-26 19:58:12 +00:00
ahoka
7d403a6f10 Hold the current lwp's mutex, instead of the lwp we want to wait for
in kthread_join(). This fixes panics with DIAGNOSTIC and possibly some
rare race conditons.
2011-04-26 17:40:38 +00:00
joerg
e958063324 Remove IRIX emulation 2011-04-26 16:36:40 +00:00
joerg
5aca2679d7 Remove Darwin, MACH and Mach-O support. 2011-04-26 15:51:22 +00:00
hannken
87522af425 Change vflushbuf() to return an error if a synchronous write fails.
Welcome to 5.99.51.
2011-04-26 11:32:38 +00:00
martin
7a1f019e2d Add missing <sys/atomic.h> include. 2011-04-25 11:39:42 +00:00
rmind
800683e30d sys_link: prevent hard links on directories (cross-mount operations are
already prevented).  File systems are no longer responsible to check this.
Clean up and add asserts (note that dvp == vp cannot happen in vop_link).

OK dholland@
2011-04-24 21:35:29 +00:00
rmind
507c30fb60 Drop extern inline for fd_getfile(). Apparently, GCC already ignores it. 2011-04-24 20:30:38 +00:00
rmind
603e520a84 - Move some checks into mqueue_get() and avoid some duplication.
- Simplify message queue descriptor unlinking and closure operations.
- Update proc_t::p_mqueue_cnt atomically.  Inherit it on fork().
- Use separate allocation for the name of message queue.
2011-04-24 20:17:53 +00:00
rmind
bd5b92d68b - Replace few malloc(9) uses with kmem(9).
- Rename buf_malloc() to buf_alloc(), fix comments.
- Remove some unnecessary inclusions.
2011-04-24 18:46:22 +00:00
rmind
2626d57668 Rename ttymalloc() to tty_alloc(), and ttyfree() to tty_free() for
consistency.  Remove some unnecessary malloc.h inclusions as well.
2011-04-24 16:26:51 +00:00
rmind
6a7d2e04ad - Sprinkle __cacheline_aligned and __read_mostly in file descriptor code.
- While here, remove trailing whitespaces, KNF.
2011-04-23 18:57:27 +00:00
martin
ffaba5de79 Relax an assertion 2011-04-19 07:12:59 +00:00
dholland
66bcf26abf Simplify logic: at the bottom of the loop, instead of checking if we
should continue and if not breaking unconditionally, check if we
should break and if not use the bottom of the loop to continue to the
next iteration.
2011-04-18 00:47:24 +00:00
dholland
34cecc956d Goto considered harmful: now the "goto alldone" can be dropped by
reversing the sense of the associated test and using the big block I
moved a couple versions back (and didn't reindent on purpose) as the
body of the if statement.

There are now no gotos in namei_oneroot, only normal loop logic.
2011-04-18 00:47:04 +00:00
dholland
d5da8807ec The "goto alldone" from a couple patches back (inside the loop) can
now be changed to a loop break and another null test and goto outside
the loop. In neither of the other two cases for exiting the loop can
foundobj be null.
2011-04-18 00:46:39 +00:00
dholland
4e686966b9 Goto considered harmful: "goto terminal" can now just be "break". 2011-04-18 00:46:14 +00:00
dholland
58f787872f Move the big chunk of code at "terminal:" outside the loop; since it
has an unconditional loop break at the end this can be done safely,
now that the other loop break has been patched out.

Add a spurious set of braces to preserve the indent for the moment.
2011-04-18 00:45:53 +00:00
dholland
6a68e5d4c1 Goto still harmful, but use "goto alldone" in place of a loop break
for now anyway.
2011-04-18 00:45:29 +00:00
dholland
43ee276311 Goto considered harmful; remove dirloop: in favor of using a loop
continue.

This runs the "are we mounted?" test on every directory instead of
only sometimes; however, it's not exactly an expensive test (null
pointer check) and the prior logic wasn't exactly sensible -- it
checked at the beginning and after following a symlink but, for some
reason, not after crossing a mount point.
2011-04-18 00:45:07 +00:00
dholland
0830aae894 ISSYMLINK is now only referenced inside vfs_lookup.c, and not needed
there, so get rid of it.
2011-04-18 00:40:53 +00:00
rmind
7e2ef7ad8f Replace malloc with kmem, and remove M_SUBPROC. 2011-04-18 00:26:11 +00:00
rmind
1acca05347 ksem_free: remove wrong assert. 2011-04-17 20:37:43 +00:00
mrg
2101d54084 add a "module_machine", that defaults to machine.
allows MD code to override the default subdir for modules.
2011-04-17 05:16:28 +00:00