Calling semantics for kmem_malloc() have been changed...and the third

argument is now more than just a single flag. (kern_malloc.c)
Used new M_KERNEL value for socket allocations that previous were
"M_NOWAIT". Note that this will change when we clean up the M_ namespace
mess.

Submitted by:	John Dyson
This commit is contained in:
dg 1995-02-02 08:49:08 +00:00
parent 2277627c92
commit f58a2f6357
2 changed files with 4 additions and 5 deletions

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_malloc.c 8.3 (Berkeley) 1/4/94
* $Id: kern_malloc.c,v 1.6 1994/12/17 04:04:42 davidg Exp $
* $Id: kern_malloc.c,v 1.7 1995/01/09 16:04:50 davidg Exp $
*/
#include <sys/param.h>
@ -135,8 +135,7 @@ malloc(size, type, flags)
else
allocsize = 1 << indx;
npg = clrnd(btoc(allocsize));
va = (caddr_t) kmem_malloc(kmem_map, (vm_size_t)ctob(npg),
!(flags & M_NOWAIT));
va = (caddr_t) kmem_malloc(kmem_map, (vm_size_t)ctob(npg), flags);
if (va == NULL) {
splx(s);
return ((void *) NULL);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_socket.c 8.3 (Berkeley) 4/15/94
* $Id: uipc_socket.c,v 1.4 1994/08/02 07:43:06 davidg Exp $
* $Id: uipc_socket.c,v 1.5 1994/10/02 17:35:32 phk Exp $
*/
#include <sys/param.h>
@ -298,7 +298,7 @@ bad:
return (error);
}
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_NOWAIT : M_WAITOK)
#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? M_KERNEL : M_WAITOK)
/*
* Send on a socket.
* If send must go all at once and message is larger than