Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 37 → Rev 38

/shark/trunk/kernel/join.c
18,11 → 18,11
 
/**
------------
CVS : $Id: join.c,v 1.2 2002-11-11 08:34:08 pj Exp $
CVS : $Id: join.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 $
------------
 
task join and related primitives
80,7 → 80,7
proc_table[i].shadow = i;
 
l = proc_table[i].task_level;
level_table[l]->task_insert(l,i);
level_table[l]->public_unblock(l,i);
 
return 1;
}
96,8 → 96,6
{
PID x; /* used to follow the shadow chain */
int blocked = 0; /* a flag */
struct timespec ty;
TIME tx;
LEVEL l;
 
/* task_join is a cancellation point... if the task is suspended
153,20 → 151,11
proc_table[p].waiting_for_me = exec_shadow;
proc_table[exec_shadow].shadow = p;
 
/* 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();
 
/* now, we block the current task, waiting the end of the target task */
l = proc_table[exec_shadow].task_level;
level_table[l]->task_extract(l,exec_shadow);
level_table[l]->public_block(l,exec_shadow);
proc_table[exec_shadow].status = WAIT_JOIN;
 
exec = exec_shadow = -1;