18,11 → 18,11 |
|
/** |
------------ |
CVS : $Id: jet.c,v 1.1.1.1 2002-03-29 14:12:51 pj Exp $ |
CVS : $Id: jet.c,v 1.2 2003-11-05 15:05:11 giacomo Exp $ |
|
File: $File$ |
Revision: $Revision: 1.1.1.1 $ |
Last update: $Date: 2002-03-29 14:12:51 $ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2003-11-05 15:05:11 $ |
------------ |
|
Kernel Job Execution Time functions |
84,12 → 84,14 |
+*/ |
int jet_getstat(PID p, TIME *sum, TIME *max, int *n, TIME *curr) |
{ |
kern_cli(); |
SYS_FLAGS f; |
|
f = kern_fsave(); |
|
if (p<0 || p>=MAX_PROC || |
!(proc_table[p].control & JET_ENABLED) || |
proc_table[p].status == FREE) { |
kern_sti(); |
kern_frestore(f); |
return -1; |
} |
|
98,7 → 100,7 |
if (n != NULL) *n = proc_table[p].jet_n; |
if (curr != NULL) *curr= proc_table[p].jet_table[proc_table[p].jet_curr]; |
|
kern_sti(); |
kern_frestore(f); |
return 0; |
} |
|
109,12 → 111,14 |
the task doesn't have the JET_ENABLE bit set. +*/ |
int jet_delstat(PID p) |
{ |
kern_cli(); |
SYS_FLAGS f; |
|
f = kern_fsave(); |
|
if (p<0 || p>=MAX_PROC || |
!(proc_table[p].control & JET_ENABLED) || |
proc_table[p].status == FREE) { |
kern_sti(); |
kern_frestore(f); |
return -1; |
} |
|
122,7 → 126,7 |
proc_table[p].jet_n = 0; |
proc_table[p].jet_max = 0; |
|
kern_sti(); |
kern_frestore(f); |
return 0; |
} |
|
142,13 → 146,14 |
int jet_gettable(PID p, TIME *table, int n) |
{ |
int i; |
SYS_FLAGS f; |
|
kern_cli(); |
f = kern_fsave(); |
|
if (p<0 || p>=MAX_PROC || |
!(proc_table[p].control & JET_ENABLED) || |
proc_table[p].status == FREE) { |
kern_sti(); |
kern_frestore(f); |
return -1; |
} |
|
165,7 → 170,7 |
i= (i+1) % JET_TABLE_DIM) |
*table++ = proc_table[p].jet_table[i]; |
|
kern_sti(); |
kern_frestore(f); |
return n; |
} |
|