Tue Dec 31 14:51:29 2019 UTC ()
Another rename from uvm_free() --> uvm_availmem()


(pgoyette)
diff -r1.6 -r1.7 src/external/cddl/osnet/sys/kern/misc.c

cvs diff -r1.6 -r1.7 src/external/cddl/osnet/sys/kern/misc.c (expand / switch to unified diff)

--- src/external/cddl/osnet/sys/kern/misc.c 2019/12/21 13:00:20 1.6
+++ src/external/cddl/osnet/sys/kern/misc.c 2019/12/31 14:51:29 1.7
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: misc.c,v 1.6 2019/12/21 13:00:20 ad Exp $ */ 1/* $NetBSD: misc.c,v 1.7 2019/12/31 14:51:29 pgoyette Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2009 The NetBSD Foundation, Inc. 4 * Copyright (c) 2009 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Doran. 8 * by Andrew Doran.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -120,27 +120,27 @@ thread_exit(void) @@ -120,27 +120,27 @@ thread_exit(void)
120void 120void
121thread_join(uint64_t kid) 121thread_join(uint64_t kid)
122{ 122{
123 123
124 return; 124 return;
125} 125}
126 126
127void 127void
128kmem_reap(void) 128kmem_reap(void)
129{ 129{
130 int bufcnt; 130 int bufcnt;
131 struct pool *pp; 131 struct pool *pp;
132  132
133 bufcnt = uvmexp.freetarg - uvm_free(); 133 bufcnt = uvmexp.freetarg - uvm_availmem();
134 if (bufcnt < 0) 134 if (bufcnt < 0)
135 bufcnt = 0; 135 bufcnt = 0;
136 136
137 /* 137 /*
138 * kill unused metadata buffers. 138 * kill unused metadata buffers.
139 */ 139 */
140 mutex_enter(&bufcache_lock); 140 mutex_enter(&bufcache_lock);
141 buf_drain(bufcnt << PAGE_SHIFT); 141 buf_drain(bufcnt << PAGE_SHIFT);
142 mutex_exit(&bufcache_lock); 142 mutex_exit(&bufcache_lock);
143 143
144 /* 144 /*
145 * drain the pools. 145 * drain the pools.
146 */ 146 */