Subversion Repositories shark

Compare Revisions

Regard whitespace Rev 1380 → Rev 1379

/demos/trunk/jumpball/rrn.c
18,11 → 18,11
 
/**
------------
CVS : $Id: rrn.c,v 1.3 2004-04-18 09:45:28 giacomo Exp $
CVS : $Id: rrn.c,v 1.2 2004-04-17 17:16:47 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-04-18 09:45:28 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-17 17:16:47 $
------------
**/
 
46,7 → 46,6
*/
 
#include "kernel/kern.h"
#include "modules/intdrive.h"
#include "modules/edf.h"
#include "modules/rr.h"
#include "modules/rrsoft.h"
56,8 → 55,6
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "modules/nop.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
69,6 → 66,7
#define INTDRIVE_T 10000
#define INTDRIVE_FLAG 0
 
 
TIME __kernel_register_levels__(void *arg)
{
struct multiboot_info *mb = (struct multiboot_info *)arg;
83,8 → 81,6
 
CABS_register_module();
 
NOP_register_module();
 
return TICK;
}
 
98,13 → 94,3
 
return (void *)0;
}
 
void app_mutex_init(mutex_t *m)
{
NOP_mutexattr_t attr;
 
NOP_mutexattr_default(attr);
 
mutex_init(m, &attr);
}
 
/demos/trunk/jumpball/rrp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: rrp.c,v 1.3 2004-04-18 09:45:28 giacomo Exp $
CVS : $Id: rrp.c,v 1.2 2004-04-17 17:16:47 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-04-18 09:45:28 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-17 17:16:47 $
------------
**/
 
56,8 → 56,6
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "modules/pi.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
83,8 → 81,6
 
CABS_register_module();
 
PI_register_module();
 
return TICK;
}
 
98,13 → 94,3
 
return (void *)0;
}
 
void app_mutex_init(mutex_t *m)
{
PI_mutexattr_t attr;
 
PI_mutexattr_default(attr);
 
mutex_init(m, &attr);
}
 
/demos/trunk/jumpball/demo.c
18,11 → 18,11
 
/**
------------
CVS : $Id: demo.c,v 1.6 2004-04-18 09:45:27 giacomo Exp $
CVS : $Id: demo.c,v 1.5 2004-04-17 17:16:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.6 $
Last update: $Date: 2004-04-18 09:45:27 $
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-17 17:16:46 $
------------
**/
 
58,8 → 58,6
 
PID shutdown_task_PID = -1;
 
void app_mutex_init(mutex_t *m);
 
int device_drivers_close() {
FB26_close(FRAME_BUFFER_DEVICE);
244,9 → 242,6
k.status = KEY_PRESSED;
keyb_hook(k,endfun,FALSE);
 
/* init the graphic mutex */
app_mutex_init(&mutex);
 
/* useful colors ... */
white = rgb16(255,255,255);
black = rgb16(0,0,0);
/demos/trunk/jumpball/ern.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ern.c,v 1.3 2004-04-18 09:45:27 giacomo Exp $
CVS : $Id: ern.c,v 1.2 2004-04-17 17:16:47 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-04-18 09:45:27 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-17 17:16:47 $
------------
**/
 
56,8 → 56,6
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "modules/nop.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
83,8 → 81,6
 
CABS_register_module();
 
NOP_register_module();
 
return TICK;
}
 
98,13 → 94,3
 
return (void *)0;
}
 
void app_mutex_init(mutex_t *m)
{
NOP_mutexattr_t attr;
 
NOP_mutexattr_default(attr);
 
mutex_init(m, &attr);
}
 
/demos/trunk/jumpball/ecp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ecp.c,v 1.3 2004-04-18 09:45:27 giacomo Exp $
CVS : $Id: ecp.c,v 1.2 2004-04-17 17:16:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-04-18 09:45:27 $
Revision: $Revision: 1.2 $
Last update: $Date: 2004-04-17 17:16:46 $
------------
**/
 
56,8 → 56,6
#include "modules/hartport.h"
#include "modules/cabs.h"
 
#include "modules/pi.h"
 
/*+ sysyem tick in us +*/
#define TICK 0
 
81,7 → 79,6
 
SEM_register_module();
CABS_register_module();
PI_register_module();
 
return TICK;
}
96,12 → 93,3
 
return (void *)0;
}
 
void app_mutex_init(mutex_t *m)
{
PI_mutexattr_t attr;
 
PI_mutexattr_default(attr);
 
mutex_init(m, &attr);
}
/demos/trunk/jumpball/demo.h
18,11 → 18,11
 
/**
------------
CVS : $Id: demo.h,v 1.6 2004-04-18 09:45:27 giacomo Exp $
CVS : $Id: demo.h,v 1.5 2004-04-17 17:16:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.6 $
Last update: $Date: 2004-04-18 09:45:27 $
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-17 17:16:46 $
------------
**/
 
128,9 → 128,6
 
extern PID shutdown_task_PID;
 
/* graphic mutex... */
extern mutex_t mutex;
 
/* useful colors... */
extern int white;
extern int black;
/demos/trunk/jumpball/ball.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ball.c,v 1.5 2004-04-18 09:45:27 giacomo Exp $
CVS : $Id: ball.c,v 1.4 2004-04-17 17:16:46 giacomo Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-18 09:45:27 $
Revision: $Revision: 1.4 $
Last update: $Date: 2004-04-17 17:16:46 $
------------
**/
 
125,11 → 125,12
x = x0 + vx * tx;
}
 
mutex_lock(&mutex);
task_nopreempt();
grx_disc(ox, oy, R, 0);
task_preempt();
 
ox = x;
oy = BALL_Y - y;
mutex_unlock(&mutex);
 
if (ballexit && i!=0xFFFF) {
npc--;
136,9 → 137,9
return 0;
}
 
mutex_lock(&mutex);
task_nopreempt();
grx_disc(ox, oy, R, i);
mutex_unlock(&mutex);
task_preempt();
 
my_delay();