summaryrefslogtreecommitdiffstats
path: root/lib/libsqlite3/src/mutex_unix.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-01-27Properly initialize sin_family.jca3-3/+6
2016-01-27make the debug messages a bit more useful heredjm1-11/+16
2016-01-27Nope. Missed a couple of '{}' that could go.krw1-8/+5
2016-01-27Nuke another (and I hope final) batch of superfluous '{}' around singlekrw3-38/+24
statements.
2016-01-26Rework and simplify string argument parsing. All string arguments are atkrw3-95/+78
most DPISTRLEN (32) characters so there is no need for fancy dynamic growing strings. Use a DPISTRLEN long buffer and bail if it fills up. Rename get_string() to get_dpistr() and get_string_argument() to get_dpstr_argument() to emphasize they will return strings that fit in DPISTRLEN. Rework & simplify a pair of their consumers - do_rename_partition() and do_change_type() - to be more obviously identitical to each other bar the displayed verbiage.
2016-01-26spacingrpe1-2/+2
OK krw@
2016-01-26- state keys imported by if_pfsync trip refcnt != ~0 Assertsashan1-1/+3
OK mpi@
2016-01-26dpme_name and dpme_type are NUL-terminated in Apple code, so usekrw4-15/+26
strlcpy() to fill them. They are also supposed to be NUL-padded so zap previous contents before copying in possibly shorter new values.
2016-01-26Remove needless zeroing. Anonymously mapped memory is always zeroed.mmcc1-2/+1
ok tb@
2016-01-26typosmmcc2-4/+4
2016-01-26Use an unsigned int rather than an int when iterating through all 32mmcc4-9/+9
bits in the form: for (i = 1; i; i <<= 1) This avoids undefined operations when shifting into and out of the highest-order bit. ok millert@
2016-01-26ensure the backup file has the same mtime as the original file, this is in linejasper1-1/+8
with emacs' behaviour. from Harald Dunkel via Han Boetes ok lum@
2016-01-26remove a useless macrommcc2-10/+5
ok nicm@
2016-01-26Convert membar_* operations to bus_dmamap_sync callsmikeb1-11/+33
2016-01-26Whitespace, line wrapping fixes. Nuke many superfluous '{}' around singlekrw5-138/+94
statements. 0 -> NULL for pointer checks.
2016-01-26Rewrite tx path to use flat transmit ring without fragment chainsmikeb1-37/+72
Xen doesn't provide transmit fragment chains so initially they were emulated but amount of grant table entries wasted in the process was astronomical (9 times more than after this change). So while code readability was sacrificed a bit, the change comes with a very nice transmit performance improvement and taxes grant table references much less than before.
2016-01-26Rename _{req,rsp}_evt descriptor structure members to _{prod,cons}_eventmikeb1-11/+11
Setting rxr_ and/or txr_cons_event value allows domU to delay completion notification for receive and/or transmit ring to specified values of consumer index. rxr_ and txr_prod_event values are updated by dom0 and don't seem to hold any significance for us.
2016-01-26Whitespace, line wrapping fixes.krw4-31/+31
2016-01-26No need to take a grant table entry mutex in xen_grant_table_{enter,remove}mikeb1-6/+3
Grant table API is constructed in a way that once allocated grant table entries are marked as used and cannot be given away again to some other user. At the same time xen_grant_table_enter and _remove do not operate on the same grant reference at the same time, so there's no need for a lock here. Guard flag operations with memory fences to ensure correct store/load order. This provides some decent performance improvement as well.
2016-01-26Don't crash dumping malloc stats if malloc_init hasn't been called, noted byotto1-1/+3
David CARLIER
2016-01-26Add a grant table reference invalidation spin out checkmikeb1-2/+12
This debugging check has been helpful in identifying and fixing a few issues already. Subject to removal in the future however.
2016-01-26Implement a rather conservative bus_dmamap_sync APImikeb1-2/+13
2016-01-26Make sure to use locked atomic operations even on the SP kernelmikeb1-4/+13
When executed under the hypervisor we need to make sure that CAS and other atomic operations are executed while locking the bus. Problem reported by Imre Oolberg <imre at auul ! pri ! ee>, thanks!
2016-01-26When encoding fails in fputwc(3), set the error indicator as requiredschwarze1-2/+2
by POSIX and as FreeBSD, SunOS 10/11, and glibc also do it. Note that an enquiry to the Austin Group led to the conclusion that this change probably violates the C standard: C and POSIX unintentionally conflict. But the POSIX behaviour makes more sense (easier to write correct error handling code for it, and a lower risk that programs miss errors) and is much more widespread, and the Austin Group intends to approach the C committee in order to adjust the C standard. See: http://austingroupbugs.net/view.php?id=1022 While here, do not set errno a second time, wcrtomb(3) already did that, and it is required to do it by the standard. OK millert@ and tedu@, and jca@ no longer objects
2016-01-26Improve the previous fix: call vmxnet3_load_mbuf, bpf_mtap, and flipreyk1-8/+11
the generation bit to pass the tx descriptor and mbuf to the "hardware". This way bpf is not called if vmxnet3_load_mbuf dropped the mbuf. Tested by me OK mikeb@
2016-01-26lseek() + write() can be replaced by a slightly shorter ftruncate()reyk1-15/+5
call. Note that using ftruncate() to extend a file is not portable (POSIX allows either zero-filling until the given size is reached, or alternatively erroring out), but that shouldn't be a proble as vmm(4) isn't cross-platform either. unlink() the image file when extending it fails for consistency with the other error case (the file can't be created). From Martin Natano OK mlarkin@
2016-01-26The division "res->size /= 1024 / 1024" is a no-op: 1024 / 1024 isreyk1-4/+1
evaluated first, resulting in res->size /= 1. Remove the division and the following check, as it can never fail; it is a left-over from previous code that didn't check the size in the caller. From Martin Natano OK mlarkin@
2016-01-26Simplify logic of read_partition_map(), junking retries with various sizeskrw1-56/+27
of logical block. Rely on read_dpme() to do the correct thing.
2016-01-26prettify a NULL test in vr_start.dlg1-2/+2
from richard proctor on bugs@
2016-01-26dont leak mbufs on encap failure.dlg1-1/+2
diff from richard proctor on bugs@
2016-01-26Remove a fancy macro that calculates the necessary buffer size formmcc4-13/+6
int-to-str conversions and just use constants instead. The only binary change is caused by using an unnecessarily large buffer for an int. This is a consequence of simplifying some code that will be gone soon. ok nicm@
2016-01-25Two more for the attic.krw2-183/+0
2016-01-25localize _clistrpe1-3/+2
feedback and OK halex@ OK krw@
2016-01-25Use new read/write_block0 and read/write_dpme which handle anykrw8-93/+53
endian or alignment issues forcefully. Removes need for convert_* functions so unhook convert.c from build. read/write_block become static functions inside file_media.c. Tweak struct block0 to stop trying to handle alignment issues by clever declaration. Rely on the new functions to accurately translate between on-disk and in-memory layouts. Enables pdisk to work on amd64 and likely other architectures if it's ever desirable. Does bring back DEV_BSIZE to pdisk.c since the in-memory structure will *not* be 512 bytes on other archs.
2016-01-25Add read/write_block0 and read/write_dpme functions, not yet used.krw2-2/+308
2016-01-25fix exit status on pledge(2) failure.gsoares1-2/+2
2016-01-25Tweak fields in struct dpme to be more consistent with Apple's info.krw4-62/+43
Better comments, make all reserved fields uint8_t arrays, don't claim uint32_t fields are actually pointers.
2016-01-25Fix a crash as found by sthen@martijn1-3/+13
tested and OK sthen@ OK with minor tweak schwarze@
2016-01-25remove pointless log message; As a bonus avoid trigraph '??'gsoares1-2/+1
suggested by & OK claudio@ OK daniel@
2016-01-25(hidden) is more readable than (??????) and avoid trigraphgsoares1-2/+2
suggested by & OK claudio@ OK daniel@ jsg@ initial review millert@ and tb@ thanks.
2016-01-25Remove unused headermestre1-2/+1
2016-01-25- plugging massive pf_state_key leaksashan2-11/+22
OK mpi@ dlg@ sthen@
2016-01-25Convert to uiomove(). Diff from Martin Natano.stefan1-4/+5
2016-01-25Don't count the total number of Xen upcallsmikeb3-8/+5
2016-01-25Honour ERP protection on 2 GHz channels in 11n mode, as done for 11g.stsp2-5/+11
ok millert@
2016-01-25Don't try to interpret htprot data if the last beacon didn't contain such data.stsp3-9/+11
ok mpi@ millert@
2016-01-25Do not mix variable declaration and logic.mpi1-4/+3
2016-01-25Kill "#if 0" version of ddb_init().mpi1-34/+1
2016-01-25Kill trailing whitespaces. No object change.mpi22-167/+167
2016-01-25Add short comments explaining HT protection modes.stsp1-5/+5