Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/cddl/osnet/dist/uts/common/dtrace catch up with vme...



details:   https://anonhg.NetBSD.org/src/rev/baec7e1d9f49
branches:  trunk
changeset: 769381:baec7e1d9f49
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Sep 07 21:32:07 2011 +0000

description:
catch up with vmem_alloc signature change.

diffstat:

 external/cddl/osnet/dist/uts/common/dtrace/dtrace.c |  14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diffs (45 lines):

diff -r 310effff9555 -r baec7e1d9f49 external/cddl/osnet/dist/uts/common/dtrace/dtrace.c
--- a/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c       Wed Sep 07 20:34:58 2011 +0000
+++ b/external/cddl/osnet/dist/uts/common/dtrace/dtrace.c       Wed Sep 07 21:32:07 2011 +0000
@@ -7801,6 +7801,7 @@
        dtrace_probe_t *probe, **probes;
        dtrace_provider_t *provider = (dtrace_provider_t *)prov;
        dtrace_id_t id;
+       vmem_addr_t offset;
 
        if (provider == dtrace_provider) {
                ASSERT(MUTEX_HELD(&dtrace_lock));
@@ -7808,8 +7809,9 @@
                mutex_enter(&dtrace_lock);
        }
 
-       id = (dtrace_id_t)(uintptr_t)vmem_alloc(dtrace_arena, 1,
-           VM_BESTFIT | VM_SLEEP);
+       if (vmem_alloc(dtrace_arena, 1, VM_BESTFIT | VM_SLEEP, &offset) != 0)
+               ASSERT(0);
+       id = (dtrace_id_t)(uintptr_t)offset;
        probe = kmem_zalloc(sizeof (dtrace_probe_t), KM_SLEEP);
 
        probe->dtpr_id = id;
@@ -9930,6 +9932,7 @@
        dtrace_recdesc_t *frec;
        dtrace_aggid_t aggid;
        dtrace_state_t *state = ecb->dte_state;
+       vmem_addr_t offset;
 
        agg = kmem_zalloc(sizeof (dtrace_aggregation_t), KM_SLEEP);
        agg->dtag_ecb = ecb;
@@ -10036,8 +10039,11 @@
        /*
         * We need to allocate an id for this aggregation.
         */
-       aggid = (dtrace_aggid_t)(uintptr_t)vmem_alloc(state->dts_aggid_arena, 1,
-           VM_BESTFIT | VM_SLEEP);
+       if (vmem_alloc(state->dts_aggid_arena, 1, VM_BESTFIT | VM_SLEEP,
+           &offset) != 0)
+               ASSERT(0);
+       aggid = (dtrace_aggid_t)(uintptr_t)offset;
+
 
        if (aggid - 1 >= state->dts_naggregations) {
                dtrace_aggregation_t **oaggs = state->dts_aggregations;



Home | Main Index | Thread Index | Old Index