| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocation, as required.
If m_getm() receives NULL as a first argument, then it allocates `len'
(second argument) bytes worth of mbufs + clusters and returns the chain
only if it was able to allocate everything.
If the first argument is non-NULL, then it should be an existing mbuf
chain (e.g. pre-allocated mbuf sitting on a ring, on some list, etc.) and
so it will allocate `len' bytes worth of clusters and mbufs, as needed,
and append them to the tail of the passed in chain, only if it was able
to allocate everything requested.
If allocation fails, only what was allocated by the routine will be freed,
and NULL will be returned.
Also, get rid of existing m_getm() in netncp code and replace calls to it
to calls to this new generic code.
Heavily Reviewed by: bp
|
|
|
|
|
|
|
| |
fondling implementation details.
Created with: sed(1)
Reviewed by: md5(1)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is because calls with M_WAIT (now M_TRYWAIT) may not wait
forever when nothing is available for allocation, and may end up
returning NULL. Hopefully we now communicate more of the right thing
to developers and make it very clear that it's necessary to check whether
calls with M_(TRY)WAIT also resulted in a failed allocation.
M_TRYWAIT basically means "try harder, block if necessary, but don't
necessarily wait forever." The time spent blocking is tunable with
the kern.ipc.mbuf_wait sysctl.
M_WAIT is now deprecated but still defined for the next little while.
* Fix a typo in a comment in mbuf.h
* Fix some code that was actually passing the mbuf subsystem's M_WAIT to
malloc(). Made it pass M_WAITOK instead. If we were ever to redefine the
value of the M_WAIT flag, this could have became a big problem.
|
|
|
|
|
|
|
|
| |
Don't check for a null pointer if malloc called with M_WAITOK.
Submitted by: josh@zipperup.org
Submitted by: Robert Drehmel <robd@gmx.net>
Approved by: bp
|
| |
|
|
|
|
|
|
| |
Add lockdestroy() and appropriate invocations, which corresponds to
lockinit() and must be called to clean up after a lockmgr lock is no
longer needed.
|
|
|
|
| |
with it well.
|
|
|
|
| |
Pointed out by: bde
|
|
|
|
|
|
|
|
| |
Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:
-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysctl_vm_zone (SYSCTL_HANDLER_ARGS)
|
|
|
|
|
|
| |
It was not discussed and should probably not happen.
Requested by: msmith and others
|
|
|
|
|
|
|
|
| |
the type argument to *_HEAD and *_ENTRY is a struct.
Suggested by: phk
Reviewed by: phk
Approved by: mdodd
|
| |
|
|
|
|
| |
Reported by: Vladimir Poliakov <vnp@mail.kccm.ru>
|
|
|
|
| |
Submitted by: Dan Nelson <dnelson@emsphone.com>
|
| |
|
|
|
|
|
|
| |
is an application space macro and the applications are supposed to be free
to use it as they please (but cannot). This is consistant with the other
BSD's who made this change quite some time ago. More commits to come.
|
| |
|
|
|
|
| |
with the macro of the same name. Same thing for 'tolower'.
|
| |
|
|
|
|
| |
Pointed by: bde
|
| |
|
|
|
|
| |
Reviewed by: jdp, mdodd
|
| |
|
|
|
|
|
|
|
|
|
|
| |
kernel, but gcc provides a pessimal builtin for it.
Makefile.i386:
Added a variable (CONF_CFLAGS) for configuration-specific compiler flags.
LINT:
Use CONF_CFLAGS to inhibit use of gcc builtins.
|
|
Reviewed by: msmith, peter
Obtained from: ncplib
|