Changeset 54362 in vbox for trunk/src/VBox/Runtime/r0drv/solaris
- Timestamp:
- Feb 23, 2015 1:33:02 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98451
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/solaris/thread2-r0drv-solaris.c
r54361 r54362 88 88 DECLHIDDEN(void) rtThreadNativeWaitKludge(PRTTHREADINT pThread) 89 89 { 90 kthread_t *pNativeThread = (kthread_t *)pThread->Core.Key; 91 //thread_join(pNativeThread); 90 thread_join(pThread->tid); 92 91 } 93 92 … … 108 107 PRTTHREADINT pThreadInt = (PRTTHREADINT)pvThreadInt; 109 108 109 /* thread_join takes the t_did value. There seems to be no interface for 110 retrieving t_did, so we have to gamble on the Solaris guys not messing 111 up its position in the _kthread struct. We access t_intr which is 112 16 bytes earlier in the struct from semeventwait-r0drv-solaris.h, so 113 maybe we're lucky. Maybe, but experience indicates that the odds 114 are against us... */ 115 pThreadInt->tid = curthread->t_did; 116 110 117 rtThreadMain(pThreadInt, RTThreadNativeSelf(), &pThreadInt->szName[0]); 111 118 thread_exit(); … … 115 122 DECLHIDDEN(int) rtThreadNativeCreate(PRTTHREADINT pThreadInt, PRTNATIVETHREAD pNativeThread) 116 123 { 124 kthread_t *pThread; 117 125 RT_ASSERT_PREEMPTIBLE(); 118 kthread_t *pThread = thread_create(NULL, /* Stack, use base */ 119 0, /* Stack size */ 120 rtThreadNativeMain, /* Thread function */ 121 pThreadInt, /* Function data */ 122 0, /* Data size */ 123 (proc_t *)RTR0ProcHandleSelf(), /* Process handle */ 124 TS_RUN, /* Ready to run */ 125 minclsyspri /* Priority */ 126 ); 126 127 pThreadInt->tid = UINT64_MAX; 128 129 pThread = thread_create(NULL, /* Stack, use base */ 130 0, /* Stack size */ 131 rtThreadNativeMain, /* Thread function */ 132 pThreadInt, /* Function data */ 133 0, /* Data size */ 134 (proc_t *)RTR0ProcHandleSelf(), /* Process handle */ 135 TS_RUN, /* Ready to run */ 136 minclsyspri /* Priority */ 137 ); 127 138 if (RT_LIKELY(pThread)) 128 139 {
Note:
See TracChangeset
for help on using the changeset viewer.