Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1549 → Rev 1550

/demos/trunk/pse51/ptest6.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest6.c,v 1.2 2004-05-23 09:05:51 giacomo Exp $
CVS : $Id: ptest6.c,v 1.3 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2004-05-23 09:05:51 $
Revision: $Revision: 1.3 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 6:
58,7 → 58,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
122,7 → 121,7
x,prio,buf);
 
if (mq_notify(mq, &ev25))
{ cprintf("T2: mq_notify returns errno %d\n",errno); sys_end(); }
{ cprintf("T2: mq_notify returns errno %d\n",errno); exit(1); }
 
cprintf("T2: waiting t = 1 sec.\n");
while (sys_gettime(NULL)<1000000);
129,7 → 128,7
cprintf("T2: 1 sec. reached, sending another message and creating T3 and T4, \n");
 
if (mq_send(mq,"Mickey Mouse",13,1))
{ cprintf("T2: mq_send returns errno %d\n",errno); sys_end(); }
{ cprintf("T2: mq_send returns errno %d\n",errno); exit(1); }
 
pthread_create(&T3, NULL, t3, NULL);
pthread_create(&T4, NULL, t4, NULL);
156,23 → 155,23
cprintf("T3: 2 sec. reached, sending 5 messages\n");
 
if (mq_send(mq,"Goofy",6,1))
{ cprintf("T3: mq_send1 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send1 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Minnie",7,1))
{ cprintf("T3: mq_send2 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send2 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Pluto",6,2)) // NB: different priority!!!
{ cprintf("T3: mq_send3 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send3 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Rocker Duck",12,2)) // NB: different priority!!!
{ cprintf("T3: mq_send4 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send4 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Oncle Scroodge",15,2)) // NB: different priority!!!
{ cprintf("T3: mq_send5 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send5 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
cprintf("T3: ending...\n");