儲存庫 vbox 的更動 40304
- 時間撮記:
- 2012-2-29 下午08:02:14 (13 年 以前)
- 位置:
- trunk/src/VBox/Runtime
- 檔案:
-
- 新增 1 筆資料
- 修改 10 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/Makefile.kmk
r40052 r40304 617 617 r3/posix/RTPathUserHome-posix.cpp \ 618 618 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 619 619 r3/posix/RTSystemQueryTotalRam-posix.cpp \ 620 620 r3/posix/RTTimeNow-posix.cpp \ 621 621 r3/posix/RTTimeSet-posix.cpp \ … … 715 715 r3/posix/RTTimeNow-posix.cpp \ 716 716 r3/posix/RTTimeSet-posix.cpp \ 717 r3/posix/rtmempage-exec-mmap-heap-posix.cpp \718 717 r3/posix/dir-posix.cpp \ 719 718 r3/posix/env-posix.cpp \ … … 734 733 r3/posix/timelocal-posix.cpp \ 735 734 r3/posix/utf8-posix.cpp 735 ## @todo r3/posix/rtmempage-exec-mmap-heap-posix.cpp 736 736 737 737 RuntimeR3_SOURCES.darwin = \ … … 775 775 r3/posix/RTPathUserHome-posix.cpp \ 776 776 r3/posix/RTSystemQueryOSInfo-posix.cpp \ 777 777 r3/posix/RTSystemQueryTotalRam-posix.cpp \ 778 778 r3/posix/RTTimeSet-posix.cpp \ 779 779 r3/posix/dir-posix.cpp \ … … 1822 1822 generic/mppresent-generic.cpp \ 1823 1823 os2/RTErrConvertFromOS2.cpp \ 1824 os2/rtSemWaitOs2ConvertTimeout.cpp \ 1824 1825 os2/sys0.asm \ 1825 1826 r0drv/generic/RTMpIsCpuWorkPending-r0drv-generic.cpp \ … … 1935 1936 # 1936 1937 RuntimeGuestR0_TEMPLATE := VBOXGUESTR0LIB 1938 RuntimeGuestR0_EXTENDS = RuntimeR0Drv 1937 1939 RuntimeGuestR0_SOURCES := $(filter-out generic/RTLogWriteUser-generic.cpp, $(RuntimeR0Drv_SOURCES)) 1938 1940 RuntimeGuestR0_SOURCES += \ 1939 1941 VBox/logbackdoor.cpp 1940 RuntimeGuestR0_EXTENDS = RuntimeR0Drv1941 1942 1942 1943 -
trunk/src/VBox/Runtime/include/internal/iprt.h
r35662 r40304 192 192 #endif 193 193 194 #endif 195 194 195 RT_C_DECLS_BEGIN 196 197 #ifdef RT_OS_OS2 198 uint32_t rtR0SemWaitOs2ConvertTimeout(uint32_t fFlags, uint64_t uTimeout); 199 #endif 200 201 RT_C_DECLS_END 202 203 #endif 204 -
trunk/src/VBox/Runtime/r0drv/os2/memuserkernel-r0drv-os2.cpp
r28800 r40304 46 46 RTR0DECL(int) RTR0MemUserCopyTo(RTR3PTR R3PtrDst, void const *pvSrc, size_t cb) 47 47 { 48 int rc = KernCopyOut((void *)R3PtrDst, pvSrc, cb);48 int rc = KernCopyOut((void *)R3PtrDst, (void *)pvSrc, cb); 49 49 if (RT_LIKELY(rc == 0)) 50 50 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/r0drv/os2/semevent-r0drv-os2.cpp
r33269 r40304 34 34 *******************************************************************************/ 35 35 #include "the-os2-kernel.h" 36 #include "internal/iprt.h" 36 37 37 38 #include <iprt/semaphore.h> 38 #include <iprt/alloc.h>39 39 #include <iprt/asm.h> 40 40 #include <iprt/assert.h> 41 41 #include <iprt/err.h> 42 #include <iprt/mem.h> 43 #include <iprt/lockvalidator.h> 42 44 43 45 #include "internal/magics.h" … … 155 157 156 158 157 static int rtSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies, bool fInterruptible) 158 { 159 PRTSEMEVENTINTERNAL pThis = (PRTSEMEVENTINTERNAL)hEventSem; 159 /** 160 * Worker for RTSemEventWaitEx and RTSemEventWaitExDebug. 161 * 162 * @returns VBox status code. 163 * @param pThis The event semaphore. 164 * @param fFlags See RTSemEventWaitEx. 165 * @param uTimeout See RTSemEventWaitEx. 166 * @param pSrcPos The source code position of the wait. 167 */ 168 static int rtR0SemEventOs2Wait(PRTSEMEVENTINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout, 169 PCRTLOCKVALSRCPOS pSrcPos) 170 { 171 /* 172 * Validate and convert input. 173 */ 174 if (!pThis) 175 return VERR_INVALID_HANDLE; 160 176 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 161 177 AssertMsgReturn(pThis->u32Magic == RTSEMEVENT_MAGIC, ("u32Magic=%RX32 pThis=%p\n", pThis->u32Magic, pThis), VERR_INVALID_HANDLE); 162 178 AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER); 179 180 ULONG cMsTimeout = rtR0SemWaitOs2ConvertTimeout(fFlags, uTimeout); 181 ULONG fBlock = BLOCK_SPINLOCK; 182 if (!(fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE)) 183 fBlock |= BLOCK_UNINTERRUPTABLE; 184 185 /* 186 * Do the job. 187 */ 163 188 KernAcquireSpinLock(&pThis->Spinlock); 164 189 … … 175 200 176 201 ULONG ulData = (ULONG)VERR_INTERNAL_ERROR; 177 rc = KernBlock((ULONG)pThis, 178 cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies, 179 BLOCK_SPINLOCK | (!fInterruptible ? BLOCK_UNINTERRUPTABLE : 0), 202 rc = KernBlock((ULONG)pThis, cMsTimeout, fBlock, 180 203 &pThis->Spinlock, 181 204 &ulData); … … 199 222 200 223 case ERROR_TIMEOUT: 201 Assert(cM illies != RT_INDEFINITE_WAIT);224 Assert(cMsTimeout != SEM_INDEFINITE_WAIT); 202 225 ASMAtomicDecU32(&pThis->cWaiters); 203 226 rc = VERR_TIMEOUT; … … 205 228 206 229 case ERROR_INTERRUPT: 207 Assert(f Interruptible);230 Assert(fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE); 208 231 ASMAtomicDecU32(&pThis->cWaiters); 209 232 rc = VERR_INTERRUPTED; … … 222 245 223 246 224 RTDECL(int) RTSemEventWait(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 225 { 226 return rtSemEventWait(hEventSem, cMillies, false /* not interruptible */); 227 } 228 229 230 RTDECL(int) RTSemEventWaitNoResume(RTSEMEVENT hEventSem, RTMSINTERVAL cMillies) 231 { 232 return rtSemEventWait(hEventSem, cMillies, true /* interruptible */); 247 RTDECL(int) RTSemEventWaitEx(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout) 248 { 249 #ifndef RTSEMEVENT_STRICT 250 return rtR0SemEventOs2Wait(hEventSem, fFlags, uTimeout, NULL); 251 #else 252 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API(); 253 return rtR0SemEventOs2Wait(hEventSem, fFlags, uTimeout, &SrcPos); 254 #endif 255 } 256 257 258 RTDECL(int) RTSemEventWaitExDebug(RTSEMEVENT hEventSem, uint32_t fFlags, uint64_t uTimeout, 259 RTHCUINTPTR uId, RT_SRC_POS_DECL) 260 { 261 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); 262 return rtR0SemEventOs2Wait(hEventSem, fFlags, uTimeout, &SrcPos); 233 263 } 234 264 -
trunk/src/VBox/Runtime/r0drv/os2/semeventmulti-r0drv-os2.cpp
r33155 r40304 34 34 *******************************************************************************/ 35 35 #include "the-os2-kernel.h" 36 #include "internal/iprt.h" 36 37 37 38 #include <iprt/semaphore.h> 38 #include <iprt/alloc.h>39 39 #include <iprt/asm.h> 40 40 #include <iprt/assert.h> 41 41 #include <iprt/err.h> 42 #include <iprt/lockvalidator.h> 43 #include <iprt/mem.h> 42 44 #include "internal/magics.h" 43 45 … … 164 166 165 167 166 static int rtSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies, bool fInterruptible) 167 { 168 PRTSEMEVENTMULTIINTERNAL pThis = (PRTSEMEVENTMULTIINTERNAL)hEventMultiSem; 168 /** 169 * Worker for RTSemEventWaitEx and RTSemEventWaitExDebug. 170 * 171 * @returns VBox status code. 172 * @param pThis The event semaphore. 173 * @param fFlags See RTSemEventWaitEx. 174 * @param uTimeout See RTSemEventWaitEx. 175 * @param pSrcPos The source code position of the wait. 176 */ 177 static int rtR0SemEventMultiOs2Wait(PRTSEMEVENTMULTIINTERNAL pThis, uint32_t fFlags, uint64_t uTimeout, 178 PCRTLOCKVALSRCPOS pSrcPos) 179 { 180 /* 181 * Validate and convert the input. 182 */ 183 if (!pThis) 184 return VERR_INVALID_HANDLE; 169 185 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 170 186 AssertMsgReturn(pThis->u32Magic == RTSEMEVENTMULTI_MAGIC, 171 187 ("pThis=%p u32Magic=%#x\n", pThis, pThis->u32Magic), 172 188 VERR_INVALID_HANDLE); 173 189 AssertReturn(RTSEMWAIT_FLAGS_ARE_VALID(fFlags), VERR_INVALID_PARAMETER); 190 191 ULONG cMsTimeout = rtR0SemWaitOs2ConvertTimeout(fFlags, uTimeout); 192 ULONG fBlock = BLOCK_SPINLOCK; 193 if (!(fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE)) 194 fBlock |= BLOCK_UNINTERRUPTABLE; 195 196 /* 197 * Do the job. 198 */ 174 199 KernAcquireSpinLock(&pThis->Spinlock); 175 200 … … 182 207 183 208 ULONG ulData = (ULONG)VERR_INTERNAL_ERROR; 184 rc = KernBlock((ULONG)pThis, 185 cMillies == RT_INDEFINITE_WAIT ? SEM_INDEFINITE_WAIT : cMillies, 186 BLOCK_SPINLOCK | (!fInterruptible ? BLOCK_UNINTERRUPTABLE : 0), 209 rc = KernBlock((ULONG)pThis, cMsTimeout, fBlock, 187 210 &pThis->Spinlock, 188 211 &ulData); … … 207 230 208 231 case ERROR_TIMEOUT: 209 Assert(cM illies != RT_INDEFINITE_WAIT);232 Assert(cMsTimeout != SEM_INDEFINITE_WAIT); 210 233 ASMAtomicDecU32(&pThis->cWaiters); 211 234 rc = VERR_TIMEOUT; … … 213 236 214 237 case ERROR_INTERRUPT: 215 Assert(f Interruptible);238 Assert(fFlags & RTSEMWAIT_FLAGS_INTERRUPTIBLE); 216 239 ASMAtomicDecU32(&pThis->cWaiters); 217 240 rc = VERR_INTERRUPTED; … … 230 253 231 254 232 RTDECL(int) RTSemEventMultiWait(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 233 { 234 return rtSemEventMultiWait(hEventMultiSem, cMillies, false /* not interruptible */); 235 } 236 237 238 RTDECL(int) RTSemEventMultiWaitNoResume(RTSEMEVENTMULTI hEventMultiSem, RTMSINTERVAL cMillies) 239 { 240 return rtSemEventMultiWait(hEventMultiSem, cMillies, true /* interruptible */); 255 RTDECL(int) RTSemEventMultiWaitEx(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout) 256 { 257 #ifndef RTSEMEVENT_STRICT 258 return rtR0SemEventMultiOs2Wait(hEventMultiSem, fFlags, uTimeout, NULL); 259 #else 260 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API(); 261 return rtR0SemEventMultiOs2Wait(hEventMultiSem, fFlags, uTimeout, &SrcPos); 262 #endif 263 } 264 265 266 RTDECL(int) RTSemEventMultiWaitExDebug(RTSEMEVENTMULTI hEventMultiSem, uint32_t fFlags, uint64_t uTimeout, 267 RTHCUINTPTR uId, RT_SRC_POS_DECL) 268 { 269 RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API(); 270 return rtR0SemEventMultiOs2Wait(hEventMultiSem, fFlags, uTimeout, &SrcPos); 241 271 } 242 272 -
trunk/src/VBox/Runtime/r3/init.cpp
r39753 r40304 46 46 #ifdef RT_OS_OS2 47 47 # include <InnoTekLIBC/fork.h> 48 # define INCL_DOSMISC 49 # include <os2.h> 48 50 #endif 49 51 #include <locale.h> … … 334 336 SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX | fOldErrMode); 335 337 #elif defined(RT_OS_OS2) 336 # error "FIXME" 338 DosError(FERR_DISABLEHARDERR); 337 339 #endif 338 340 -
trunk/src/VBox/Runtime/r3/os2/filelock-os2.cpp
r33540 r40304 83 83 84 84 Assert(RTFILE_LOCK_WAIT); 85 if (fcntl( File, (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0)85 if (fcntl(RTFileToNative(File), (fLock & RTFILE_LOCK_WAIT) ? F_SETLKW : F_SETLK, &fl) >= 0) 86 86 return VINF_SUCCESS; 87 87 … … 163 163 fl.l_pid = 0; 164 164 165 if (fcntl( File, F_SETLK, &fl) >= 0)165 if (fcntl(RTFileToNative(File), F_SETLK, &fl) >= 0) 166 166 return VINF_SUCCESS; 167 167 -
trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp
r33393 r40304 52 52 RTDECL(int) RTSemEventCreateEx(PRTSEMEVENT phEventSem, uint32_t fFlags, RTLOCKVALCLASS hClass, const char *pszNameFmt, ...) 53 53 { 54 AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) , VERR_INVALID_PARAMETER);54 AssertReturn(!(fFlags & ~(RTSEMEVENT_FLAGS_NO_LOCK_VAL | RTSEMEVENT_FLAGS_BOOTSTRAP_HACK)), VERR_INVALID_PARAMETER); 55 55 Assert(!(fFlags & RTSEMEVENT_FLAGS_BOOTSTRAP_HACK) || (fFlags & RTSEMEVENT_FLAGS_NO_LOCK_VAL)); 56 56 -
trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp
r39443 r40304 46 46 #include <iprt/alloc.h> 47 47 #include <iprt/asm-amd64-x86.h> 48 #include <iprt/cpuset.h> 48 49 #include <iprt/string.h> 49 50 #include <iprt/err.h> … … 208 209 RTR3DECL(int) RTThreadGetAffinity(PRTCPUSET pCpuSet) 209 210 { 210 return VINF_SUCCESS;211 }212 213 RTR3DECL(int) RTThreadGetAffinity(PRTCPUSET pCpuSet)214 {215 211 union 216 212 { -
trunk/src/VBox/Runtime/r3/stream.cpp
r39395 r40304 53 53 #include <stdio.h> 54 54 #include <errno.h> 55 #if def RT_OS_WINDOWS55 #if defined(RT_OS_WINDOWS) || defined(RT_OS_OS2) 56 56 # include <io.h> 57 57 # include <fcntl.h> 58 #endif 59 #ifdef RT_OS_WINDOWS 58 60 # include <Windows.h> 61 #endif 62 63 #ifdef RT_OS_OS2 64 # define _O_TEXT O_TEXT 65 # define _O_BINARY O_BINARY 59 66 #endif 60 67
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器