Rev 129 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 129 | Rev 384 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | sti |
24 | sti |
25 | call change_task |
25 | call change_task |
26 | jmp start_wait |
26 | jmp start_wait |
27 | ok=$ |
27 | ok=$ |
28 | push eax |
28 | push eax |
29 | mov eax,dword [0x3010+second_base_address] |
29 | mov eax,dword [TASK_BASE+second_base_address] |
30 | mov eax,[eax+TASKDATA.pid] |
30 | mov eax,[eax+TASKDATA.pid] |
31 | mov [name],eax |
31 | mov [name],eax |
32 | pop eax |
32 | pop eax |
33 | sti |
33 | sti |
34 | } |
34 | } |
Line 58... | Line 58... | ||
58 | } |
58 | } |
59 | macro WaitSimpleCriticalSection name |
59 | macro WaitSimpleCriticalSection name |
60 | { |
60 | { |
61 | local start_wait,first_wait,inc_counter,end_wait |
61 | local start_wait,first_wait,inc_counter,end_wait |
62 | push eax |
62 | push eax |
63 | mov eax,[0x3010+second_base_address] |
63 | mov eax,[TASK_BASE+second_base_address] |
64 | mov eax,[eax+TASKDATA.pid] |
64 | mov eax,[eax+TASKDATA.pid] |
65 | start_wait=$ |
65 | start_wait=$ |
66 | cli |
66 | cli |
67 | cmp [name],dword 0 |
67 | cmp [name],dword 0 |
68 | jz first_wait |
68 | jz first_wait |
Line 90... | Line 90... | ||
90 | release_end=$ |
90 | release_end=$ |
91 | } |
91 | } |
92 | macro TryWaitSimpleCriticalSection name ;result in eax and in flags |
92 | macro TryWaitSimpleCriticalSection name ;result in eax and in flags |
93 | { |
93 | { |
94 | local ok,try_end |
94 | local ok,try_end |
95 | mov eax,[0x3000+second_base_address] |
95 | mov eax,[CURRENT_TASK+second_base_address] |
96 | mov eax,[eax+TASKDATA.pid] |
96 | mov eax,[eax+TASKDATA.pid] |
97 | cmp [name],eax |
97 | cmp [name],eax |
98 | jz ok |
98 | jz ok |
99 | cmp [name],0 |
99 | cmp [name],0 |
100 | jz ok |
100 | jz ok |