Subversion Repositories shark

Rev

Rev 1655 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1655 giacomo 1
#include "kernel/kern.h"
2
#include "modules/edf.h"
3
#include "modules/cbs.h"
4
#include "modules/rr.h"
5
#include "modules/dummy.h"
6
 
7
#include "modules/sem.h"
8
#include "modules/hartport.h"
9
#include "modules/cabs.h"
10
#include "modules/pi.h"
11
#include "modules/pc.h"
12
#include "modules/srp.h"
13
#include "modules/npp.h"
14
#include "modules/nop.h"
15
 
16
#include "drivers/keyb.h"
17
 
18
 
19
/*+ sysyem tick in us +*/
20
#define TICK 0
21
 
22
/*+ RR tick in us +*/
23
#define RRTICK 2000
24
 
25
TIME __kernel_register_levels__(void *arg)
26
{
27
  struct multiboot_info *mb = (struct multiboot_info *)arg;
28
 
29
  EDF_register_level(EDF_ENABLE_ALL);
30
  CBS_register_level(CBS_ENABLE_ALL, 0);
31
  RR_register_level(RRTICK, RR_MAIN_YES, mb);
32
  dummy_register_level();
33
 
34
 
35
  SEM_register_module();
36
 
37
  CABS_register_module();
38
 
39
  PI_register_module();
40
  NOP_register_module();
41
 
42
  return TICK;
43
}
44
 
45
TASK __init__(void *arg)
46
{
47
  struct multiboot_info *mb = (struct multiboot_info *)arg;
48
 
49
  KEYB_PARMS kparms = BASE_KEYB;
50
 
51
  HARTPORT_init();
52
 
53
  keyb_def_ctrlC(kparms, NULL);
54
  KEYB_init(&kparms);
55
 
56
  __call_main__(mb);
57
 
58
  return (void *)0;
59
}
60
 
61
 
62
void app_mutex_init(mutex_t *m)
63
{
64
  PI_mutexattr_t attr;
65
 
66
  PI_mutexattr_default(attr);
67
 
68
  mutex_init(m, &attr);
69
}
70