Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1378 → Rev 1379

/demos/trunk/jumpball/ecp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ecp.c,v 1.1 2003-05-01 19:43:16 pj Exp $
CVS : $Id: ecp.c,v 1.2 2004-04-17 17:16:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.1 $
Last update: $Date: 2003-05-01 19:43:16 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-17 17:16:46 $
------------
**/
 
46,6 → 46,7
*/
 
#include "kernel/kern.h"
#include "modules/intdrive.h"
#include "modules/edf.h"
#include "modules/cbs.h"
#include "modules/rr.h"
54,31 → 55,30
#include "modules/sem.h"
#include "modules/hartport.h"
#include "modules/cabs.h"
#include "modules/pi.h"
 
#include "drivers/keyb.h"
 
 
/*+ sysyem tick in us +*/
#define TICK 0
 
/*+ RR tick in us +*/
//#define RRTICK 10000
#define RRTICK 2000
 
/*+ Interrupt Server +*/
#define INTDRIVE_Q 1000
#define INTDRIVE_T 10000
#define INTDRIVE_FLAG 0
 
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
 
INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
EDF_register_level(EDF_ENABLE_ALL);
CBS_register_level(CBS_ENABLE_ALL, 0);
 
CBS_register_level(CBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
SEM_register_module();
CABS_register_module();
PI_register_module();
 
return TICK;
}
89,18 → 89,7
 
HARTPORT_init();
 
KEYB_init(NULL);
 
__call_main__(mb);
 
return (void *)0;
}
 
void app_mutex_init(mutex_t *m)
{
PI_mutexattr_t attr;
 
PI_mutexattr_default(attr);
 
mutex_init(m, &attr);
}