Subversion Repositories Kolibri OS

Rev

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

Rev 8216 Rev 8246
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 8216 $
74
$Revision: 8246 $
Line 3157... Line 3157...
3157
;  +10 12 bytes  name
3157
;  +10 12 bytes  name
3158
;  +22 dword     start in mem
3158
;  +22 dword     start in mem
3159
;  +26 dword     used mem
3159
;  +26 dword     used mem
3160
;  +30 dword     PID , process idenfification number
3160
;  +30 dword     PID , process idenfification number
3161
;
3161
;
-
 
3162
        ; if given memory address belongs to kernel then error
-
 
3163
        push    ebx
-
 
3164
        mov     eax, ebx
-
 
3165
        mov     ebx, 0x4C
-
 
3166
        call    is_region_userspace
-
 
3167
        pop     ebx
-
 
3168
        test    eax, eax
-
 
3169
        jz      .addr_error
Line 3162... Line 3170...
3162
 
3170
 
3163
        cmp     ecx, -1 ; who am I ?
3171
        cmp     ecx, -1 ; who am I ?
3164
        jne     .no_who_am_i
3172
        jne     .no_who_am_i
3165
        mov     ecx, [CURRENT_TASK]
3173
        mov     ecx, [CURRENT_TASK]
Line 3247... Line 3255...
3247
 
3255
 
3248
        mov     eax, [TASK_COUNT]
3256
        mov     eax, [TASK_COUNT]
3249
        mov     [esp+32], eax
3257
        mov     [esp+32], eax
Line -... Line 3258...
-
 
3258
        ret
-
 
3259
 
-
 
3260
.addr_error:    ; if given memory address is illegal
-
 
3261
        mov     eax, -1
3250
        ret
3262
        ret   
3251
 
3263
 
3252
align 4
3264
align 4
3253
sys_clock:
3265
sys_clock:
3254
        cli
3266
        cli