summaryrefslogtreecommitdiffstats
path: root/lib/libbluetooth
Commit message (Collapse)AuthorAgeFilesLines
* MFC r312452-r312512:ngie2017-02-101-1/+1
| | | | | | | | | | r312452-r312512: - Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones This simplifies pathing in make/displayed output - Use .CURDIR:H instead of .CURDIR to simplify pathing in output, etc
* Improve performance and functionality of the bitstring(3) apiasomers2016-05-041-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow for efficient searching of set or cleared bits starting from any bit offset within the bit string. Performance is improved by operating on longs instead of bytes and using ffsl() for searches within a long. ffsl() is a compiler builtin in both clang and gcc for most architectures, converting what was a brute force while loop search into a couple of instructions. All of the bitstring(3) API continues to be contained in the header file. Some of the functions are large enough that perhaps they should be uninlined and moved to a library, but that is beyond the scope of this commit. sys/sys/bitstring.h: Convert the majority of the existing bit string implementation from macros to inline functions. Properly protect the implementation from inadvertant macro expansion when included in a user's program by prefixing all private macros/functions and local variables with '_'. Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and bit_ffc() in terms of their "at" counterparts. Provide a kernel implementation of bit_alloc(), making the full API usable in the kernel. Improve code documenation. share/man/man3/bitstring.3: Add pre-exisiting API bit_ffc() to the synopsis. Document new APIs. Document the initialization state of the bit strings allocated/declared by bit_alloc() and bit_decl(). Correct documentation for bitstr_size(). The original code comments indicate the size is in bytes, not "elements of bitstr_t". The new implementation follows this lead. Only hastd assumed "elements" rather than bytes and it has been corrected. etc/mtree/BSD.tests.dist: tests/sys/Makefile: tests/sys/sys/Makefile: tests/sys/sys/bitstring.c: Add tests for all existing and new functionality. include/bitstring.h Include all headers needed by sys/bitstring.h lib/libbluetooth/bluetooth.h: usr.sbin/bluetooth/hccontrol/le.c: Include bitstring.h instead of sys/bitstring.h. sbin/hastd/activemap.c: Correct usage of bitstr_size(). sys/dev/xen/blkback/blkback.c Use new bit_alloc. sys/kern/subr_unit.c: Remove hard-coded assumption that sizeof(bitstr_t) is 1. Get rid of unrb.busy, which caches the number of bits set in unrb.map. When INVARIANTS are disabled, nothing needs to know that information. callapse_unr can be adapted to use bit_ffs and bit_ffc instead. Eliminating unrb.busy saves memory, simplifies the code, and provides a slight speedup when INVARIANTS are disabled. sys/net/flowtable.c: Use the new kernel implementation of bit-alloc, instead of hacking the old libc-dependent macro. sys/sys/param.h Update __FreeBSD_version to indicate availability of new API Submitted by: gibbs, asomers Reviewed by: gibbs, ngie MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6004
* libbluetooth: use NULL instead of zero for pointers.pfg2016-04-181-2/+2
|
* First pass through library packaging.gjb2016-02-041-0/+1
| | | | Sponsored by: The FreeBSD Foundation
* Declare bt_devenum() to match the definition.brooks2016-01-291-1/+1
| | | | | | Obtained from: CheriBSD (1c1dad87ef9983a4ca0c7d6eb0792d489436bcd1) MFC after: 1 week Sponsored by: DARPA, AFRL
* META MODE: Prefer INSTALL=tools/install.sh to lessen the need for xinstall.host.bdrewery2015-11-251-1/+0
| | | | | | | | This both avoids some dependencies on xinstall.host and allows bootstrapping on older releases to work due to lack of at least 'install -l' support. Sponsored by: EMC / Isilon Storage Division
* Add META_MODE support.sjg2015-06-131-0/+19
|\ | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
| * dirdeps.mk now sets DEP_RELDIRsjg2015-06-081-2/+0
| |
| * Merge sync of headsjg2015-05-273-1/+3
| |\ | |/ |/|
| * Merge head from 7/28sjg2014-08-191-1/+1
| |\
| * | Updated dependenciessjg2014-05-161-1/+1
| | |
| * | Updated dependenciessjg2014-05-101-0/+2
| | |
| * | Updated dependenciessjg2013-03-111-0/+1
| | |
| * | Updated dependenciessjg2013-02-161-2/+0
| | |
| * | Updated/new Makefile.dependsjg2012-11-081-0/+3
| | |
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.marcel2012-08-221-0/+16
| | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net>
* | | Check l2cap socket initialisation and define L2CAP_SOCKET_CHECKEDtakawata2015-04-073-1/+3
| |/ |/| | | | | This will fix build.
* | use .Mt to mark up email addresses consistently (part3)bapt2014-06-231-1/+1
|/ | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de>
* General mdoc(7) and typo fixes.gjb2012-05-111-1/+2
| | | | | | PR: 167734 Submitted by: Nobuyuki Koganemaru (kogane!jp.freebsd.org) MFC after: 3 days
* Remove trailing whitespace per mdoc lint warningeadler2012-03-291-2/+2
| | | | | | | Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days
* Add the following Linux BlueZ compatibility macros: htobs(), htobl(),emax2010-09-221-0/+4
| | | | | | | | btohs() and btohl() PR: kern/136386 Submitted by: Monty Hall < kungfu_disciple at sbcglobal dot net > MFC after: 1 week
* Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki whilejoel2010-08-161-1/+1
| | | | | | translating these manual pages. Minor corrections by me. Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>
* Spelling fixes.joel2010-08-031-2/+2
|
* Fix typo in bluetooth.3emax2009-10-262-3/+3
| | | | | | Do not use reserved C++ keyword "new" MFC after: 1 month
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-191-1/+1
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* Avoid floating point arithmetic while calculating iquiry length.emax2009-05-141-11/+14
| | | | | Submitted by: Iain Hibbert < plunky -at- rya-online -dot- net > MFC after: 1 week
* Implement low-level Bluetooth HCI API.emax2009-04-224-19/+836
| | | | | | | | | This should make it easier to make Linux BlueZ libhci port. Reviewed by: Iain Hibbert < plunky -at- rya-online -dot- net > of NetBSD MFC after: 1 week Inspired by: Linux BlueZ Inspired by: NetBSD
* Add Bluetooth compatibility shims. Inspired by Linux BlueZ and NetBSD.emax2009-03-066-8/+548
| | | | | Discussed with: Iain Hibbert plunky -at- rya-online -dot- net of NetBSD MFC after: 1 month
* Import handy shorthand Bluetooth address (BD_ADDR) utility functionsemax2008-08-133-2/+67
| | | | | | | from NetBSD and document them. Obtained from: NetBSD MFC after: 1 week
* Bump library versions in preparation for 7.0.deischen2007-05-211-1/+1
| | | | Ok'd by: kan
* Bump the shared library version number of all libraries that have notkensmith2005-07-221-1/+1
| | | | | | | been bumped since RELENG_5. Reviewed by: ru Approved by: re (not needed for commit check but in principle...)
* Fix typo in comments (spell Linux correctly)emax2005-03-171-1/+1
| | | | | Submitted by: Markus Brueffer < markus at brueffer dot de > MFC after: 3 days
* Fixed xref.ru2005-01-211-1/+1
|
* Sort sections.ru2005-01-201-2/+2
|
* Revert last delta. The ASCII code 0 character is "NUL",ru2005-01-131-2/+2
| | | | not "NULL", see ascii(7).
* Fix typo: NUL -> NULLemax2005-01-041-2/+2
| | | | | Submitted by: Markus Brueffer < markus AT brueffer DOT de > MFC after: 3 days
* Unbreak a whatis(1) entry by fixing the NAME section.ru2004-07-051-14/+10
| | | | Minor markup and grammar nits.
* Mechanically kill hard sentence breaks.ru2004-07-021-1/+1
|
* Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)markm2004-03-051-1/+1
| | | | | | | | | | | | | | | that this provokes. "Wherever possible" means "In the kernel OR NOT C++" (implying C). There are places where (void *) pointers are not valid, such as for function pointers, but in the special case of (void *)0, agreement settles on it being OK. Most of the fixes were NULL where an integer zero was needed; many of the fixes were NULL where ascii <nul> ('\0') was needed, and a few were just "other". Tested on: i386 sparc64
* Update Bluetooth code.emax2003-10-124-0/+770
Reviewed by: M. Warner Losh <imp@bsdimp.com>; John Hay <jhay@freebsd.org> Approved by: M. Warner Losh <imp@bsdimp.com> (mentor)
OpenPOWER on IntegriCloud