Changeset 9558 in vbox for trunk/src/VBox
- Timestamp:
- Jun 9, 2008 6:20:00 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/solaris/SUPDrv-solaris.c
r9476 r9558 51 51 #include <iprt/semaphore.h> 52 52 #include <iprt/spinlock.h> 53 #include <iprt/mp.h> 53 54 #include <iprt/process.h> 54 55 #include <iprt/thread.h> … … 107 108 ddi_prop_op, /* property ops */ 108 109 NULL, /* streamtab */ 109 D_NEW | D_MP, 110 D_NEW | D_MP, /* compat. flag */ 110 111 CB_REV /* revision */ 111 112 }; … … 262 263 if (RT_SUCCESS(rc)) 263 264 { 264 /* 265 * Initialize the device extension 266 */ 267 rc = supdrvInitDevExt(&g_DevExt); 268 if (RT_SUCCESS(rc)) 265 rc = RTR0MpNotificationInit(NULL); 266 if (RT_SUCCESS(rc)) 269 267 { 270 268 /* 271 * Initialize the session hash table.269 * Initialize the device extension 272 270 */ 273 memset(g_apSessionHashTab, 0, sizeof(g_apSessionHashTab)); 274 rc = RTSpinlockCreate(&g_Spinlock); 271 rc = supdrvInitDevExt(&g_DevExt); 275 272 if (RT_SUCCESS(rc)) 276 273 { 277 274 /* 278 * Register ourselves as a character device, pseudo-driver275 * Initialize the session hash table. 279 276 */ 280 if (ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, 0) == DDI_SUCCESS) 277 memset(g_apSessionHashTab, 0, sizeof(g_apSessionHashTab)); 278 rc = RTSpinlockCreate(&g_Spinlock); 279 if (RT_SUCCESS(rc)) 281 280 { 281 /* 282 * Register ourselves as a character device, pseudo-driver 283 */ 284 if (ddi_create_minor_node(pDip, DEVICE_NAME, S_IFCHR, instance, DDI_PSEUDO, 0) == DDI_SUCCESS) 285 { 282 286 #ifdef USE_SESSION_HASH 283 pState->pDip = pDip; 284 #endif 285 ddi_report_dev(pDip); 286 return DDI_SUCCESS; 287 pState->pDip = pDip; 288 #endif 289 ddi_report_dev(pDip); 290 return DDI_SUCCESS; 291 } 292 293 /* Is this really necessary? */ 294 ddi_remove_minor_node(pDip, NULL); 295 cmn_err(CE_NOTE,"VBoxDrvSolarisAttach: ddi_create_minor_node failed."); 296 297 RTSpinlockDestroy(g_Spinlock); 298 g_Spinlock = NIL_RTSPINLOCK; 287 299 } 288 289 /* Is this really necessary? */ 290 ddi_remove_minor_node(pDip, NULL); 291 cmn_err(CE_NOTE,"VBoxDrvSolarisAttach: ddi_create_minor_node failed."); 292 293 RTSpinlockDestroy(g_Spinlock); 294 g_Spinlock = NIL_RTSPINLOCK; 300 else 301 cmn_err(CE_NOTE, "VBoxDrvSolarisAttach: RTSpinlockCreate failed"); 302 supdrvDeleteDevExt(&g_DevExt); 295 303 } 296 304 else 297 cmn_err(CE_NOTE, "VBoxDrvSolarisAttach: RTSpinlockCreatefailed");298 supdrvDeleteDevExt(&g_DevExt);305 cmn_err(CE_NOTE, "VBoxDrvSolarisAttach: supdrvInitDevExt failed"); 306 RTR0MpNotificationTerm(NULL); 299 307 } 300 else 301 cmn_err(CE_NOTE, "VBoxDrvSolarisAttach: supdrvInitDevExt failed");302 RTR0Term 308 else 309 cmn_err(CE_NOTE, "VBoxDrvSolarisAttach: RTR0MpNotifcationInit failed"); 310 RTR0Term(); 303 311 } 304 312 else … … 359 367 g_Spinlock = NIL_RTSPINLOCK; 360 368 369 RTR0MpNotificationTerm(NULL); 361 370 RTR0Term(); 362 371
Note:
See TracChangeset
for help on using the changeset viewer.