You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(12) |
Jul
(105) |
Aug
(245) |
Sep
(165) |
Oct
(100) |
Nov
(92) |
Dec
(74) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(179) |
Feb
(233) |
Mar
(175) |
Apr
(168) |
May
(146) |
Jun
(165) |
Jul
(18) |
Aug
(95) |
Sep
(134) |
Oct
(120) |
Nov
(51) |
Dec
(65) |
| 2005 |
Jan
(96) |
Feb
(100) |
Mar
(113) |
Apr
(82) |
May
(281) |
Jun
(168) |
Jul
(54) |
Aug
(72) |
Sep
(104) |
Oct
(182) |
Nov
(126) |
Dec
(133) |
| 2006 |
Jan
(211) |
Feb
(252) |
Mar
(291) |
Apr
(199) |
May
(345) |
Jun
(282) |
Jul
(272) |
Aug
(261) |
Sep
(287) |
Oct
(464) |
Nov
(233) |
Dec
(210) |
| 2007 |
Jan
(669) |
Feb
(304) |
Mar
(483) |
Apr
(150) |
May
(293) |
Jun
(215) |
Jul
(178) |
Aug
(138) |
Sep
(159) |
Oct
(301) |
Nov
(367) |
Dec
(165) |
| 2008 |
Jan
(171) |
Feb
(148) |
Mar
(150) |
Apr
(180) |
May
(112) |
Jun
(109) |
Jul
(196) |
Aug
(319) |
Sep
(294) |
Oct
(284) |
Nov
(399) |
Dec
(280) |
| 2009 |
Jan
(536) |
Feb
(454) |
Mar
(382) |
Apr
(255) |
May
(321) |
Jun
(318) |
Jul
(412) |
Aug
(226) |
Sep
(76) |
Oct
(251) |
Nov
(134) |
Dec
(101) |
| 2010 |
Jan
(262) |
Feb
(210) |
Mar
(219) |
Apr
(55) |
May
(180) |
Jun
(225) |
Jul
(151) |
Aug
(184) |
Sep
(54) |
Oct
(160) |
Nov
(237) |
Dec
(115) |
| 2011 |
Jan
(141) |
Feb
(68) |
Mar
(204) |
Apr
(329) |
May
(68) |
Jun
(34) |
Jul
(304) |
Aug
(206) |
Sep
(183) |
Oct
(121) |
Nov
(1125) |
Dec
(934) |
| 2012 |
Jan
(466) |
Feb
(161) |
Mar
(314) |
Apr
(63) |
May
(62) |
Jun
(53) |
Jul
(47) |
Aug
(41) |
Sep
(36) |
Oct
(108) |
Nov
(297) |
Dec
(73) |
| 2013 |
Jan
(236) |
Feb
(81) |
Mar
(422) |
Apr
(441) |
May
(86) |
Jun
(177) |
Jul
(146) |
Aug
(140) |
Sep
(93) |
Oct
(126) |
Nov
(133) |
Dec
(230) |
| 2014 |
Jan
(380) |
Feb
(233) |
Mar
(251) |
Apr
(214) |
May
(168) |
Jun
(670) |
Jul
(538) |
Aug
(459) |
Sep
(330) |
Oct
(327) |
Nov
(339) |
Dec
(456) |
| 2015 |
Jan
(188) |
Feb
(426) |
Mar
(186) |
Apr
(71) |
May
(151) |
Jun
(283) |
Jul
(208) |
Aug
(477) |
Sep
(148) |
Oct
(302) |
Nov
(297) |
Dec
(331) |
| 2016 |
Jan
(474) |
Feb
(55) |
Mar
(92) |
Apr
(118) |
May
(286) |
Jun
(751) |
Jul
(494) |
Aug
(166) |
Sep
(97) |
Oct
(216) |
Nov
(41) |
Dec
(78) |
| 2017 |
Jan
(148) |
Feb
(205) |
Mar
(112) |
Apr
(119) |
May
(125) |
Jun
(102) |
Jul
(242) |
Aug
(26) |
Sep
(53) |
Oct
(28) |
Nov
(38) |
Dec
(97) |
| 2018 |
Jan
(71) |
Feb
(49) |
Mar
(43) |
Apr
(13) |
May
(19) |
Jun
(44) |
Jul
(74) |
Aug
(30) |
Sep
(44) |
Oct
(57) |
Nov
(74) |
Dec
(34) |
| 2019 |
Jan
(41) |
Feb
(50) |
Mar
(30) |
Apr
(24) |
May
(44) |
Jun
(101) |
Jul
(94) |
Aug
(123) |
Sep
(101) |
Oct
(81) |
Nov
(48) |
Dec
(51) |
| 2020 |
Jan
(74) |
Feb
(81) |
Mar
(129) |
Apr
(310) |
May
(176) |
Jun
(97) |
Jul
(137) |
Aug
(205) |
Sep
(84) |
Oct
(71) |
Nov
(106) |
Dec
(138) |
| 2021 |
Jan
(117) |
Feb
(94) |
Mar
(89) |
Apr
(71) |
May
(98) |
Jun
(99) |
Jul
(67) |
Aug
(129) |
Sep
(108) |
Oct
(127) |
Nov
(115) |
Dec
(114) |
| 2022 |
Jan
(115) |
Feb
(85) |
Mar
(97) |
Apr
(92) |
May
(102) |
Jun
(109) |
Jul
(168) |
Aug
(230) |
Sep
(183) |
Oct
(106) |
Nov
(109) |
Dec
(146) |
| 2023 |
Jan
(186) |
Feb
(126) |
Mar
(99) |
Apr
(92) |
May
(158) |
Jun
(74) |
Jul
(113) |
Aug
(93) |
Sep
(84) |
Oct
(163) |
Nov
(72) |
Dec
(81) |
| 2024 |
Jan
(71) |
Feb
(85) |
Mar
(63) |
Apr
(50) |
May
(45) |
Jun
(28) |
Jul
(106) |
Aug
(45) |
Sep
(60) |
Oct
(44) |
Nov
(53) |
Dec
(28) |
| 2025 |
Jan
(87) |
Feb
(58) |
Mar
(71) |
Apr
(37) |
May
(37) |
Jun
(46) |
Jul
(74) |
Aug
(26) |
Sep
(55) |
Oct
(43) |
Nov
(58) |
Dec
(34) |
| 2026 |
Jan
(106) |
Feb
(61) |
Mar
(48) |
Apr
(82) |
May
(78) |
Jun
(100) |
Jul
(96) |
Aug
(170) |
Sep
(123) |
Oct
(52) |
Nov
|
Dec
|
|
From: <ms...@us...> - 2003-08-05 15:58:43
|
Update of /cvsroot/emc/emc/src/emcnml
In directory sc8-pr-cvs1:/tmp/cvs-serv778
Modified Files:
emc.cc
Log Message:
replace my hand edited emc.cc with one made by the CodeGen utility
Index: emc.cc
===================================================================
RCS file: /cvsroot/emc/emc/src/emcnml/emc.cc,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** emc.cc 21 Jul 2003 02:51:34 -0000 1.29
--- emc.cc 5 Aug 2003 15:35:29 -0000 1.30
***************
*** 18,23 ****
--- 18,27 ----
void PmCartesian_update(CMS *cms, PmCartesian *x);
void initialize_PmCartesian(PmCartesian *x);
+ void CMS_DATE_TIME_update(CMS *cms, CMS_DATE_TIME *x);
+ void initialize_CMS_DATE_TIME(CMS_DATE_TIME *x);
void CANON_VECTOR_update(CMS *cms, CANON_VECTOR *x);
void initialize_CANON_TOOL_TABLE(CANON_TOOL_TABLE *x);
+ void CMS_DURATION_update(CMS *cms, CMS_DURATION *x);
+ void initialize_CMS_DURATION(CMS_DURATION *x);
void initialize_EmcPose(EmcPose *x);
[...3650 lines suppressed...]
- * NML/CMS Update function for EMC_AXIS_SET_STEP_PARAMS
- * Manually generated by Matt Shaver.
- * on Fri Jul 18 19:25:01-27/64 EDT 2003
- */
- void EMC_AXIS_SET_STEP_PARAMS::update(CMS *cms)
- {
-
- cms->beginClass("EMC_AXIS_SET_STEP_PARAMS","EMC_AXIS_CMD_MSG");
-
- cms->beginBaseClass("EMC_AXIS_CMD_MSG");
- EMC_AXIS_CMD_MSG::update(cms);
- cms->endBaseClass("EMC_AXIS_CMD_MSG");
-
- cms->update_with_name("setup_time",setup_time);
- cms->update_with_name("hold_time",hold_time);
-
- cms->endClass("EMC_AXIS_SET_STEP_PARAMS","EMC_AXIS_CMD_MSG");
}
--- 5671,5674 ----
|
|
From: <jmk...@us...> - 2003-08-05 03:51:04
|
Update of /cvsroot/emc/rtapi/examples/timertask In directory sc8-pr-cvs1:/tmp/cvs-serv18267/examples/timertask Modified Files: Makefile Log Message: minor tweaks, all examples work except for a fifo overflow bug under rtai Index: Makefile =================================================================== RCS file: /cvsroot/emc/rtapi/examples/timertask/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 19 Jul 2003 02:17:41 -0000 1.2 --- Makefile 5 Aug 2003 03:51:00 -0000 1.3 *************** *** 32,33 **** --- 32,36 ---- # DO NOT DELETE + + /home/John/emcdev/rtapi/rtlib/timertask.o: /home/John/emcdev/rtapi/include/rtapi.h + /home/John/emcdev/rtapi/rtlib/timertask.o: /home/John/emcdev/rtapi/include/rtapi_app.h |
|
From: <jmk...@us...> - 2003-08-05 03:51:04
|
Update of /cvsroot/emc/rtapi/examples/shmem In directory sc8-pr-cvs1:/tmp/cvs-serv18267/examples/shmem Modified Files: Makefile Log Message: minor tweaks, all examples work except for a fifo overflow bug under rtai Index: Makefile =================================================================== RCS file: /cvsroot/emc/rtapi/examples/shmem/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 19 Jul 2003 02:17:41 -0000 1.2 --- Makefile 5 Aug 2003 03:51:00 -0000 1.3 *************** *** 50,56 **** --- 50,62 ---- # DO NOT DELETE + /home/John/emcdev/rtapi/lib/shmemtask.o: /home/John/emcdev/rtapi/include/rtapi.h + /home/John/emcdev/rtapi/lib/shmemtask.o: /home/John/emcdev/rtapi/include/rtapi_app.h /home/John/emcdev/rtapi/lib/shmemtask.o: common.h + /home/John/emcdev/rtapi/lib/shmemusr.o: /home/John/emcdev/rtapi/include/ulapi.h /home/John/emcdev/rtapi/lib/shmemusr.o: common.h + /home/John/emcdev/rtapi/rtlib/shmemtask.o: /home/John/emcdev/rtapi/include/rtapi.h + /home/John/emcdev/rtapi/rtlib/shmemtask.o: /home/John/emcdev/rtapi/include/rtapi_app.h /home/John/emcdev/rtapi/rtlib/shmemtask.o: common.h + /home/John/emcdev/rtapi/rtlib/shmemusr.o: /home/John/emcdev/rtapi/include/ulapi.h /home/John/emcdev/rtapi/rtlib/shmemusr.o: common.h |
|
From: <jmk...@us...> - 2003-08-05 03:51:04
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv18267/src/rtapi
Modified Files:
rtai_rtapi.c rtapi.h rtl_rtapi.c rtl_ulapi.c ulapi.h
Log Message:
minor tweaks, all examples work except for a fifo overflow bug under rtai
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** rtai_rtapi.c 4 Aug 2003 06:00:25 -0000 1.12
--- rtai_rtapi.c 5 Aug 2003 03:51:00 -0000 1.13
***************
*** 153,157 ****
}
if (timer_running != 0 ) {
! rt_free_timer();
}
rtapi_print("RTAPI: Shutting down\n");
--- 153,157 ----
}
if (timer_running != 0 ) {
! stop_rt_timer();
}
rtapi_print("RTAPI: Shutting down\n");
***************
*** 173,176 ****
--- 173,185 ----
int rtapi_clock_set_period(unsigned long int nsecs)
{
+
+ /* limit to a maximum of 1 second (note that RTLinux only
+ allows 0.01 second, so for portability, callers should
+ always ask for 0.01 second or less */
+
+ if ( nsecs > 1000000000L ) {
+ return RTAPI_INVAL;
+ }
+
if ( VERBOSE ) {
rtapi_print ( "RTAPI: clock_set_period ( %ld )\n", nsecs );
***************
*** 178,182 ****
timer_running = 1;
rt_set_periodic_mode();
! return count2nano(start_rt_timer(nano2count((RTIME) nsecs)));
}
--- 187,192 ----
timer_running = 1;
rt_set_periodic_mode();
! start_rt_timer(nano2count((RTIME) nsecs));
! return RTAPI_SUCCESS;
}
Index: rtapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtapi.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** rtapi.h 4 Aug 2003 06:00:25 -0000 1.11
--- rtapi.h 5 Aug 2003 03:51:00 -0000 1.12
***************
*** 70,86 ****
* multiple realtime tasks in multiple kernel modules. Calling this *
* function after realtime tasks have been started may disrupt the *
! * tasks. Returns a negative error code on failure. On success, *
! * returns either 0, or if the RTOS supports it, the actual timer *
! * period in nanoseconds, (which may not be exactly what was requested *
! * due to hardware limitations). The upper limit for the timer period *
* may be as low as 0.01 seconds, so be sure to check for errors. */
-
- /* FIXME - the request is an unsigned long int, but the return value is
- an ordinary signed int. A request of 3,000,000,000 ( 3 secs) is a
- a legal unsigned number, but when returned as a signed int it will
- be negative, and look like an error to the caller. Possible solutions:
- 1) limit the argument to 1,000,000,000 (1 second), return INVAL if higher
- 2) don't return actual value, just return success or errorcode (as before)
- */
extern int rtapi_clock_set_period(unsigned long int nsecs);
--- 70,75 ----
* multiple realtime tasks in multiple kernel modules. Calling this *
* function after realtime tasks have been started may disrupt the *
! * tasks. Returns a status code. The upper limit for the timer period *
* may be as low as 0.01 seconds, so be sure to check for errors. */
extern int rtapi_clock_set_period(unsigned long int nsecs);
Index: rtl_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtl_rtapi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rtl_rtapi.c 4 Aug 2003 06:00:25 -0000 1.2
--- rtl_rtapi.c 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 207,213 ****
task, and instead get one that runs every 0.01 sec, with no
error codes or other way of detecting it. Stupid! To avoid
! this we check here to insure that the timer period is 0.01
! seconds or less. Note that you can still run tasks at slower
! rates, but the timer must run at least 100Hz. */
if ( nsecs > 10000000L ) {
return RTAPI_INVAL;
--- 207,214 ----
task, and instead get one that runs every 0.01 sec, with no
error codes or other way of detecting it. Stupid! To avoid
! this we only allow a timer period of 0.01 seconds or less.
! Note that you can still run tasks at slower rates, but the
! timer must run at least 100Hz. */
!
if ( nsecs > 10000000L ) {
return RTAPI_INVAL;
Index: rtl_ulapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtl_ulapi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** rtl_ulapi.c 4 Aug 2003 06:00:25 -0000 1.2
--- rtl_ulapi.c 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 90,98 ****
char keystr[KEYSTR_LEN];
/* validate shmemptr */
if (shmemptr == NULL) {
return ULAPI_INVAL;
}
!
/* alloc space for shmem structure */
shmem = malloc(sizeof(struct ulapi_shmem));
--- 90,99 ----
char keystr[KEYSTR_LEN];
+ printf ( "ulapi_shmem_new: entry\n" );
/* validate shmemptr */
if (shmemptr == NULL) {
return ULAPI_INVAL;
}
! printf ( "ulapi_shmem_new: pointer OK\n" );
/* alloc space for shmem structure */
shmem = malloc(sizeof(struct ulapi_shmem));
***************
*** 100,107 ****
--- 101,110 ----
return ULAPI_NOMEM;
}
+ printf ( "ulapi_shmem_new: allocated struct\n" );
/* convert key to a string */
genstr((unsigned int) key, keystr);
/* now get shared memory block from OS */
+ printf ( "ulapi_shmem_new: converted key\n" );
shmem->mem = mbuff_alloc(keystr, size);
if (shmem->mem == NULL) {
***************
*** 109,112 ****
--- 112,116 ----
return ULAPI_NOMEM;
}
+ printf ( "ulapi_shmem_new: opened shmbuf\n" );
/* label as a valid shmem structure */
Index: ulapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/ulapi.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ulapi.h 19 Jul 2003 07:17:22 -0000 1.4
--- ulapi.h 5 Aug 2003 03:51:00 -0000 1.5
***************
*** 9,15 ****
#define ULAPI_BADH -2 /* bad task, shmem, sem, or fifo handle */
#define ULAPI_INVAL -3 /* invalid argument*/
! #define ULAPI_NOMEM -5 /* not enough memory */
! #define ULAPI_PERM -6 /* permission denied */
! #define ULAPI_BUSY -4 /* resource is busy or locked */
#define ULAPI_NOTFND -7 /* object not found */
#define ULAPI_FAIL -8 /* operation failed */
--- 9,15 ----
#define ULAPI_BADH -2 /* bad task, shmem, sem, or fifo handle */
#define ULAPI_INVAL -3 /* invalid argument*/
! #define ULAPI_NOMEM -4 /* not enough memory */
! #define ULAPI_PERM -5 /* permission denied */
! #define ULAPI_BUSY -6 /* resource is busy or locked */
#define ULAPI_NOTFND -7 /* object not found */
#define ULAPI_FAIL -8 /* operation failed */
|
|
From: <jmk...@us...> - 2003-08-05 03:51:03
|
Update of /cvsroot/emc/rtapi/examples/semaphore
In directory sc8-pr-cvs1:/tmp/cvs-serv18267/examples/semaphore
Modified Files:
Makefile master.c slave.c
Log Message:
minor tweaks, all examples work except for a fifo overflow bug under rtai
Index: Makefile
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/semaphore/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile 19 Jul 2003 02:17:41 -0000 1.2
--- Makefile 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 43,46 ****
--- 43,50 ----
# DO NOT DELETE
+ /home/John/emcdev/rtapi/rtlib/master.o: /home/John/emcdev/rtapi/include/rtapi.h
+ /home/John/emcdev/rtapi/rtlib/master.o: /home/John/emcdev/rtapi/include/rtapi_app.h
/home/John/emcdev/rtapi/rtlib/master.o: common.h
+ /home/John/emcdev/rtapi/rtlib/slave.o: /home/John/emcdev/rtapi/include/rtapi.h
+ /home/John/emcdev/rtapi/rtlib/slave.o: /home/John/emcdev/rtapi/include/rtapi_app.h
/home/John/emcdev/rtapi/rtlib/slave.o: common.h
Index: master.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/semaphore/master.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** master.c 4 Aug 2003 06:00:25 -0000 1.4
--- master.c 5 Aug 2003 03:51:00 -0000 1.5
***************
*** 14,18 ****
rtapi_task_handle master_task; /* the task structure */
static unsigned int master_count = 0;
! enum { MASTER_PERIOD_NSEC = 1000000 }; /* timer period, in nanoseconds */
enum { MASTER_STACKSIZE = 1024 }; /* how big the stack is */
--- 14,19 ----
rtapi_task_handle master_task; /* the task structure */
static unsigned int master_count = 0;
! enum { TIMER_PERIOD_NSEC = 10000000 }; /* timer period, in nanoseconds */
! enum { MASTER_PERIOD_NSEC = 1000000000 }; /* timer period, in nanoseconds */
enum { MASTER_STACKSIZE = 1024 }; /* how big the stack is */
***************
*** 21,24 ****
--- 22,26 ----
{
while (1) {
+ rtapi_print ( "master: giving semaphore, count = %d\n", master_count );
rtapi_sem_give(master_sem);
master_count++;
***************
*** 49,53 ****
/* set the base timer period */
! retval = rtapi_clock_set_period(MASTER_PERIOD_NSEC);
if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "sem master init: rtapi_clock_set_period returned %d\n", retval );
--- 51,55 ----
/* set the base timer period */
! retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "sem master init: rtapi_clock_set_period returned %d\n", retval );
Index: slave.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/semaphore/slave.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** slave.c 23 Jul 2003 01:22:49 -0000 1.2
--- slave.c 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 21,24 ****
--- 21,25 ----
rtapi_sem_take(master_sem);
slave_count++;
+ rtapi_print ( "slave: got sem, count = %d\n", slave_count );
}
|
|
From: <jmk...@us...> - 2003-08-05 03:51:03
|
Update of /cvsroot/emc/rtapi/examples/extint
In directory sc8-pr-cvs1:/tmp/cvs-serv18267/examples/extint
Modified Files:
Makefile extint.c
Log Message:
minor tweaks, all examples work except for a fifo overflow bug under rtai
Index: Makefile
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/extint/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile 19 Jul 2003 02:17:41 -0000 1.2
--- Makefile 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 32,33 ****
--- 32,36 ----
# DO NOT DELETE
+
+ /home/John/emcdev/rtapi/rtlib/extint.o: /home/John/emcdev/rtapi/include/rtapi.h
+ /home/John/emcdev/rtapi/rtlib/extint.o: /home/John/emcdev/rtapi/include/rtapi_app.h
Index: extint.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/extint/extint.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** extint.c 23 Jul 2003 01:22:49 -0000 1.2
--- extint.c 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 27,35 ****
int retval;
- /*
- if (0 != rtapi_app_init()) {
- return -1;
- }*/
-
/* set up ISR */
retval = rtapi_free_interrupt_handler(PARPORT_IRQ);
--- 27,30 ----
|
|
From: <jmk...@us...> - 2003-08-05 03:51:03
|
Update of /cvsroot/emc/rtapi/examples/fifo
In directory sc8-pr-cvs1:/tmp/cvs-serv18267/examples/fifo
Modified Files:
Makefile fifotask.c
Log Message:
minor tweaks, all examples work except for a fifo overflow bug under rtai
Index: Makefile
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/fifo/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile 19 Jul 2003 02:17:41 -0000 1.2
--- Makefile 5 Aug 2003 03:51:00 -0000 1.3
***************
*** 50,56 ****
--- 50,62 ----
# DO NOT DELETE
+ /home/John/emcdev/rtapi/lib/fifotask.o: /home/John/emcdev/rtapi/include/rtapi.h
+ /home/John/emcdev/rtapi/lib/fifotask.o: /home/John/emcdev/rtapi/include/rtapi_app.h
/home/John/emcdev/rtapi/lib/fifotask.o: common.h
+ /home/John/emcdev/rtapi/lib/fifousr.o: /home/John/emcdev/rtapi/include/ulapi.h
/home/John/emcdev/rtapi/lib/fifousr.o: common.h
+ /home/John/emcdev/rtapi/rtlib/fifotask.o: /home/John/emcdev/rtapi/include/rtapi.h
+ /home/John/emcdev/rtapi/rtlib/fifotask.o: /home/John/emcdev/rtapi/include/rtapi_app.h
/home/John/emcdev/rtapi/rtlib/fifotask.o: common.h
+ /home/John/emcdev/rtapi/rtlib/fifousr.o: /home/John/emcdev/rtapi/include/ulapi.h
/home/John/emcdev/rtapi/rtlib/fifousr.o: common.h
Index: fifotask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/fifo/fifotask.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** fifotask.c 4 Aug 2003 06:00:24 -0000 1.7
--- fifotask.c 5 Aug 2003 03:51:00 -0000 1.8
***************
*** 11,14 ****
--- 11,15 ----
static rtapi_task_handle fifo_task = 0; /* the task structure */
static rtapi_fifo_handle fifo;
+ enum { TIMER_PERIOD_NSEC = 10000000 }; /* timer period, in nanoseconds */
enum { FIFO_PERIOD_NSEC = 1000000000 }; /* timer period, in nanoseconds */
enum { FIFO_STACKSIZE = 1024 }; /* how big the stack is */
***************
*** 52,56 ****
/* set the base timer period */
! retval = rtapi_clock_set_period(FIFO_PERIOD_NSEC);
if (retval != RTAPI_SUCCESS) {
rtapi_print("fifotask init: rtapi_clock_set_period returned %d\n", retval);
--- 53,57 ----
/* set the base timer period */
! retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
if (retval != RTAPI_SUCCESS) {
rtapi_print("fifotask init: rtapi_clock_set_period returned %d\n", retval);
|
|
From: <jmk...@us...> - 2003-08-05 03:51:03
|
Update of /cvsroot/emc/rtapi In directory sc8-pr-cvs1:/tmp/cvs-serv18267 Modified Files: README Log Message: minor tweaks, all examples work except for a fifo overflow bug under rtai Index: README =================================================================== RCS file: /cvsroot/emc/rtapi/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** README 4 Aug 2003 06:00:24 -0000 1.2 --- README 5 Aug 2003 03:51:00 -0000 1.3 *************** *** 34,51 **** To run the examples: ! 1. Load the RT Linux functions: ! ./install_realtime_base ! 2. Load the real-time API functions: ! (NOTE: This has been added to the install_realtime_base script, ! so you can skip it and go straight to step 3) ! /sbin/insmod rtlib/rtl_rtapi.o ! or ! /sbin/insmod rtlib/rtai_rtapi.o ! depending upon which version of RT Linux you have. 3. Run the timer task example: --- 34,57 ---- To run the examples: ! 1. Open a shell window, and begin watching the kernel log: ! tail -f /var/log/messages ! leave this running, and go back to your original shell window ! 2. Load the RT Linux functions: ! Note: for this and most of the following steps you will need ! to be root. ! ./install_realtime_base ! See a number of messages pop up in the kernel log as components ! of the RTOS are installed... ! One of the last ones will be: ! ! <date> <time> <host> kernel: RTAPI: Initing ! ! This means that thertapi module (either rtl_rtapi.o or ! rtai_rtapi.o) is loaded. 3. Run the timer task example: *************** *** 53,68 **** /sbin/insmod rtlib/timertask.o Wait a few seconds, then remove the module: /sbin/rmmod timertask ! Look at the output in the kernel log: ! tail /var/log/messages ! Jun 18 10:50:14 rebozo kernel: timertask: started timer task ! Jun 18 10:50:18 rebozo kernel: timer task: timer count is 3251 ! You'll see that 3251 calls to the task were made. 4. Run the parallel port interrupt example: --- 59,89 ---- /sbin/insmod rtlib/timertask.o + A few messages will pop up in the kernel log as the task + is created and started: + + <date> <time> <host> kernel: RTAPI: clock_set_period ( 1000000 ) + <date> <time> <host> kernel: RTAPI: new_task c3ee3000, count = 1 + <date> <time> <host> kernel: RTAPI: start_task c3ee3000 + + c3ee3000 is the task handle, and will vary. + You'll also see a message from the timertask module... + + <date> <time> <host> kernel: timertask init: started timer task + Wait a few seconds, then remove the module: /sbin/rmmod timertask ! A couple more messages from rtapi: ! <date> <time> <host> kernel: RTAPI: stop_task c3ee3000 ! <date> <time> <host> kernel: RTAPI: delete_task c3ee3000, count = 0 ! And one from timertask: ! <date> <time> <host> kernel: timertask exit: timer count is 8174 ! ! This means that 8174 calls to the task were made. (I let it ! run for about 8 seconds.) 4. Run the parallel port interrupt example: *************** *** 74,83 **** /sbin/rmmod extint - tail /var/log/messages ! Jun 18 10:52:14 rebozo kernel: extint: interrupt count is 2522 ! 2,522 interrupts occurred, many for a single short of pin 10 due to ! contact noise. 5. Run the shared memory example: --- 95,106 ---- /sbin/rmmod extint ! Again, you'll get messages from RTAPI, and one from the ! extint module: ! <date> <time> <host> kernel: extint: interrupt count is 2522 ! ! This means 2,522 interrupts occurred, many for a single short ! of pin 10 due to contact noise. 5. Run the shared memory example: *************** *** 88,91 **** --- 111,175 ---- See the shared memory heartbeat incrementing. + Use crtl-C to break out of shmemusr. + Then remove the realtime task + + /sbin/rmmod shmemtask + + 6. Run the semaphore example: + + /sbin/insmod rtlib/master.o + + The master task will start giving the semaphore once per + second, printing to the log when it does. + + /sbin/insmod rtlib/slave.o + + The slave attempts to get the semaphore, and prints each + time it succeeds. Since the master has already given the + semaphore several times, and it is a counting semaphore, + the slave will run several times in a row. Once it catches + up with the master, it will run right after the master runs. + Stop the tasks in reverse order: + + /sbin/rmmod slave + /sbin/rmmod master + + 7. Run the FIFO example: + + /sbin/insmod rtlib/fifotask.o + + The realtime fifotask will begin writing strings to the + fifo once per second, and echoing the strings to the log + file. + + bin/fifousr + + The user mode program will read strings from the fifo and + and print them out. + + Use ctrl-c to exit fifousr, and stop the task: + + /sbin/rmmod fifotask + + + 8. More elaborate tests: + + In theory, you should be able to run any or all of the + above tests at the same time, doing insmod's and rmmod's + in any order. (Note - the semaphore master task must + always be installed before and removed after the slave + task.) + + 9. Shutting down. + + To remove the rtapi and the rest of the RTOS modules: + + ./remove_realtime_base + + If any tasks are still running, the script should print + the module names and refuse to procede. Shut down the + modules (rmmod) and try again. + + The Uninstall Process |
|
From: <jmk...@us...> - 2003-08-04 06:00:28
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv30223/src/rtapi
Modified Files:
rtai_rtapi.c rtapi.h rtl_rtapi.c rtl_ulapi.c sim_rtapi.c
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** rtai_rtapi.c 3 Aug 2003 02:41:44 -0000 1.11
--- rtai_rtapi.c 4 Aug 2003 06:00:25 -0000 1.12
***************
*** 291,294 ****
--- 291,298 ----
}
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: start_task %p\n", task );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 311,314 ****
--- 315,322 ----
return RTAPI_FAIL;
}
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: stop_task %p\n", task );
+ }
+
return RTAPI_SUCCESS;
}
Index: rtapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtapi.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rtapi.h 3 Aug 2003 02:41:44 -0000 1.10
--- rtapi.h 4 Aug 2003 06:00:25 -0000 1.11
***************
*** 1,3 ****
! #ifndef RTAPI_H
#define RTAPI_H
--- 1,3 ----
! #ifndef RTAPI__H
#define RTAPI_H
***************
*** 73,77 ****
* returns either 0, or if the RTOS supports it, the actual timer *
* period in nanoseconds, (which may not be exactly what was requested *
! * due to hardware limitations). */
/* FIXME - the request is an unsigned long int, but the return value is
--- 73,78 ----
* returns either 0, or if the RTOS supports it, the actual timer *
* period in nanoseconds, (which may not be exactly what was requested *
! * due to hardware limitations). The upper limit for the timer period *
! * may be as low as 0.01 seconds, so be sure to check for errors. */
/* FIXME - the request is an unsigned long int, but the return value is
Index: rtl_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtl_rtapi.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rtl_rtapi.c 8 Jul 2003 15:54:38 -0000 1.1.1.1
--- rtl_rtapi.c 4 Aug 2003 06:00:25 -0000 1.2
***************
*** 2,12 ****
rtl_rtapi.c
! Implementations of RT API functions declared in rtapi.h, for RTL
*/
#include <stdarg.h> /* va_* */
#include <linux/module.h>
! #include <linux/kernel.h> /* vsprintf() */
! #include <linux/malloc.h> /* kmalloc(), kfree(), GFP_USER */
#include <rtl.h> /* top level config */
[...1274 lines suppressed...]
!
! int rtapi_fifo_write(rtapi_fifo_handle fifo, char *buf,
! unsigned long int size)
{
! int retval;
!
! /* validate fifo handle */
! if (fifo == NULL) {
! return RTAPI_BADH;
! }
! if (fifo->magic != FIFO_MAGIC) {
! return RTAPI_BADH;
! }
! /* get whatever data is available */
! retval = rtf_put(fifo->fd, buf, size);
! if (retval < 0) {
! return RTAPI_INVAL;
! }
! return retval;
}
Index: rtl_ulapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtl_ulapi.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** rtl_ulapi.c 8 Jul 2003 15:54:38 -0000 1.1.1.1
--- rtl_ulapi.c 4 Aug 2003 06:00:25 -0000 1.2
***************
*** 1,29 ****
/*
! rtl_ulapi.c
Implementation of user-level API to RTL modules
*/
-
#include <stdio.h> /* sprintf() */
#include <stddef.h> /* size_t, needed by mbuff.h */
#include <fcntl.h> /* O_RDWR */
#include <unistd.h> /* open(), close() */
#include "mbuff.h"
#include "ulapi.h"
int ulapi_init(void)
{
! return 0;
}
int ulapi_exit(void)
{
! return 0;
}
/*
genstr() generates a string 'str' unique for unsigned integers 'i',
as the reverse, e.g., 120 -> "012", -1 -> "5927694924"
*/
static void genstr(unsigned int i, char *str)
{
--- 1,66 ----
/*
! rtai_ulapi.c
Implementation of user-level API to RTL modules
*/
#include <stdio.h> /* sprintf() */
#include <stddef.h> /* size_t, needed by mbuff.h */
#include <fcntl.h> /* O_RDWR */
#include <unistd.h> /* open(), close() */
+ #include <malloc.h> /* malloc(), free() */
#include "mbuff.h"
#include "ulapi.h"
+
+ /* These structs hold data associated with objects like tasks, etc. */
+ /* Task handles are pointers to these structs. */
+
+ struct ulapi_shmem {
+ int magic; /* to check for valid handle */
+ int key; /* key to shared memory area */
+ unsigned long int size; /* size of shared memory area */
+ void *mem; /* pointer to the memory */
+ };
+
+ struct ulapi_fifo {
+ int magic; /* to check for valid handle */
+ int key; /* key to fifo */
+ int fd; /* file descripter for fifo */
+ int mode; /* O_RDONLY or O_WRONLY */
+ unsigned long int size; /* size of fifo area */
+ };
+
+
+ #define SHMEM_MAGIC 25453 /* random numbers used as signatures */
+ #define FIFO_MAGIC 10293
+
+
int ulapi_init(void)
{
! /* does nothing, for now */
! return ULAPI_SUCCESS;
}
+
int ulapi_exit(void)
{
! /* does nothing, for now */
! return ULAPI_SUCCESS;
}
/*
+ RTAPI uses integers as keys, since these can be mapped onto either
+ integers or strings easily, whereas the reverse is not true: you can't
+ map an arbitrary string to an integer uniquely. Since mbuff takes
+ string keys, we need to convert them to some unique string using genstr().
+ */
+
+ /*
genstr() generates a string 'str' unique for unsigned integers 'i',
as the reverse, e.g., 120 -> "012", -1 -> "5927694924"
*/
+
+ #define KEYSTR_LEN 16 /* larger than number of digits in MAX_INT */
+
static void genstr(unsigned int i, char *str)
{
***************
*** 48,110 ****
}
! #define KEYSTR_LEN 16 /* larger than number of digits in MAX_INT */
!
! /*
! RTAPI uses integers as keys, since these can be mapped onto either
! integers or strings easily, whereas the reverse is not true: you can't
! map an arbitrary string to an integer uniquely. Since mbuff takes
! string keys, we need to convert them to some unique string using genstr().
! */
!
! int ulapi_alloc_shmem(int key, unsigned int size, int *id, void **ptr)
{
char keystr[KEYSTR_LEN];
genstr((unsigned int) key, keystr);
! *ptr = mbuff_alloc(keystr, size);
! /* leave id alone; we don't use it */
! if (0 != *ptr) {
! return 0;
}
- return -1;
}
! int ulapi_free_shmem(int key, unsigned int size, int id, const void *ptr)
{
char keystr[KEYSTR_LEN];
! genstr((unsigned int) key, keystr);
! mbuff_free(keystr, (void *) ptr);
! return 0;
}
! int ulapi_fifo_new(int key, int *fd, unsigned long int size)
{
enum { DEVSTR_LEN = 256 };
char devstr[DEVSTR_LEN];
sprintf(devstr, "/dev/rtf%d", key);
- *fd = open(devstr, O_RDONLY);
! return *fd;
}
! int ulapi_fifo_delete(int key, int fd, unsigned long int size)
{
! return close(fd);
}
! int ulapi_fifo_write(int fd, char *buf, unsigned long int size)
{
! return write(fd, buf, size);
}
! int ulapi_fifo_read(int fd, char *buf, unsigned long int size)
{
! return read(fd, buf, size);
}
--- 85,282 ----
}
! int ulapi_shmem_new(int key, unsigned int size, ulapi_shmem_handle * shmemptr)
{
+ ulapi_shmem_handle shmem;
char keystr[KEYSTR_LEN];
+ /* validate shmemptr */
+ if (shmemptr == NULL) {
+ return ULAPI_INVAL;
+ }
+
+ /* alloc space for shmem structure */
+ shmem = malloc(sizeof(struct ulapi_shmem));
+ if (shmem == NULL) {
+ return ULAPI_NOMEM;
+ }
+
+ /* convert key to a string */
genstr((unsigned int) key, keystr);
+ /* now get shared memory block from OS */
+ shmem->mem = mbuff_alloc(keystr, size);
+ if (shmem->mem == NULL) {
+ free(shmem);
+ return ULAPI_NOMEM;
+ }
! /* label as a valid shmem structure */
! shmem->magic = SHMEM_MAGIC;
! /* fill in the other fields */
! shmem->size = size;
! shmem->key = key;
! /* return handle to the caller */
! *shmemptr = shmem;
! return ULAPI_SUCCESS;
! }
!
!
! int ulapi_shmem_getptr(ulapi_shmem_handle shmem, void **ptr)
! {
! /* validate shmem handle */
! if (shmem == NULL) {
! return ULAPI_BADH;
}
+ if (shmem->magic != SHMEM_MAGIC) {
+ return ULAPI_BADH;
+ }
+ /* pass memory address back to caller */
+ *ptr = shmem->mem;
+ return ULAPI_SUCCESS;
}
!
! int ulapi_shmem_delete(ulapi_shmem_handle shmem)
{
char keystr[KEYSTR_LEN];
! /* validate shmem handle */
! if (shmem == NULL) {
! return ULAPI_BADH;
! }
! if (shmem->magic != SHMEM_MAGIC) {
! return ULAPI_BADH;
! }
! /* convert key to a string */
! genstr((unsigned int) shmem->key, keystr);
! /* free the shared memory */
! mbuff_free(keystr, (void *) shmem->mem);
!
! /* free the shmem structure */
! shmem->magic = 0;
! free(shmem);
! return ULAPI_SUCCESS;
}
! int ulapi_fifo_new(int key, unsigned long int size, char mode,
! ulapi_fifo_handle * fifoptr)
{
+ ulapi_fifo_handle fifo;
+ int retval, flags;
enum { DEVSTR_LEN = 256 };
char devstr[DEVSTR_LEN];
+ /* validate fifoptr */
+ if (fifoptr == NULL) {
+ return ULAPI_INVAL;
+ }
+ /* alloc space for fifo structure */
+ fifo = malloc(sizeof(struct ulapi_fifo));
+ if (fifo == NULL) {
+ return ULAPI_NOMEM;
+ }
+ /* determine system name for fifo */
sprintf(devstr, "/dev/rtf%d", key);
! /* determine mode for fifo */
! if (mode == 'R') {
! flags = O_RDONLY;
! } else {
! if (mode == 'W') {
! flags = O_WRONLY;
! }
!
! else {
! return ULAPI_INVAL;
! }
! }
! /* open the fifo */
! retval = open(devstr, flags);
! if (retval < 0) {
! /* open failed */
! free(fifo);
! return ULAPI_NOTFND;
! }
!
! /* label as a valid fifo structure */
! fifo->magic = FIFO_MAGIC;
! /* fill in the rest of the struct */
! fifo->key = key;
! fifo->fd = retval;
! fifo->mode = flags;
!
! /* return handle to the caller */
! *fifoptr = fifo;
! return ULAPI_SUCCESS;
}
!
! int ulapi_fifo_delete(ulapi_fifo_handle fifo)
{
! /* validate fifo handle */
! if (fifo == NULL) {
! return ULAPI_BADH;
! }
! if (fifo->magic != FIFO_MAGIC) {
! return ULAPI_BADH;
! }
! /* close the fifo */
! if (close(fifo->fd) < 0) {
! return ULAPI_NOTFND;
! }
! /* free the fifo structure */
! fifo->magic = 0;
! free(fifo);
! return ULAPI_SUCCESS;
!
}
! int ulapi_fifo_read(ulapi_fifo_handle fifo, char *buf, unsigned long int size)
{
! int retval;
!
! /* validate fifo handle */
! if (fifo == NULL) {
! return ULAPI_BADH;
! }
! if (fifo->magic != FIFO_MAGIC) {
! return ULAPI_BADH;
! }
! if (fifo->mode != O_RDONLY) {
! return ULAPI_UNSUP;
! }
! /* get whatever data is available */
! retval = read(fifo->fd, buf, size);
! if (retval < 0) {
! return ULAPI_FAIL;
! }
! return retval;
!
}
! int ulapi_fifo_write(ulapi_fifo_handle fifo,
! char *buf, unsigned long int size)
{
! int retval;
!
! /* validate fifo handle */
! if (fifo == NULL) {
! return ULAPI_BADH;
! }
! if (fifo->magic != FIFO_MAGIC) {
! return ULAPI_BADH;
! }
! if (fifo->mode != O_WRONLY) {
! return ULAPI_UNSUP;
! }
!
! /* get whatever data is available */
! retval = write(fifo->fd, buf, size);
! if (retval < 0) {
! return ULAPI_FAIL;
! }
! return retval;
}
Index: sim_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/sim_rtapi.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sim_rtapi.c 22 Jul 2003 17:20:22 -0000 1.4
--- sim_rtapi.c 4 Aug 2003 06:00:25 -0000 1.5
***************
*** 200,203 ****
--- 200,205 ----
/* create the thread - use the wrapper function, pass it a pointer
to the task structure so it can call the actual task function */
+ task->taskcode = taskcode;
+ task->arg = arg;
retval = pthread_create( &(task->id), &attr, wrapper, (void *)task );
if ( retval != 0 )
|
|
From: <jmk...@us...> - 2003-08-04 06:00:28
|
Update of /cvsroot/emc/rtapi/examples/timertask
In directory sc8-pr-cvs1:/tmp/cvs-serv30223/examples/timertask
Modified Files:
timertask.c
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: timertask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/timertask/timertask.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** timertask.c 2 Aug 2003 19:37:18 -0000 1.5
--- timertask.c 4 Aug 2003 06:00:25 -0000 1.6
***************
*** 11,20 ****
static rtapi_task_handle timer_task; /* the task */
static int timer_count = 0; /* the output variable */
! enum { TIMER_PERIOD_NSEC = 1000000 }; /* timer period, in nanoseconds */
enum { TIMER_STACKSIZE = 1024 }; /* how big the stack is */
static void timer_code( int arg )
{
while (1) {
/* a simple counter... */
timer_count++;
--- 11,23 ----
static rtapi_task_handle timer_task; /* the task */
static int timer_count = 0; /* the output variable */
! enum { TIMER_PERIOD_NSEC = 1000000 }; /* timer period, in nanoseconds */
! enum { TASK_PERIOD_NSEC = 1000000 }; /* task period, in nanoseconds */
enum { TIMER_STACKSIZE = 1024 }; /* how big the stack is */
static void timer_code( int arg )
{
+
while (1) {
+
/* a simple counter... */
timer_count++;
***************
*** 42,46 ****
/* set the base timer period */
retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
! rtapi_print( "timertask init: rtapi_clock_set_period returned %d\n", retval );
/* set the task priority to lowest, since we only have one task */
--- 45,53 ----
/* set the base timer period */
retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
! if ( retval != RTAPI_SUCCESS ) {
! /* See rtapi.h for the error codes returned */
! rtapi_print( "timertask init: rtapi_clock_set_period returned %d\n", retval );
! return -1;
! }
/* set the task priority to lowest, since we only have one task */
***************
*** 50,56 ****
/* the address of the pointer needs to be passed rather than it's value */
retval = rtapi_task_new( &timer_task );
if ( retval != RTAPI_SUCCESS ) {
/* See rtapi.h for the error codes returned */
- rtapi_print( "timertask init: rtapi_task_new returned %d\n", retval );
return -1;
}
--- 57,63 ----
/* the address of the pointer needs to be passed rather than it's value */
retval = rtapi_task_new( &timer_task );
+
if ( retval != RTAPI_SUCCESS ) {
/* See rtapi.h for the error codes returned */
return -1;
}
***************
*** 58,65 ****
/* the third arg is an abitrary int that is passed to the timer task
on the first iterration */
retval = rtapi_task_start( timer_task, timer_code,
0, timer_prio,
TIMER_STACKSIZE,
! TIMER_PERIOD_NSEC, RTAPI_NO_FP );
if ( retval != RTAPI_SUCCESS ) {
rtapi_print("timertask init: rtapi_task_start returned %d\n", retval );
--- 65,73 ----
/* the third arg is an abitrary int that is passed to the timer task
on the first iterration */
+
retval = rtapi_task_start( timer_task, timer_code,
0, timer_prio,
TIMER_STACKSIZE,
! TASK_PERIOD_NSEC, RTAPI_NO_FP );
if ( retval != RTAPI_SUCCESS ) {
rtapi_print("timertask init: rtapi_task_start returned %d\n", retval );
|
|
From: <jmk...@us...> - 2003-08-04 06:00:27
|
Update of /cvsroot/emc/rtapi/examples/shmem
In directory sc8-pr-cvs1:/tmp/cvs-serv30223/examples/shmem
Modified Files:
shmemtask.c
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: shmemtask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/shmem/shmemtask.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** shmemtask.c 2 Aug 2003 19:37:18 -0000 1.3
--- shmemtask.c 4 Aug 2003 06:00:25 -0000 1.4
***************
*** 58,62 ****
--- 58,65 ----
/* set the base timer period */
retval = rtapi_clock_set_period(SHMEM_PERIOD_NSEC);
+ if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "shmemtask init: rtapi_clock_set_period returned %d\n", retval );
+ return -1;
+ }
/* set the task priority to lowest, since we only have one task */
|
|
From: <jmk...@us...> - 2003-08-04 06:00:27
|
Update of /cvsroot/emc/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv30223
Modified Files:
README remove_realtime_base
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: README
===================================================================
RCS file: /cvsroot/emc/rtapi/README,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** README 8 Jul 2003 15:54:38 -0000 1.1.1.1
--- README 4 Aug 2003 06:00:24 -0000 1.2
***************
*** 40,43 ****
--- 40,46 ----
2. Load the real-time API functions:
+ (NOTE: This has been added to the install_realtime_base script,
+ so you can skip it and go straight to step 3)
+
/sbin/insmod rtlib/rtl_rtapi.o
or
Index: remove_realtime_base
===================================================================
RCS file: /cvsroot/emc/rtapi/remove_realtime_base,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** remove_realtime_base 27 Jul 2003 15:56:43 -0000 1.2
--- remove_realtime_base 4 Aug 2003 06:00:24 -0000 1.3
***************
*** 5,9 ****
fi
! if [ -e /dev/rtai_shm ] ; then
/sbin/fuser -v /dev/rtai_shm 2>/dev/null && echo "Can't remove realtime modules, kill the above processes first". && exit 0
fi
--- 5,9 ----
fi
! if [ -e /dev/rtai_shm ] ; then
/sbin/fuser -v /dev/rtai_shm 2>/dev/null && echo "Can't remove realtime modules, kill the above processes first". && exit 0
fi
***************
*** 35,39 ****
fi
fi
-
# Get a list of currently installed modules.
--- 35,38 ----
|
|
From: <jmk...@us...> - 2003-08-04 06:00:27
|
Update of /cvsroot/emc/rtapi/examples/semaphore
In directory sc8-pr-cvs1:/tmp/cvs-serv30223/examples/semaphore
Modified Files:
master.c
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: master.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/semaphore/master.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** master.c 2 Aug 2003 19:37:17 -0000 1.3
--- master.c 4 Aug 2003 06:00:25 -0000 1.4
***************
*** 50,54 ****
--- 50,57 ----
/* set the base timer period */
retval = rtapi_clock_set_period(MASTER_PERIOD_NSEC);
+ if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "sem master init: rtapi_clock_set_period returned %d\n", retval );
+ return -1;
+ }
/* set the task priority to one above the lowest; the slave
|
|
From: <jmk...@us...> - 2003-08-04 06:00:27
|
Update of /cvsroot/emc/rtapi/examples/fifo
In directory sc8-pr-cvs1:/tmp/cvs-serv30223/examples/fifo
Modified Files:
fifotask.c
Log Message:
RTLinux version now uses new API, everything builds, only timertask is tested
Index: fifotask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/fifo/fifotask.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** fifotask.c 3 Aug 2003 02:41:44 -0000 1.6
--- fifotask.c 4 Aug 2003 06:00:24 -0000 1.7
***************
*** 53,58 ****
/* set the base timer period */
retval = rtapi_clock_set_period(FIFO_PERIOD_NSEC);
! rtapi_print("fifotask init: rtapi_clock_set_period returned %d\n",
! retval);
/* set the task priority to lowest, since we only have one task */
--- 53,60 ----
/* set the base timer period */
retval = rtapi_clock_set_period(FIFO_PERIOD_NSEC);
! if (retval != RTAPI_SUCCESS) {
! rtapi_print("fifotask init: rtapi_clock_set_period returned %d\n", retval);
! return -1;
! }
/* set the task priority to lowest, since we only have one task */
|
|
From: <pa...@us...> - 2003-08-03 18:19:42
|
Update of /cvsroot/emc/emc/src/emcmot
In directory sc8-pr-cvs1:/tmp/cvs-serv24097
Modified Files:
emcstepmot.c
Log Message:
EMCMOT_SETUP_PARAMS added to the command handler to prevent iniaxis aborting
Index: emcstepmot.c
===================================================================
RCS file: /cvsroot/emc/emc/src/emcmot/emcstepmot.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** emcstepmot.c 7 May 2003 19:49:50 -0000 1.25
--- emcstepmot.c 3 Aug 2003 18:19:39 -0000 1.26
***************
*** 13,16 ****
--- 13,18 ----
Modification history:
+ 3-Aug-2003 P.C. Added Matt Shaver's EMCMOT_SETUP_PARAMS to the command
+ handler. Without it, iniaxis will abort and bring the whole run down.
14-Dec-2001 FMP set coarseJointPos[] to be the homed position at the
instant it homes. This was left out and caused a one-cycle setting of
***************
*** 991,994 ****
--- 993,1000 ----
break;
+ case EMCMOT_TELEOP:
+ /* Dummy entry to get rid of Comand 36 error.. */
+ break;
+
case EMCMOT_SET_NUM_AXES:
MARK_EMCMOT_CONFIG_CHANGE();
***************
*** 1875,1878 ****
--- 1881,1907 ----
break;
#endif /* ENABLE_PROBING */
+
+ case EMCMOT_SET_STEP_PARAMS:
+ MARK_EMCMOT_CONFIG_CHANGE();
+ /* configure the step pulse times */
+ axis = emcmotCommand->axis;
+ if (axis < 0 ||
+ axis >= EMCMOT_MAX_AXIS) {
+ break;
+ }
+
+ emcmotConfig->setup_time[axis] = emcmotCommand->setup_time;
+ emcmotConfig->hold_time[axis] = emcmotCommand->hold_time;
+ if (emcmotConfig->setup_time[axis] < 1.0)
+ {
+ emcmotConfig->setup_time[axis] = 1.0;
+ }
+
+ if (emcmotConfig->hold_time[axis] < 1.0)
+ {
+ emcmotConfig->hold_time[axis] = 1.0;
+ }
+ break;
+
default:
|
|
From: <jmk...@us...> - 2003-08-03 02:41:47
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv28730/src/rtapi
Modified Files:
rtai_rtapi.c rtapi.h
Log Message:
more tweaking of rtai_rtapi, added debugging printfs
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** rtai_rtapi.c 2 Aug 2003 23:30:43 -0000 1.10
--- rtai_rtapi.c 3 Aug 2003 02:41:44 -0000 1.11
***************
*** 8,15 ****
#include <linux/module.h>
#include <linux/kernel.h>
! /* FIXME - on my system malloc.h is deprecated, use slab.h instead */
! /* #include <linux/malloc.h> *//* kmalloc(), kfree(), GFP_USER */
! #include <linux/slab.h>
!
#include <rtai.h>
#include <rtai_sched.h>
--- 8,12 ----
#include <linux/module.h>
#include <linux/kernel.h>
! #include <linux/slab.h> /* replaces malloc.h in recent kernels */
#include <rtai.h>
#include <rtai_sched.h>
***************
*** 28,33 ****
--- 25,36 ----
#endif
+ /* declare vsprintf() explicitly instead of including all of <stdio.h>,
+ since we don't need all of it and it may cause problems */
+ extern int vsprintf(char *s, const char *format, va_list arg);
+
#include "rtapi.h" /* these decls */
+ /* set to 1/0 to enable/disable logging of task creation etc. */
+ #define VERBOSE 1
/* These structs hold data associated with objects like tasks, etc. */
***************
*** 63,72 ****
#define FIFO_MAGIC 10293
! /* Usage counter so that we don't kill the periodic timer too soon */
! static int usage_count = 0;
! /* declare vsprintf() explicitly instead of including all of <stdio.h>,
! since we don't need all of it and it may cause problems */
! extern int vsprintf(char *s, const char *format, va_list arg);
/* Priority functions. RTAI uses 0 as the highest priority, as the
--- 66,78 ----
#define FIFO_MAGIC 10293
! /* Usage counters to keep track of new/delete calls */
! static int task_usage_count = 0;
! static int shmem_usage_count = 0;
! static int sem_usage_count = 0;
! static int fifo_usage_count = 0;
! static int int_usage_count = 0;
! /* Flag used to keep track of timer state */
! static int timer_running = 0;
/* Priority functions. RTAI uses 0 as the highest priority, as the
***************
*** 117,121 ****
static int rtapi_init(void)
{
! rtapi_print("Initing RTAPI\n");
rt_linux_use_fpu(1);
return RTAPI_SUCCESS;
--- 123,133 ----
static int rtapi_init(void)
{
! rtapi_print("RTAPI: Initing\n");
! task_usage_count = 0;
! shmem_usage_count = 0;
! sem_usage_count = 0;
! fifo_usage_count = 0;
! int_usage_count = 0;
! timer_running = 0;
rt_linux_use_fpu(1);
return RTAPI_SUCCESS;
***************
*** 125,132 ****
static int rtapi_exit(void)
{
! if (usage_count != 0 ) {
! rtapi_print(" Warning, you have %d task handlers active", usage_count);
}
! rtapi_print("Removing RTAPI\n");
return RTAPI_SUCCESS;
}
--- 137,159 ----
static int rtapi_exit(void)
{
! if (task_usage_count != 0 ) {
! rtapi_print("RTAPI: ERROR: %d task(s) allocated but not deleted", task_usage_count);
}
! if (shmem_usage_count != 0 ) {
! rtapi_print("RTAPI: ERROR: %d shared memory block(s) allocated but not deleted", shmem_usage_count);
! }
! if (sem_usage_count != 0 ) {
! rtapi_print("RTAPI: ERROR: %d semaphores(s) allocated but not deleted", sem_usage_count);
! }
! if (fifo_usage_count != 0 ) {
! rtapi_print("RTAPI: ERROR: %d fifo(s) allocated but not deleted", fifo_usage_count);
! }
! if (int_usage_count != 0 ) {
! rtapi_print("RTAPI: ERROR: %d interrupt handler(s) installed but not removed", int_usage_count);
! }
! if (timer_running != 0 ) {
! rt_free_timer();
! }
! rtapi_print("RTAPI: Shutting down\n");
return RTAPI_SUCCESS;
}
***************
*** 146,149 ****
--- 173,180 ----
int rtapi_clock_set_period(unsigned long int nsecs)
{
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: clock_set_period ( %ld )\n", nsecs );
+ }
+ timer_running = 1;
rt_set_periodic_mode();
return count2nano(start_rt_timer(nano2count((RTIME) nsecs)));
***************
*** 176,180 ****
/* increment the usage counter */
! usage_count++;
return RTAPI_SUCCESS;
--- 207,215 ----
/* increment the usage counter */
! task_usage_count++;
!
! if ( VERBOSE ) {
! rtapi_print ( "RTAPI: new_task %p, count = %d\n", task, task_usage_count );
! }
return RTAPI_SUCCESS;
***************
*** 196,200 ****
/* decrement the usage counter */
! usage_count--;
return RTAPI_SUCCESS;
--- 231,239 ----
/* decrement the usage counter */
! task_usage_count--;
!
! if ( VERBOSE ) {
! rtapi_print ( "RTAPI: delete_task %p, count = %d\n", task, task_usage_count );
! }
return RTAPI_SUCCESS;
***************
*** 268,280 ****
}
- /* P.C.
- Added these lines to release the 8254 IRQ and stop the timer
- as it was causing a kernel panic after removing rtai_sched.
- */
-
- if (usage_count == 0) {
- rt_free_timer();
- }
-
retval = rt_task_delete(&(task->ostask));
if (retval != 0) {
--- 307,310 ----
***************
*** 413,416 ****
--- 443,454 ----
/* return handle to the caller */
*shmemptr = shmem;
+
+ /* increment the usage counter */
+ shmem_usage_count++;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: new_shmem %p, key = %d, count = %d\n", shmem, key, shmem_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 448,451 ****
--- 486,497 ----
shmem->magic = 0;
kfree(shmem);
+
+ /* decrement the usage counter */
+ shmem_usage_count--;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: delete_shmem %p, count = %d\n", shmem, shmem_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 492,495 ****
--- 538,549 ----
}
}
+
+ /* increment the usage counter */
+ int_usage_count++;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: assign_interrupt_handler for int %d, count = %d\n", irq, int_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 505,508 ****
--- 559,570 ----
return RTAPI_FAIL;
}
+
+ /* decrement the usage counter */
+ int_usage_count--;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: free_interrupt_handler for int %d, count = %d\n", irq, int_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 558,561 ****
--- 620,631 ----
/* return handle to the caller */
*semptr = sem;
+
+ /* increment the usage counter */
+ sem_usage_count++;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: new_sem %p, count = %d\n", sem, sem_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 577,580 ****
--- 647,658 ----
sem->magic = 0;
kfree(sem);
+
+ /* decrement the usage counter */
+ sem_usage_count--;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: delete_sem %p, count = %d\n", sem, sem_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 652,657 ****
/* create failed */
kfree(fifo);
- rtapi_print("rtapi_fifo_new: rtf_create ( %d, %d ) returned %d\n", key,
- size, retval);
if (retval == ENOMEM) {
/* couldn't allocate memory */
--- 730,733 ----
***************
*** 669,672 ****
--- 745,756 ----
/* return handle to the caller */
*fifoptr = fifo;
+
+ /* increment the usage counter */
+ fifo_usage_count++;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: new_fifo %p, count = %d\n", fifo, fifo_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
***************
*** 688,691 ****
--- 772,783 ----
fifo->magic = 0;
kfree(fifo);
+
+ /* decrement the usage counter */
+ fifo_usage_count--;
+
+ if ( VERBOSE ) {
+ rtapi_print ( "RTAPI: delete_fifo %p, count = %d\n", fifo, fifo_usage_count );
+ }
+
return RTAPI_SUCCESS;
}
Index: rtapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtapi.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rtapi.h 2 Aug 2003 19:37:18 -0000 1.9
--- rtapi.h 3 Aug 2003 02:41:44 -0000 1.10
***************
*** 70,74 ****
* multiple realtime tasks in multiple kernel modules. Calling this *
* function after realtime tasks have been started may disrupt the *
! * tasks. Returns a status code. */
extern int rtapi_clock_set_period(unsigned long int nsecs);
--- 70,85 ----
* multiple realtime tasks in multiple kernel modules. Calling this *
* function after realtime tasks have been started may disrupt the *
! * tasks. Returns a negative error code on failure. On success, *
! * returns either 0, or if the RTOS supports it, the actual timer *
! * period in nanoseconds, (which may not be exactly what was requested *
! * due to hardware limitations). */
!
! /* FIXME - the request is an unsigned long int, but the return value is
! an ordinary signed int. A request of 3,000,000,000 ( 3 secs) is a
! a legal unsigned number, but when returned as a signed int it will
! be negative, and look like an error to the caller. Possible solutions:
! 1) limit the argument to 1,000,000,000 (1 second), return INVAL if higher
! 2) don't return actual value, just return success or errorcode (as before)
! */
extern int rtapi_clock_set_period(unsigned long int nsecs);
|
|
From: <jmk...@us...> - 2003-08-03 02:41:47
|
Update of /cvsroot/emc/rtapi/examples/fifo
In directory sc8-pr-cvs1:/tmp/cvs-serv28730/examples/fifo
Modified Files:
fifotask.c
Log Message:
more tweaking of rtai_rtapi, added debugging printfs
Index: fifotask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/fifo/fifotask.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** fifotask.c 2 Aug 2003 19:37:17 -0000 1.5
--- fifotask.c 3 Aug 2003 02:41:44 -0000 1.6
***************
*** 44,65 ****
int fifo_prio;
- /*
- if (0 != rtapi_init()) {
- return -1;
- }
- */
-
/* allocate and initialize the fifo */
- /* debug, remove when working */
- rtapi_print("debug - Calling rtapi_fifo_new()\n");
retval = rtapi_fifo_new(FIFO_KEY, FIFO_SIZE, &fifo);
- /* debug, remove when working */
- rtapi_print("debug - fifotask init: rtapi_fifo_new returned %d\n",
- retval);
if (retval != RTAPI_SUCCESS) {
rtapi_print("fifotask init: rtapi_fifo_new returned %d\n", retval);
return -1;
}
- rtapi_print("fifotask init: created fifo\n");
/* set the base timer period */
--- 44,53 ----
|
|
From: <pa...@us...> - 2003-08-02 23:30:46
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv5224
Modified Files:
rtai_rtapi.c
Log Message:
Usage counter required
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** rtai_rtapi.c 2 Aug 2003 19:37:18 -0000 1.9
--- rtai_rtapi.c 2 Aug 2003 23:30:43 -0000 1.10
***************
*** 63,66 ****
--- 63,68 ----
#define FIFO_MAGIC 10293
+ /* Usage counter so that we don't kill the periodic timer too soon */
+ static int usage_count = 0;
/* declare vsprintf() explicitly instead of including all of <stdio.h>,
***************
*** 123,126 ****
--- 125,131 ----
static int rtapi_exit(void)
{
+ if (usage_count != 0 ) {
+ rtapi_print(" Warning, you have %d task handlers active", usage_count);
+ }
rtapi_print("Removing RTAPI\n");
return RTAPI_SUCCESS;
***************
*** 170,173 ****
--- 175,181 ----
*taskptr = task;
+ /* increment the usage counter */
+ usage_count++;
+
return RTAPI_SUCCESS;
}
***************
*** 186,189 ****
--- 194,201 ----
task->magic = 0;
kfree(task);
+
+ /* decrement the usage counter */
+ usage_count--;
+
return RTAPI_SUCCESS;
}
***************
*** 257,268 ****
/* P.C.
! Added these two lines to release the 8254 IRQ and stop the timer
as it was causing a kernel panic after removing rtai_sched.
- May well need to impliment a task counter to prevent the timer
- being stopped if calls are made to rtapi_task_stop() by other
- realtime tasks (Do we need a Fix Me here ?).
*/
! rt_reset_irq_to_sym_mode(TIMER_8254_IRQ);
! rt_free_timer();
retval = rt_task_delete(&(task->ostask));
--- 269,279 ----
/* P.C.
! Added these lines to release the 8254 IRQ and stop the timer
as it was causing a kernel panic after removing rtai_sched.
*/
!
! if (usage_count == 0) {
! rt_free_timer();
! }
retval = rt_task_delete(&(task->ostask));
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv5825/src/rtapi
Modified Files:
rtai_rtapi.c rtapi.h
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rtai_rtapi.c 25 Jul 2003 22:04:20 -0000 1.8
--- rtai_rtapi.c 2 Aug 2003 19:37:18 -0000 1.9
***************
*** 142,147 ****
{
rt_set_periodic_mode();
! start_rt_timer(nano2count((RTIME) nsecs));
! return RTAPI_SUCCESS;
}
--- 142,151 ----
{
rt_set_periodic_mode();
! return count2nano(start_rt_timer(nano2count((RTIME) nsecs)));
! }
!
! long long int rtapi_get_time(void)
! {
! return rt_get_time_ns();
}
***************
*** 251,254 ****
--- 255,269 ----
return RTAPI_BADH;
}
+
+ /* P.C.
+ Added these two lines to release the 8254 IRQ and stop the timer
+ as it was causing a kernel panic after removing rtai_sched.
+ May well need to impliment a task counter to prevent the timer
+ being stopped if calls are made to rtapi_task_stop() by other
+ realtime tasks (Do we need a Fix Me here ?).
+ */
+ rt_reset_irq_to_sym_mode(TIMER_8254_IRQ);
+ rt_free_timer();
+
retval = rt_task_delete(&(task->ostask));
if (retval != 0) {
Index: rtapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtapi.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** rtapi.h 25 Jul 2003 01:40:38 -0000 1.8
--- rtapi.h 2 Aug 2003 19:37:18 -0000 1.9
***************
*** 74,77 ****
--- 74,81 ----
extern int rtapi_clock_set_period(unsigned long int nsecs);
+ /** rtapi_get_time returns the time in nano seconds since the timer *
+ * started. Returns an integer value as a 2^63 value. */
+
+ extern long long int rtapi_get_time(void);
/** 'rtapi_task_new()' is the first step in creating a task. Allocs *
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi/examples/timertask
In directory sc8-pr-cvs1:/tmp/cvs-serv5825/examples/timertask
Modified Files:
timertask.c
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: timertask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/timertask/timertask.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** timertask.c 25 Jul 2003 22:04:34 -0000 1.4
--- timertask.c 2 Aug 2003 19:37:18 -0000 1.5
***************
*** 42,49 ****
/* set the base timer period */
retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
! if ( retval != RTAPI_SUCCESS ) {
! rtapi_print( "timertask init: rtapi_clock_set_period returned %d\n", retval );
! return -1;
! }
/* set the task priority to lowest, since we only have one task */
--- 42,46 ----
/* set the base timer period */
retval = rtapi_clock_set_period(TIMER_PERIOD_NSEC);
! rtapi_print( "timertask init: rtapi_clock_set_period returned %d\n", retval );
/* set the task priority to lowest, since we only have one task */
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi/examples/shmem
In directory sc8-pr-cvs1:/tmp/cvs-serv5825/examples/shmem
Modified Files:
shmemtask.c
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: shmemtask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/shmem/shmemtask.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** shmemtask.c 23 Jul 2003 01:22:49 -0000 1.2
--- shmemtask.c 2 Aug 2003 19:37:18 -0000 1.3
***************
*** 58,65 ****
/* set the base timer period */
retval = rtapi_clock_set_period(SHMEM_PERIOD_NSEC);
- if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "shmemtask init: rtapi_clock_set_period returned %d\n", retval );
- return -1;
- }
/* set the task priority to lowest, since we only have one task */
--- 58,62 ----
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi/examples/semaphore
In directory sc8-pr-cvs1:/tmp/cvs-serv5825/examples/semaphore
Modified Files:
master.c
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: master.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/semaphore/master.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** master.c 23 Jul 2003 01:22:49 -0000 1.2
--- master.c 2 Aug 2003 19:37:17 -0000 1.3
***************
*** 50,57 ****
/* set the base timer period */
retval = rtapi_clock_set_period(MASTER_PERIOD_NSEC);
- if ( retval != RTAPI_SUCCESS ) {
rtapi_print( "sem master init: rtapi_clock_set_period returned %d\n", retval );
- return -1;
- }
/* set the task priority to one above the lowest; the slave
--- 50,54 ----
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi/examples/fifo
In directory sc8-pr-cvs1:/tmp/cvs-serv5825/examples/fifo
Modified Files:
fifotask.c
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: fifotask.c
===================================================================
RCS file: /cvsroot/emc/rtapi/examples/fifo/fifotask.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** fifotask.c 27 Jul 2003 16:33:42 -0000 1.4
--- fifotask.c 2 Aug 2003 19:37:17 -0000 1.5
***************
*** 65,73 ****
/* set the base timer period */
retval = rtapi_clock_set_period(FIFO_PERIOD_NSEC);
- if (retval != RTAPI_SUCCESS) {
rtapi_print("fifotask init: rtapi_clock_set_period returned %d\n",
retval);
- return -1;
- }
/* set the task priority to lowest, since we only have one task */
--- 65,70 ----
|
|
From: <pa...@us...> - 2003-08-02 19:37:21
|
Update of /cvsroot/emc/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv5825
Modified Files:
install_realtime_base
Log Message:
Fixes to prevent a kernel panic when removing the rtai_sched
Index: install_realtime_base
===================================================================
RCS file: /cvsroot/emc/rtapi/install_realtime_base,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** install_realtime_base 27 Jul 2003 15:56:43 -0000 1.3
--- install_realtime_base 2 Aug 2003 19:37:17 -0000 1.4
***************
*** 57,63 ****
fi
fi
! if /sbin/modprobe rtai_sched_up 1> ${nullfile} 2>${nullfile} ; then
! echo Installed rtai_sched_up
! fi
if ! /sbin/lsmod | awk '{print $1}' | grep rtai_sched 1> ${nullfile} 2> ${nullfile} ; then
if ! /sbin/modprobe rtai_sched 1> ${nullfile} 2>${nullfile} ; then
--- 57,63 ----
fi
fi
!
! # running setsched in the rtai directory links rtai_sched to the correct
! # scheduler, be it the smp, or up scheduler...
if ! /sbin/lsmod | awk '{print $1}' | grep rtai_sched 1> ${nullfile} 2> ${nullfile} ; then
if ! /sbin/modprobe rtai_sched 1> ${nullfile} 2>${nullfile} ; then
|
|
From: <mag...@us...> - 2003-07-31 18:58:56
|
Update of /cvsroot/emc/emc/src/emcmot
In directory sc8-pr-cvs1:/tmp/cvs-serv16658
Modified Files:
scarakins.c
Log Message:
fixed bug in kinematicsInverse()
Index: scarakins.c
===================================================================
RCS file: /cvsroot/emc/emc/src/emcmot/scarakins.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** scarakins.c 31 May 2003 11:12:25 -0000 1.1
--- scarakins.c 31 Jul 2003 18:58:53 -0000 1.2
***************
*** 73,78 ****
joint[0] = q0;
joint[1] = q1;
! joint[3] = SCARA_D1 - world->tran.z;
! joint[4] = world->c;
*fflags = 0;
--- 73,78 ----
joint[0] = q0;
joint[1] = q1;
! joint[2] = SCARA_D1 - world->tran.z;
! joint[3] = world->c;
*fflags = 0;
***************
*** 82,86 ****
/*
+-------------------------------------------------------+
! | Blindly copied from puma560kins.c |
+-------------------------------------------------------+
*/
--- 82,86 ----
/*
+-------------------------------------------------------+
! | Blindly copied from puma560kins.c |
+-------------------------------------------------------+
*/
***************
*** 98,100 ****
{
return KINEMATICS_BOTH;
! }
\ No newline at end of file
--- 98,100 ----
{
return KINEMATICS_BOTH;
! }
|