Subversion Repositories Kolibri OS

Rev

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

Rev 764 Rev 765
Line 53... Line 53...
53
;;
53
;;
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 55... Line 55...
55
 
55
 
Line 56... Line 56...
56
include 'macros.inc'
56
include 'macros.inc'
Line 57... Line 57...
57
 
57
 
Line 58... Line 58...
58
$Revision: 764 $
58
$Revision: 765 $
Line 3886... Line 3886...
3886
 
3886
 
Line 3887... Line 3887...
3887
align 4
3887
align 4
Line 3888... Line 3888...
3888
 
3888
 
3889
sys_programirq:
3889
sys_programirq:
Line 3890... Line 3890...
3890
 
3890
 
3891
    mov   edi,[TASK_BASE]
3891
    mov   eax, [TASK_BASE]
3892
    add   eax,[edi+TASKDATA.mem_start]
-
 
3893
 
3892
    add   ebx, [eax + TASKDATA.mem_start]
3894
    cmp   ebx,16
3893
 
3895
    jae   .not_owner
3894
    cmp   ecx, 16
3896
    mov   edi,[TASK_BASE]
3895
    jae   .not_owner
3897
    mov   edi,[edi+TASKDATA.pid]
3896
    mov   edi, [eax + TASKDATA.pid]
3898
    cmp   edi,[irq_owner+ebx*4]
3897
    cmp   edi, [irq_owner + 4 * ecx]
3899
    je	  spril1
3898
    je	  .spril1
-
 
3899
.not_owner:
-
 
3900
    xor   ecx, ecx
-
 
3901
    jmp   .end
-
 
3902
  .spril1:
-
 
3903
 
-
 
3904
    shl   ecx, 6
Line 3900... Line -...
3900
.not_owner:
-
 
3901
    mov   [esp+36],dword 1
-
 
3902
    ret
-
 
3903
  spril1:
-
 
3904
 
-
 
3905
    mov   esi,eax
3905
    mov   esi, ebx
3906
    shl   ebx,6
3906
    lea   edi, [irq00read + ecx]
-
 
3907
    push  16
3907
    add   ebx,irq00read
3908
    pop   ecx
3908
    mov   edi,ebx
3909
 
Line 3909... Line 3910...
3909
    mov   ecx,16
3910
    cld
Line 4171... Line 4172...
4171
     ret
4172
     ret
Line 4172... Line 4173...
4172
 
4173
 
Line 4173... Line 4174...
4173
 
4174
 
4174
reserve_free_irq:
-
 
4175
 
4175
reserve_free_irq:
4176
     mov   ecx, 1
4176
 
4177
     cmp   ebx, 16
4177
     xor   esi, esi
Line 4178... Line 4178...
4178
     jae   fril1
4178
     inc   esi
4179
     test  eax,eax
4179
     cmp   ecx, 16
4180
     jz    reserve_irq
4180
     jae   ril1
4181
 
4181
 
4182
     lea   edi,[irq_owner+ebx*4]
4182
     lea   ecx, [irq_owner + 4 * ecx]
4183
     mov   edx,[edi]
4183
     mov   edx, [ecx]
-
 
4184
     mov   eax, [TASK_BASE]
4184
     mov   eax,[TASK_BASE]
4185
     mov   edi, [eax + TASKDATA.pid]
4185
     cmp   edx,[eax+TASKDATA.pid]
4186
     dec   ebx
-
 
4187
     jnz   reserve_irq
4186
     jne   fril1
4188
 
-
 
4189
     cmp   edx, edi
4187
     dec   ecx
4190
     jne   ril1
Line 4188... Line 4191...
4188
     mov   [edi],ecx
4191
     dec   esi
Line 4189... Line -...
4189
   fril1:
-
 
4190
     mov   [esp+36],ecx ; return in eax
4192
     mov   [ecx], esi
4191
     ret
4193
 
Line 4192... Line -...
4192
 
-
 
4193
  reserve_irq:
-
 
4194
 
4194
     jmp   ril1
4195
     lea   edi,[irq_owner+ebx*4]
4195
 
4196
     cmp   dword [edi], 0
4196
  reserve_irq:
4197
     jnz   ril1
4197
 
4198
 
4198
     cmp   dword [ecx], 0
Line 4199... Line 4199...
4199
     mov   edx,[TASK_BASE]
4199
     jne   ril1
4200
     mov   edx,[edx+TASKDATA.pid]
4200
 
4201
     mov   [edi],edx
4201
     mov   [ecx], edi