summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/mutex_unix.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-04-18It seems that the CPUID lies about the monitor-line size, or at least ourkettenis6-86/+36
interpretation of it isn't quite right. So instead of allocating memory and slicing it based on the parameters returned by CPUID, simply use a member in struct cpu_info like basically all other OSes out there do. Our struct cpu_info is large enough to never cause any overlap. This makes the mwait-based idle loop actually work. We still execute the CPUID instruction to make sure monitor/mwait is properly supported by the hardware we're running on. ok sthen@, deraadt@, guenther@
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failurederaadt48-221/+423
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-04-18Delete the wrapper functions mdoc_meta(), man_meta(), mdoc_node(),schwarze11-111/+53
man_node() from the mandoc(3) semi-public interface and the internal wrapper functions print_mdoc() and print_man() from the HTML formatters. Minus 60 lines of code, no functional change.
2015-04-18Unify {mdoc,man}_{alloc,reset,free}() into roff_man_{alloc,reset,free}().schwarze7-202/+107
Minus 80 lines of code, no functional change. Written on the train from Koeln to Wolfsburg returning from p2k15.
2015-04-18Move mdoc_hash_init() and man_hash_init() to libmandoc.hschwarze8-23/+24
and call them from mparse_alloc() and choose_parser(), preparing unified allocation of struct roff_man.
2015-04-18Profit from the unified struct roff_man and reduce the number ofschwarze8-81/+77
arguments of mparse_result() by one. No functional change. Written on the ICE Bruxelles-Koeln on the way back from p2k15.
2015-04-18Replace the structs mdoc and man by a unified struct roff_man.schwarze25-323/+306
Almost completely mechanical, no functional change. Written on the train from Exeter to London returning from p2k15.
2015-04-18another round of reducing the diff to linuxjsg45-214/+209
2015-04-18Simplify vio_encap() a bit.sf1-7/+5
From brad@
2015-04-18from brad:jmc5-25/+25
don;t try to list all generations in ciss's Nd; do not use all caps for "array"
2015-04-18define and use trace macrosjsg10-156/+517
discussed with kettenis
2015-04-18Remove some unused debug functions. If we're interested injsg1-366/+1
these in future we should add i915_debugfs.c
2015-04-18replace the hand rolled lists of mbufs in hfsc_classq with andlg1-40/+20
mbuf_list. hfsc lists are very clever because they manage a fifo with a single pointer by abusing the m_next pointer of the tail mbuf to point to the head. clever but hard to read. mbuf_lists are slightly bigger because they explicitely track the head mbuf, but i got us that space back by inlining hfsc_classq into hfsc_class and removing the unnecessary classq field. ok henning@
2015-04-18add and use module param macrosjsg6-98/+155
2015-04-18Avoid calling freeifaddrs() with an uninitialised pointer in anjsg1-3/+4
error path.
2015-04-18Regis Leroy reported that httpd does not strictly accept CRLF forjsg1-5/+6
newlines which could lead to http response splitting/smuggling if a badly behaved proxy is in front of httpd. Switch from evbuffer_readline() to evbuffer_readln() with EVBUFFER_EOL_CRLF_STRICT to avoid this. ok florian@
2015-04-18i386 and amd64 have only one syscall entry point now, so simply theguenther4-20/+11
EIP/RIP adjustment for ERESTART ok mlarkin@
2015-04-18Use futimens() to preserve timestamps with subsec precision.guenther1-17/+17
Don't cast file sizes to size_t when comparing file contents for the -C option ok deraadt@
2015-04-17Use getint() instead of intval() for parsing the columns variable,deraadt1-3/+13
allowing the addition of more accurate bounds and garbage checks. ok millert
2015-04-17FALLTHROUGH in getopt is incorrect. While here use strtonumderaadt1-7/+6
to parse tz_minuteswest. ok millert
2015-04-17On Ethernet packets have a minimal length, so very short packetsbluhm1-2/+6
get padding appended to them. This padding is not stripped off in ip6_input() (due to support for IPv6 Jumbograms, RFC2675). That means PF needs to be careful when reassembling fragmented packets to not include the padding in the reassembled packet. from FreeBSD; via Kristof Provost; OK henning@
2015-04-17s/recommended/required/ that private keys be og-rdjm1-2/+2
this wording change was made a while ago but got accidentally reverted
2015-04-17don't try to cleanup NULL KEX proposals in kex_prop_free();djm1-1/+3
found by Jukka Taimisto and Markus Hietava
2015-04-17use error/logit/fatal instead of fprintf(stderr, ...) and exit(0),djm1-153/+94
fix a few errors that were being printed to stdout instead of stderr and a few non-errors that were going to stderr instead of stdout bz#2325; ok dtucker
2015-04-17debug log missing DISPLAY environment when X11 forwardingdjm1-1/+5
requested; bz#1682 ok dtucker@
2015-04-17while trying to reproduce lockups on mp alpha i hit andlg2-78/+55
MUTEX_ASSERT_UNLOCKED, but it turns out alpha mutexes arent very friendly to diagnostics on smp systems. alpha mutexes contained an mtx_lock member. when 0 the mutex was unlocked, and when 1 it was locked. the MUTEX_ASSERT_UNLOCKED checked if mtx_lock was 1 to see if the current cpu owned the mutex, but in an mp system another cpu may have set mtx_lock to 1, which causes the assert to fire. this changes alpha mutexes so they record which cpu owns the lock rather than just if the lock is held or not. the diagnostics compare the owner to the current cpus curcpu() address so they can actually tell if the current cpu holds the lock instead of whether any cpu holds the lock. instead of using custom asm to implement a cas this uses atomic_cas_ptr, which on alpha uses gcc cas code. miod says he has far more confidence in the gcc cas than the code that was there before. while im here i also shuffled the code. on MULTIPROCESSOR systems instead of duplicating code between mtx_enter and mtx_enter_try, mtx_enter simply loops on mtx_enter_try until it succeeds. this also provides an alternative implementation of mutexes on !MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes wont contend on UP boxes, theyre basically wrappers around spls. we can just do the splraise, stash the owner as a guard value for DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never fail, so we can just call mtx_enter and return 1. ok miod@
2015-04-17IPSEC_IN_CRYPTO_DONE and OUT_CRYPTO_NEEDED are gonemikeb1-17/+3
2015-04-17Stubs and support code for NIC-enabled IPsec bite the dust.mikeb14-331/+119
No objection from reyk@, OK markus, hshoexer
2015-04-17Remove unused ipsp_parse_headers that was supposed to parse packetsmikeb1-219/+1
returned by IPsec-enabled NICs; OK markus, hshoexer
2015-04-17Remove unsupported SADB_X_IDENTTYPE_CONNECTION; OK markus, hshoexermikeb5-25/+8
2015-04-17Remove superflous "::1" route, test currently failing but a fix ismpi2-2/+0
in its way.
2015-04-17Local routes should be present in the routing table output.mpi2-0/+8
2015-04-17parse_prefix in parse.c got changed but the declaration in bgpctl.cphessler3-9/+6
wasn't updated, so we would crash when doing `bgpctl net bulk` commands. Fix by moving parse_prefix into a header, since we use it in more than one file. crash found by henning@ underlying problem found by blambert@ OK sthen@ deraadt@ claudio@ henning@
2015-04-17Match -current output. Every configured address should have a local routempi3-4/+4
and remove redundant loopback cloning route. Note that tests using IPv6 still contain two routes to "::1" this should cause no harm but is being investigated.
2015-04-17Crank the timeout and decrease the buffer size to not end up droppingmpi1-4/+6
all the entropy provided by the device. Also make sure we match the right endpoint. From Sean Levy based on comments from Andreas Gustafsson who's behind Alea.
2015-04-17oops, started expecting sockoptlevelname() to handle two argumentsguenther1-8/+14
but never actually did so. Fix that so that we stop losing the second argument to {get,set}sockopt(). Handling of levels other than SOL_SOCKET could be improved.
2015-04-17The first argument to socket/socketpair is an address family, not a protocolguenther2-7/+5
family. (sysctl(3) is practically the only place where PF_* is correct)
2015-04-17Tweaks utimensat/futimens handling to always update ctime, even when bothguenther13-87/+122
atime and mtime are UTIME_OMIT (at least for ufs, tmpfs, and ext2fs), and to correctly handle a timestamp of -1. ok millert@
2015-04-17don't call record_login() in monitor when UseLogin is enabled;djm1-1/+4
bz#278 reported by drk AT sgi.com; ok dtucker
2015-04-17Add some missing options to sshd -T and fix the output of VersionAddendumdtucker1-3/+8
HostCertificate. bz#2346, patch from jjelen at redhat com, ok djm.
2015-04-17Make drm ioctls table driven. Further reduces the diff to linux.jsg7-352/+369
ok kettenis@
2015-04-16Document "none" for PidFile XAuthLocation TrustedUserCAKeys and RevokedKeys.dtucker1-6/+14
bz#2382, feedback from jmc@, ok djm@
2015-04-16Restore the page headers and page footers that accidentally got lostschwarze1-7/+3
in rev. 1.225. Regression reported by florian@.
2015-04-16firmware, not firmwares;jmc2-6/+6
2015-04-16tweak previous;jmc1-3/+3
2015-04-16ipa_inp_next is unused; via mikeb@markus1-2/+1
2015-04-16remove unfinished/unused support for socket-attached ipsec-policiesmarkus11-799/+31
ok mikeb
2015-04-16change {import,export}_identity so it can be used for policies; ok mikebmarkus3-81/+23
(fixes sadb_ident_type conversion for policies)
2015-04-16shorten "outdated mandoc.db" warning message; requested by deraadt@schwarze1-5/+3
2015-04-16syncderaadt1-0/+1