Subversion Repositories shark

Compare Revisions

Regard whitespace Rev 1377 → Rev 1376

/demos/trunk/base/jointest.c
34,7 → 34,7
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* CVS : $Id: jointest.c,v 1.2 2004-04-17 11:36:14 giacomo Exp $
* CVS : $Id: jointest.c,v 1.1 2002-11-11 08:22:45 pj Exp $
 
This test verify the correctness of the task_join primitive. (that
function is the same as pthread_join... someday I will change the
65,10 → 65,17
*/
 
#include "kernel/kern.h"
#include "drivers/keyb.h"
 
 
PID j0, j1, j2, j3, j4;
mutex_t m1;
 
void fine(KEY_EVT *e)
{
sys_end();
}
 
TASK J1()
{
int err;
141,10 → 148,16
 
PI_mutexattr_t a;
 
KEY_EVT emerg;
 
int err;
void *ret;
 
struct timespec t;
//keyb_set_map(itaMap);
emerg.ascii = 'x';
emerg.scan = KEY_X;
emerg.flag = ALTL_BIT;
keyb_hook(emerg,fine);
 
j0 = exec_shadow;
nrt_task_default_model(m);
203,12 → 216,5
 
cprintf("main: join J4 returns %d error %d, exiting\n", (int)ret, err);
 
do {
sys_gettime(&t);
} while (t.tv_sec < 10);
sys_end();
 
return 0;
 
}