Changeset 4046 for branches/Grace/src/win32k/ldr/mytkExecPgm.asm
- Timestamp:
- Aug 19, 2000, 4:37:21 PM (25 years ago)
- File:
-
- 1 edited
-
branches/Grace/src/win32k/ldr/mytkExecPgm.asm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/Grace/src/win32k/ldr/mytkExecPgm.asm
r4025 r4046 1 ; $Id: mytkExecPgm.asm,v 1.10.4. 2 2000-08-17 08:23:34bird Exp $1 ; $Id: mytkExecPgm.asm,v 1.10.4.3 2000-08-19 14:37:16 bird Exp $ 2 2 ; 3 3 ; mytkExecPgm - tkExecPgm overload … … 84 84 public tkExecPgmCopyEnv 85 85 86 public fLdrSemTaken 86 87 public fTkExecPgm 87 88 public achTkExecPgmFilename … … 100 101 ; (and you'll have to be behind the loader semaphore of course!) 101 102 DATA16 SEGMENT 103 fLdrSemTaken db 0 ; 0 - Loader Semaphore not taken 104 ; 1 - Loader semaphore is taken and will be freed at exit. 102 105 fTkExecPgm db 0 ; 0 - achTkExecPgmFilename and achTkExecPgmArguments is INVALID 103 106 ; 1 - achTkExecPgmFilename and achTkExecPgmArguments is VALID. … … 223 226 224 227 push 0ffffffffh ; Wait indefinitely. 225 push dword ptr eax; LDRSem handle.228 push eax ; LDRSem handle. 226 229 call near ptr FLAT:_KSEMRequestMutex@8 227 230 or eax, eax ; Check if failed. 228 231 jnz tkepgm_backout ; Backout on failure. 232 mov fLdrSemTaken, 1 ; Marks that the loader semaphore is taken 229 233 230 234 … … 313 317 push cs ; Problem calling far into the calltab segement. 314 318 call near ptr FLAT:_g_tkExecPgm 315 pushfd 316 317 ; 318 ; Clear loader semaphore. 319 ; 319 pushfd ; preserve flags 320 320 push eax ; preserve result. 321 321 push ecx ; preserve ecx just in case … … 324 324 mov ds, ax 325 325 mov es, ax 326 ASSUME ds:FLAT, es:FLAT 327 call near ptr FLAT:_LDRClearSem@0 328 pop edx ; restore edx 329 pop ecx ; restore ecx 330 pop eax ; restore result. 326 ASSUME ds:FLAT, es:FLAT ; both ds and es are now FLAT 331 327 332 328 ; … … 338 334 339 335 ; 336 ; Clear loader semaphore. 337 ; 338 cmp fLdrSemTaken, 0 ; is the semaphore still taken? 339 je tkepgm_callbehindret ; jmp if not taken. 340 mov fLdrSemTaken, 0 ; Loader semaphore is not taken any longer! 341 call near ptr FLAT:_LDRClearSem@0 342 343 ; 340 344 ; Restore ds and es (probably unecessary but...) and Return 341 345 ; 346 tkepgm_callbehindret: 342 347 push dword ptr [ebp + SegFilename] 343 348 pop ds 344 349 push dword ptr [ebp + SegEnv] 345 350 pop es 346 popfd 351 pop edx ; restore edx 352 pop ecx ; restore ecx 353 pop eax ; restore result. 354 popfd ; restore flags 347 355 leave 348 356 retf
Note:
See TracChangeset
for help on using the changeset viewer.
