aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_mchain.c
Commit message (Collapse)AuthorAgeFilesLines
* sys: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* sys: Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* kern: clean up empty lines in .c and .h filesMateusz Guzik2020-09-011-1/+1
| | | | Notes: svn path=/head/; revision=365222
* sys: further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326023
* Renumber license clauses in sys/kern to avoid skipping #3Ed Maste2016-09-151-1/+1
| | | | Notes: svn path=/head/; revision=305832
* sys/kern: spelling fixes in comments.Pedro F. Giffuni2016-04-291-1/+1
| | | | | | | No functional change. Notes: svn path=/head/; revision=298819
* These files were getting sys/malloc.h and vm/uma.h with header pollutionGleb Smirnoff2016-02-011-0/+1
| | | | | | | via sys/mbuf.h Notes: svn path=/head/; revision=295126
* Mechanically substitute flags from historic mbuf allocator withGleb Smirnoff2012-12-051-5/+5
| | | | | | | | | | | | malloc(9) flags within sys. Exceptions: - sys/contrib not touched - sys/mbuf.h edited manually Notes: svn path=/head/; revision=243882
* - Use uint8_t for the variable x and spell the size of the variableKevin Lo2012-02-061-42/+42
| | | | | | | | | | | as sizeof(x) - Capitalized comment - Parentheses around return value Requested by: bde Notes: svn path=/head/; revision=231060
* Fix a style bugKevin Lo2012-01-161-1/+1
| | | | | | | Spotted by: avg Notes: svn path=/head/; revision=230218
* Add unicode support to msdosfs and smbfs; original pathes from imura,Kevin Lo2011-11-181-0/+15
| | | | | | | | | bug fixes by Kuan-Chung Chiu <buganini at gmail dot com>. Tested by me in production for several days at work. Notes: svn path=/head/; revision=227650
* Add some FEATURE macros for various features (AUDIT/CAM/IPC/KTR/MAC/NFS/NTP/Alexander Leidinger2011-02-251-0/+3
| | | | | | | | | | | | | | | | PMC/SYSV/...). No FreeBSD version bump, the userland application to query the features will be committed last and can serve as an indication of the availablility if needed. Sponsored by: Google Summer of Code 2010 Submitted by: kibab Reviewed by: arch@ (parts by rwatson, trasz, jhb) X-MFC after: to be determined in last commit with code from this project Notes: svn path=/head/; revision=219028
* Use ISO C99 integer types in sys/kern where possible.Ed Schouten2010-06-211-16/+17
| | | | | | | | | There are only about 100 occurences of the BSD-specific u_int*_t datatypes in sys/kern. The ISO C99 integer types are used here more often. Notes: svn path=/head/; revision=209390
* Replaced the misleading uses of a historical artefact M_TRYWAIT with M_WAIT.Ruslan Ermilov2008-03-251-17/+7
| | | | | | | | | | | | | Removed dead code that assumed that M_TRYWAIT can return NULL; it's not true since the advent of MBUMA. Reviewed by: arch There are ongoing disputes as to whether we want to switch to directly using UMA flags M_WAITOK/M_NOWAIT for mbuf(9) allocation. Notes: svn path=/head/; revision=177599
* Change API of mb_copy_t in libmchain so that netsmb can handleR. Imura2005-07-291-6/+10
| | | | | | | | | multibyte character share name correctly. Reviewed by: bp Notes: svn path=/head/; revision=148517
* /* -> /*- for copyright notices, minor format tweaks as necessaryWarner Losh2005-01-061-1/+1
| | | | Notes: svn path=/head/; revision=139804
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-051-3/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127911
* Use __FBSDID().David E. O'Brien2003-06-111-2/+3
| | | | Notes: svn path=/head/; revision=116182
* The "m = m->m_next" that was removed in the revision 1.12 was necessaryTim J. Robbins2003-02-191-1/+2
| | | | | | | | for the m->m_next != NULL case to avoid looping infinitely when the first mbuf in the chain becomes full. Notes: svn path=/head/; revision=111126
* Back out M_* changes, per decision of the TRB.Warner Losh2003-02-191-5/+5
| | | | | | | Approved by: trb Notes: svn path=/head/; revision=111119
* Make m_getm() always return the top of the newly allocated chain, asBosko Milekic2003-02-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | opposed to returning the top of the old chain when there was one and the top of the newly allocated chain if there was no old chain. Actually, it should be noted that prior to this fix, although the comment above m_getm() advertised that m_getm() would return the top of the old chain (if an old chain was being passed in) it actually [wrongly] was returning the tail mbuf in the old chain instead. This is a bug but since the one use of m_getm() in the tree luckily did not depend on the behavior, it happened to work out without notice. Harti Brandt pointed out that the advertised behavior was actually not the real behavior and so this change makes m_getm() ALWAYS return the newly allocated chain (and fixes the comment). This is less confusing and is the best course of action as then the caller is always able to have both a reference to the top of the original chain (because it's passing it in in the call) and a reference to the newly attached chain. Although the API is slightly modified, I don't think that any third-party code uses m_getm() and if it does, it surely can't be working properly because the old behavior was bogus. API bug pointed out by: Harti Brandt <brandt@fokus.fraunhofer.de> Notes: svn path=/head/; revision=110880
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.Alfred Perlstein2003-01-211-5/+5
| | | | | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT. Notes: svn path=/head/; revision=109623
* Remove the hto(be|le)[slq] and (be|le)toh[slq] macros defined inRobert Drehmel2002-12-161-13/+12
| | | | | | | | | | | | | | _KERNEL scope from "src/sys/sys/mchain.h". Replace each occurrence of the above in _KERNEL scope with the appropriate macro from the set of hto(be|le)(16|32|64) and (be|le)toh(16|32|64) from "src/sys/sys/endian.h". Tested by: tjr Requested by: comment marked with XXX Notes: svn path=/head/; revision=107940
* Don't dereference the 'x' pointer if it is NULL, instead skip theJohn Baldwin2002-10-221-6/+12
| | | | | | | | | | assignment. The netsmb code likes to call these functions with a NULL x argument a lot. Reported by: Vallo Kallaste <kalts@estpak.ee> Notes: svn path=/head/; revision=105735
* Change iov_base's type from `char *' to the standard `void *'. AllMike Barcroft2002-10-111-2/+4
| | | | | | | | uses of iov_base which assume its type is `char *' (in order to do pointer arithmetic) have been updated to cast iov_base to `char *'. Notes: svn path=/head/; revision=104908
* Move m_fixhdr() from "mbchain" to "mbuf" where it belongs.Poul-Henning Kamp2002-09-181-14/+0
| | | | Notes: svn path=/head/; revision=103540
* Convert GNU-styled variadic macros to ISO(9x) style.Mark Murray2002-07-151-4/+4
| | | | Notes: svn path=/head/; revision=100075
* Move the new byte order function prototypes from <sys/param.h> toMike Barcroft2002-04-261-0/+1
| | | | | | | <sys/endian.h>. This puts us in line with NetBSD and OpenBSD. Notes: svn path=/head/; revision=95533
* Add support for iovcnt greater than 1. This should resolve problemsBoris Popov2002-02-211-14/+16
| | | | | | | | | | with some applications. Obtained from: Darwin project MFC after: 2 weeks Notes: svn path=/head/; revision=91024
* Update to C99, s/__FUNCTION__/__func__/.David E. O'Brien2001-12-101-2/+2
| | | | Notes: svn path=/head/; revision=87594
* Remove superfluous m_pkthdr.rcv_if = NULL assignment followingBosko Milekic2001-02-251-2/+0
| | | | | | | m_gethdr() mbuf allocation, which already does this for us. Notes: svn path=/head/; revision=73012
* Introduce API for sequential reads/writes (build/dissect) of mbuf chains.Boris Popov2001-02-241-0/+549
Reviewed by: Ian Dowse <iedowse@maths.tcd.ie>, Bosko Milekic <bmilekic@technokratis.com>, Julian Elischer <julian@elischer.org> and arch@/net@ Obtained from: smbfs Notes: svn path=/head/; revision=72980