Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 29 → Rev 38

/shark/trunk/kernel/int_sem.c
18,11 → 18,11
 
/**
------------
CVS : $Id: int_sem.c,v 1.2 2002-11-11 08:34:08 pj Exp $
CVS : $Id: int_sem.c,v 1.3 2003-01-07 17:07:49 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:34:08 $
Revision: $Revision: 1.3 $
Last update: $Date: 2003-01-07 17:07:49 $
------------
 
Internal semaphores.
86,23 → 86,13
}
else { /* We must block exec task */
LEVEL l; /* for readableness only */
TIME tx; /* a dummy TIME for timespec operations */
struct timespec ty; /* a dummy timespec for timespec operations */
 
proc_table[exec_shadow].context = kern_context_save();
/* SAME AS SCHEDULER... manage the capacity event and the load_info */
ll_gettime(TIME_EXACT, &schedule_time);
SUBTIMESPEC(&schedule_time, &cap_lasttime, &ty);
tx = TIMESPEC2USEC(&ty);
proc_table[exec_shadow].avail_time -= tx;
jet_update_slice(tx);
if (cap_timer != NIL) {
event_delete(cap_timer);
cap_timer = NIL;
}
 
kern_epilogue_macro();
l = proc_table[exec_shadow].task_level;
level_table[l]->task_extract(l,exec_shadow);
level_table[l]->public_block(l,exec_shadow);
 
/* we insert the task in the semaphore queue */
proc_table[exec_shadow].status = INTERNAL_SEM_WAIT;
150,7 → 140,7
 
p = iq_getfirst(&s->blocked);
l = proc_table[p].task_level;
level_table[l]->task_insert(l,p);
level_table[l]->public_unblock(l,p);
 
scheduler();
}