Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1123 → Rev 1524

/demos/trunk/base/pcdemo.c
34,7 → 34,7
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* CVS : $Id: pcdemo.c,v 1.2 2003-01-07 17:10:15 pj Exp $
* CVS : $Id: pcdemo.c,v 1.3 2004-04-17 11:36:14 giacomo Exp $
 
This test verify the correctness of the PC module.
 
63,11 → 63,9
*/
 
#include "kernel/kern.h"
#include "drivers/keyb.h"
 
mutex_t m0,m1,m2;
 
 
void startJ(void *a)
{
task_activate((PID)a);
123,12 → 121,6
return 0;
}
 
void fine(KEY_EVT *e)
{
sys_end();
}
 
 
int main(int argc, char **argv)
{
struct timespec t;
140,18 → 132,10
PI_mutexattr_t a2;
PC_RES_MODEL r;
 
KEY_EVT emerg;
 
clear();
 
cprintf("Priority Ceiling demo. Press Alt-X to exit the demo\n");
cprintf("Priority Ceiling demo. It ends after 60 sec\n");
 
//keyb_set_map(itaMap);
emerg.ascii = 'x';
emerg.scan = KEY_X;
emerg.flag = ALTL_BIT;
keyb_hook(emerg,fine);
 
/* ---------------------------------------------------------------------
Task creation
--------------------------------------------------------------------- */
208,7 → 192,12
 
task_activate(p2);
 
cprintf("END main\n");
do {
sys_gettime(&t);
} while (t.tv_sec < 10);
sys_end();
 
return 0;
 
}