VirtualBox

Changeset 30374 in vbox


Ignore:
Timestamp:
Jun 22, 2010 1:22:45 PM (14 years ago)
Author:
vboxsync
Message:

Solaris/vbi: fake vbi_is_preempt_enabled when vbi_init has not been called yet. Happens on debug builds because LogFlowFunc on _info in the support driver would ultimately end up r0 asserting on preempt enabled. This works around
that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/solaris/vbi/i86pc/os/vbi.c

    r30190 r30374  
    2020 */
    2121/*
    22  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     22 * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
    2323 * Use is subject to license terms.
    2424 */
     
    130130#endif
    131131
     132/* Introduced in v8 */
     133static int vbi_is_initialized = 0;
     134
    132135/* Introduced in v6 */
    133136static int vbi_is_nevada = 0;
     
    278281                return EINVAL;
    279282        }
     283
     284    vbi_is_initialized = 1;
    280285
    281286        return (0);
     
    12051210vbi_is_preempt_enabled(void)
    12061211{
    1207         char tpr = VBI_T_PREEMPT;
    1208         return (tpr == 0);
     1212        if (vbi_is_initialized) {
     1213                char tpr = VBI_T_PREEMPT;
     1214                return (tpr == 0);
     1215        } else {
     1216                cmn_err(CE_NOTE, "vbi_is_preempt_enabled: called without initializing vbi!\n");
     1217                return 1;
     1218        }
    12091219}
    12101220
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette