Subversion Repositories Kolibri OS

Rev

Rev 354 | Rev 377 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 354 Rev 363
Line 94... Line 94...
94
           test eax, eax
94
           test eax, eax
95
           jz .fail
95
           jz .fail
96
 
96
 
Line 97... Line 97...
97
           mov [eax+APPOBJ.magic], 'EVNT'
97
           mov [eax+APPOBJ.magic], 'EVNT'
98
           mov [eax+APPOBJ.destroy], destroy_event
98
           mov [eax+APPOBJ.destroy], destroy_event.internal
99
           mov [eax+EVENT.id], ebx
99
           mov [eax+EVENT.id], ebx
Line 100... Line 100...
100
 
100
 
101
           mov ebx, [CURRENT_TASK]
101
           mov ebx, [CURRENT_TASK]
102
           shl ebx, 5
102
           shl ebx, 5
Line 142... Line 142...
142
           cmp [eax+APPOBJ.magic], 'EVNT'
142
           cmp [eax+APPOBJ.magic], 'EVNT'
143
           jne .fail
143
           jne .fail
144
           cmp [eax+EVENT.id], ebx
144
           cmp [eax+EVENT.id], ebx
145
           jne .fail
145
           jne .fail
146
 
146
.internal:
147
           mov ebx, [eax+APPOBJ.fd]
147
           mov ebx, [eax+APPOBJ.fd]
148
           mov ecx, [eax+APPOBJ.bk]
148
           mov ecx, [eax+APPOBJ.bk]
149
           mov [ebx+APPOBJ.bk], ecx
149
           mov [ebx+APPOBJ.bk], ecx
150
           mov [ecx+APPOBJ.fd], ebx
150
           mov [ecx+APPOBJ.fd], ebx
151
.internal:
151
.force:
152
           xor edx, edx             ;clear common header
152
           xor edx, edx             ;clear common header
153
           mov [eax], edx
153
           mov [eax], edx
154
           mov [eax+4], edx
154
           mov [eax+4], edx
155
           mov [eax+8], edx
155
           mov [eax+8], edx
156
           mov [eax+12], edx
156
           mov [eax+12], edx
Line 266... Line 266...
266
.done:
266
.done:
267
           ret
267
           ret
268
 
268
 
Line 269... Line 269...
269
.destroy:
269
.destroy:
270
           call destroy_event.internal
270
           call destroy_event.force
271
           ret
271
           ret
272
.switch:
272
.switch:
273
           mov eax, [0x3010]
273
           mov eax, [0x3010]
274
           mov [eax+TASKDATA.state], byte 5
274
           mov [eax+TASKDATA.state], byte 5
275
	   call change_task
275
	   call change_task
Line 329... Line 329...
329
.done:
329
.done:
330
           add esp, 4
330
           add esp, 4
331
           ret
331
           ret
332
.destroy:
332
.destroy:
333
           call destroy_event.internal
333
           call destroy_event.force
334
           add esp, 4
334
           add esp, 4
335
           ret
335
           ret
336
.switch:
336
.switch:
337
           or [eax+EVENT.state], EVENT_WATCHED
337
           or [eax+EVENT.state], EVENT_WATCHED
338
           mov eax, [0x3010]
338
           mov eax, [0x3010]
339
           mov [eax+TASKDATA.state], byte 5
339
           mov [eax+TASKDATA.state], byte 5