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
(21) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
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;
! }
|
|
From: <mag...@us...> - 2003-07-31 18:50:12
|
Update of /cvsroot/emc/documents/lyx In directory sc8-pr-cvs1:/tmp/cvs-serv8803 Modified Files: bdi-install.lyx Log Message: dded copyright notice. Index: bdi-install.lyx =================================================================== RCS file: /cvsroot/emc/documents/lyx/bdi-install.lyx,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** bdi-install.lyx 31 Jul 2003 17:57:37 -0000 1.1 --- bdi-install.lyx 31 Jul 2003 18:15:59 -0000 1.2 *************** *** 332,339 **** \layout Standard ! This document is released under the GNU Free Documentation License. \layout Standard ! See http://www.gnu.org/licenses/fdl.html for detail. \layout Standard --- 332,340 ---- \layout Standard ! This document is a copyright work of Sagar Behere, July 2003. \layout Standard ! This document is released under the GNU Free Documentation License. ! See http://www.gnu.org/licenses/fdl.html for detail. \layout Standard |
|
From: <mag...@us...> - 2003-07-31 18:07:35
|
Update of /cvsroot/emc/documents/lyx In directory sc8-pr-cvs1:/tmp/cvs-serv5013 Added Files: bdi-install.lyx Log Message: getting BDI to work with existing systems --- NEW FILE: bdi-install.lyx --- #LyX 1.1 created this file. For more info see http://www.lyx.org/ \lyxformat 218 \textclass article \language english \inputencoding auto \fontscheme times \graphics dvips \paperfontsize 12 \spacing onehalf \papersize a4paper \paperpackage a4 \use_geometry 0 \use_amsmath 0 \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \quotes_times 2 \papercolumns 1 \papersides 1 \paperpagestyle default \layout Title BDI Install Guide \layout Section Introduction \layout Standard First of all, the title is a misnomer. BDI stands for \emph on brain dead install \emph default so you shouldn't need a guide to its installation. However, there are times when you want a BDI install to coexist with your existing GNU/Linux or Microsoft installations. At such times it takes a little tweaking to boot BDI smoothly. This document explains the procedure. \layout Standard Firstly, backup everything critical. It is extremely improbable that there will be data loss due to something going wrong, but still, it is preferable to err on the side of caution. Data will be safe, but your PC may not boot. This is often enough to throw people into violent fits of panic. I mention it here to reassure you that in case something goes wrong (unlikely), your data is still there :-) \layout Standard People will boot into their OS of choice, normally through one of the following four methods: LILO, Loadlin, GRUB or a third party boot loader. I have no experience with the last two, so we'll concentrate on the rest. \layout Standard Throughout this document I'll be assuming that you have either Microsoft Windows 95/98 and/or GNU/Linux already installed. \layout Section The BDI install \layout Standard Make a separate partition to install BDI on. It does not matter if this partition is on a separate disk, primary or logical. (If you don't know what this means, you don't need to bother with it) A partition size of about 2.5 GB should be safe for almost all installs. Now install the BDI as you would install any regular GNU/Linux distribution, with the exception that if you already have some version of GNU/Linux, you should not install LILO. \layout Standard IMPORTANT: \series bold DO *NOT* INSTALL LILO IF YOU ALREADY HAVE GNU/LINUX INSTALLED!!! \layout Standard Not installing LILO can be achieved by un-checking a box on the same screen where it asks you if you want to install LILO on the MBR or on another partition. \layout Standard If you have only MS Windows installed, then you should install LILO into the MBR. \layout Standard Choose your packages, setup the video and complete the installation. \layout Section Booting the BDI \layout Standard A little theory here. \layout Standard At this point, you have installed BDI onto your hard disk, but you lack the ability to boot into it. When your PC boots, here is what actually happens. A small program called the boot loader looks around for a \emph on kernel \emph default . The kernel is the core of the operating system. When you say \begin_inset Quotes eld \end_inset linux \begin_inset Quotes erd \end_inset , you are (should be) referring to this kernel. Now, once the boot loader chooses a kernel, it loads this into memory and then all kinds of interesting things happen, until you find yourself staring at a login screen. When you installed the BDI, you got a kernel which is to be used along with it. However, you have not yet told your boot-loader where this kernel is and how it should be loaded. \layout Standard The technique for instructing the various boot-loaders will now be covered. \layout Subsection LILO \layout Standard LILO stands for LInux LOader. The name is deceptive. LILO can also boot other operating systems, like MS windows. If you have GNU/Linux installed, you might be using LILO to boot into it, or your windows installation. The configuration file '/etc/lilo.conf' decides how LILO behaves. The file will have a section like \layout LyX-Code image=/boot/vmlinuz \layout LyX-Code label=linux \layout LyX-Code read-only \layout LyX-Code root=/dev/hda6 \layout Standard The image= line tells LILO where the kernel is located. In this case, the kernel is the file \begin_inset Quotes eld \end_inset vmlinuz \begin_inset Quotes erd \end_inset , in the /boot directory. (If you check out this file, you might find that it is a link to another file. That's quite alright). The label= field decides what text is displayed at the LILO prompt. \begin_inset Quotes eld \end_inset read-only \begin_inset Quotes erd \end_inset means that the / partition should initially be loaded in read-only mode. We need not go into the reason for this, but it is essential. The root= line specifies the root (/) partition which the kernel should work with. There can be a number of sections like this, one for each kernel you have. \layout Standard Can you now guess how to make the BDI work with LILO? Its simple. \layout Standard You need to tell LILO where the BDI kernel is. So get a copy of the BDI kernel and copy it some place where LILO can find it. For example, copy it into the /boot directory of your current GNU/Linux installation. To do this, you'll have to access the partition where BDI is installed, grab its kernel from there, and copy it to /boot. Lets assume that BDI is installed on /dev/hda7. So \layout LyX-Code # mkdir /bdi \layout LyX-Code # mount /dev/hda7 /bdi \layout LyX-Code # cp -v /bdi/boot/vmlinuz-x.x.xxx-xxx /boot/bdi \layout LyX-Code # umount /bdi \layout LyX-Code # rmdir /bdi \layout Standard Here, vmlinuz-x.x.xxx-xxx is the file to which /bdi/boot/vmlinuz points to. For example, in BDI-2.18, it is vmlinuz-2.2.18-rtl3.0. The file /boot/bdi is your required kernel, and its root partition is /dev/hda7. Now add a section like the one below into your /etc/lilo.conf (back it up first) \layout LyX-Code image=/boot/bdi \layout LyX-Code label=BDI \layout LyX-Code read-only \layout LyX-Code root=/dev/hda7 \layout Standard Now, you have to make LILO read the configuration file and understand the new settings. So run the command \layout LyX-Code # /sbin/lilo -v \layout Standard The next time you boot, you'll see a label \begin_inset Quotes eld \end_inset BDI \begin_inset Quotes erd \end_inset . Hitting it will take you to the BDI. \layout Subsection Loadlin \layout Standard Loadlin is a DOS based program that is used to boot the linux kernel. If you are using Loadlin, you must be already proficient in its use. Simply copy the BDI kernel into your DOS dir, and use a command like \layout LyX-Code loadlin bdi root=/dev/hda7 \layout Section If something goes wrong \layout Standard Ok. Something happened and the system won't boot anymore. It happens to all of us. The important thing is not to panic. Go get a coffee or take a walk. Come back when you are calm once again :-) \layout Standard If you only had windows previously, then use its boot disk (you have one, don't you?) or boot from the Windows CD and at the command prompt type \layout LyX-Code c:> fdisk /mbr \layout Standard This will return things to their normal state. \layout Standard Or, you might have GNU/Linux previously installed, and now LILO fails to boot into any OS. \layout Standard In this case, boot into the first install CD (or the BDI CD) and go into rescue mode when you reach a prompt. Booting into rescue mode is pretty simple. Instructions are given on the screen. Most of the times, it is simply a matter of typing \layout LyX-Code linux rescue \layout Standard at the prompt. \layout Standard Once into rescue mode, you'll land up at a shell. Mount your original GNU/Linux / partition, chroot to it, replace the lilo.conf with your back up version and rerun LILO. \layout LyX-Code # mkdir /foo \layout LyX-Code # mount /dev/hda6 /foo \layout LyX-Code # chroot /foo \layout LyX-Code # mv -v /backup/of/lilo.conf /etc/lilo.conf \layout LyX-Code # /sbin/lilo -v \layout LyX-Code # <press ctrl+D> \layout LyX-Code # reboot \layout Standard This will restore LILO to its original state. Read this document once again, determine what went wrong, and try again. \layout Section License and blurbs \layout Standard This document is released under the GNU Free Documentation License. \layout Standard See http://www.gnu.org/licenses/fdl.html for detail. \layout Standard If you find any errors in the document or want to provide feedback, let me know at \emph on be...@sa... \the_end |
|
From: <pa...@us...> - 2003-07-29 22:24:45
|
Update of /cvsroot/emc/emc
In directory sc8-pr-cvs1:/tmp/cvs-serv26695
Modified Files:
emc.run generic.run install_realtime_base remove_realtime_base
Log Message:
Minor change to get the run scripts to work with ADEOS
Index: emc.run
===================================================================
RCS file: /cvsroot/emc/emc/emc.run,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** emc.run 10 Nov 2002 00:08:26 -0000 1.8
--- emc.run 29 Jul 2003 22:24:42 -0000 1.9
***************
*** 101,109 ****
DATESTRING=`date +%Y%m%d%H%M%S`
! # rthal is a symbol inserted by the rtai patch
! # if it is one of the kernel symbols we will use rtai stuff
# otherwise look for rtlinux info.
! if [ $PLATBASE = "linux" ] ; then
! if /sbin/ksyms -a | grep rthal >/dev/null 2>/dev/null ; then
PLAT=linux_rtai;
RTPLAT=rtai;
--- 101,109 ----
DATESTRING=`date +%Y%m%d%H%M%S`
! # rthal or adeos are symbols inserted by one of the rtai patches
! # if either is one of the kernel symbols we will use rtai stuff
# otherwise look for rtlinux info.
! if [ $PLATBASE = "linux" ] ; then
! if /sbin/ksyms -a | grep -E '(rthal|adeos)' > /dev/null 2>/dev/null ; then
PLAT=linux_rtai;
RTPLAT=rtai;
Index: generic.run
===================================================================
RCS file: /cvsroot/emc/emc/generic.run,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** generic.run 7 May 2003 19:49:49 -0000 1.42
--- generic.run 29 Jul 2003 22:24:42 -0000 1.43
***************
*** 95,109 ****
if test x$PLAT = x ; then
! PLATBASE=`uname -s | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
! PLAT=`uname -sr | sed "y/ /_/" | sed "y/./_/" | sed s/-rtl.\*\$// | sed "y/-/_/" | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
else
! PLATBASE=`uname -s | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
fi
! # rthal is a symbol inserted by the rtai patch
! # if it is one of the kernel symbols we will use rtai stuff
# otherwise look for rtlinux info.
if [ $PLATBASE = "linux" ] ; then
! if /sbin/ksyms -a | grep rthal >/dev/null 2>/dev/null ; then
PLAT=linux_rtai;
RTPLAT=rtai;
--- 95,109 ----
if test x$PLAT = x ; then
! PLATBASE=`uname -s | awk '{ printf ( "%s",tolower ( $1 ) ) }'`
! PLAT=`uname -sr | sed "y/ /_/" | sed "y/./_/" | sed s/-rtl.\*\$// | sed "y/-/_/" | awk '{ printf ( "%s",tolower ( $1 ) ) }'`
else
! PLATBASE=`uname -s | awk '{ printf ( "%s",tolower ( $1 ) ) }'`
fi
! # rthal or adeos are symbols inserted by one of the rtai patches
! # if either is one of the kernel symbols we will use rtai stuff
# otherwise look for rtlinux info.
if [ $PLATBASE = "linux" ] ; then
! if /sbin/ksyms -a | grep -E '(rthal|adeos)' > /dev/null 2>/dev/null ; then
PLAT=linux_rtai;
RTPLAT=rtai;
***************
*** 379,389 ****
nmlfile=`$inivar -ini $INIFILE -var NML_FILE -sec EMC`
! ipckeys=`grep SHMEM $nmlfile | gawk '{printf("%x ",$10);}'`
# define the cleanup function
function cleanup() {
! kill -INT `ps -ae | grep lt- | gawk '{print $1}'` >/dev/null 2>/dev/null
sleep 2
! kill -KILL `ps -ae | grep lt- | gawk '{print $1}'` >/dev/null 2>/dev/null
# Kill any displays lying around
--- 379,389 ----
nmlfile=`$inivar -ini $INIFILE -var NML_FILE -sec EMC`
! ipckeys=`grep SHMEM $nmlfile | awk '{printf("%x ",$10);}'`
# define the cleanup function
function cleanup() {
! kill -INT `ps -ae | grep lt- | awk '{print $1}'` >/dev/null 2>/dev/null
sleep 2
! kill -KILL `ps -ae | grep lt- | awk '{print $1}'` >/dev/null 2>/dev/null
# Kill any displays lying around
***************
*** 519,523 ****
# Delete sharedmemory segments and semaphores
for key in $ipckeys ; do
! id=`ipcs -m | grep $key | gawk '{print $2}'`
if [ ${#id} -gt 1 ] ; then
echo "Removing shared memory " $id
--- 519,523 ----
# Delete sharedmemory segments and semaphores
for key in $ipckeys ; do
! id=`ipcs -m | grep $key | awk '{print $2}'`
if [ ${#id} -gt 1 ] ; then
echo "Removing shared memory " $id
***************
*** 528,532 ****
fi
fi
! id=`ipcs -s | grep $key | gawk '{print $2}'`
if [ ${#id} -gt 1 ] ; then
echo "Removing semaphore" $id
--- 528,532 ----
fi
fi
! id=`ipcs -s | grep $key | awk '{print $2}'`
if [ ${#id} -gt 1 ] ; then
echo "Removing semaphore" $id
***************
*** 568,572 ****
if [ -z "$PURE_SIMULATION" ] ; then
if [ "x${PLAT}" = "xautoconf" ] ; then
! REAL_PLATBASE=`uname -s | gawk '{ printf ( "%s",tolower ( $1 ) ) }'`
if [ "x${REAL_PLATBASE}" = "xlinux" ] ; then
./install_realtime_base;
--- 568,572 ----
if [ -z "$PURE_SIMULATION" ] ; then
if [ "x${PLAT}" = "xautoconf" ] ; then
! REAL_PLATBASE=`uname -s | awk '{ printf ( "%s",tolower ( $1 ) ) }'`
if [ "x${REAL_PLATBASE}" = "xlinux" ] ; then
./install_realtime_base;
Index: install_realtime_base
===================================================================
RCS file: /cvsroot/emc/emc/install_realtime_base,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** install_realtime_base 7 May 2003 19:49:49 -0000 1.8
--- install_realtime_base 29 Jul 2003 22:24:42 -0000 1.9
***************
*** 5,9 ****
# It should work with all the different versions of rtlinux and rtai.
# It requires the following utilities:
! # bash,sed,gawk,grep,objdump,modprobe, lsmod, insmod, modinfo and ksyms.
--- 5,9 ----
# It should work with all the different versions of rtlinux and rtai.
# It requires the following utilities:
! # bash,sed,awk,grep,objdump,modprobe, lsmod, insmod, modinfo and ksyms.
***************
*** 22,28 ****
! # If the symbol rthal is found in ksyms assume we are using
# rtai instead of rtlinux.
! if /sbin/ksyms -a | grep rthal >${nullfile} 2>${nullfile} ; then
# Check to see if the rtai module is already installed..
--- 22,28 ----
! # If the symbol rthal or adeos is found in ksyms assume we are using
# rtai instead of rtlinux.
! if /sbin/ksyms -a | grep -E '(rthal|adeos)' >${nullfile} 2>${nullfile} ; then
# Check to see if the rtai module is already installed..
***************
*** 34,38 ****
for i in $rtai_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | gawk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
--- 34,38 ----
for i in $rtai_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | awk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
***************
*** 48,52 ****
for i in $rtai_sched_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | gawk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i
--- 48,52 ----
for i in $rtai_sched_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | awk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i
***************
*** 65,69 ****
for i in $rtai_sched_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | gawk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i
--- 65,69 ----
for i in $rtai_sched_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | awk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i
***************
*** 79,83 ****
for i in $rtai_shm_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | gawk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
--- 79,83 ----
for i in $rtai_shm_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | awk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
***************
*** 93,97 ****
for i in $rtai_shm_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | gawk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
--- 93,97 ----
for i in $rtai_shm_files; do
if [ -f $i ] ; then
! iver=`objdump -s -j .modinfo $i | awk '{printf("%s", $6)} END {printf("%s\n",$NF);}'| sed 's/[.]parm.*$//' | sed 's/kernel_version=//' | sed 's/[.]$//'`
if [ $iver = $rev ] ; then
/sbin/insmod $i;
Index: remove_realtime_base
===================================================================
RCS file: /cvsroot/emc/emc/remove_realtime_base,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** remove_realtime_base 17 Dec 2002 13:58:28 -0000 1.6
--- remove_realtime_base 29 Jul 2003 22:24:42 -0000 1.7
***************
*** 14,18 ****
# Get a list of currently installed modules.
! modules=`/sbin/lsmod | gawk '{print $1}'`
for mod in $modules ; do
--- 14,18 ----
# Get a list of currently installed modules.
! modules=`/sbin/lsmod | awk '{print $1}'`
for mod in $modules ; do
***************
*** 22,26 ****
continue;
fi
! depends=`/sbin/lsmod | sed 'y/[/ /' | sed 'y/]/ /' | sed 's#(unused)##' | sed 's#unused##' | gawk '/^'$mod'/ {print $4 " " $5 " " $6 " " $7 " " $8}'`
dependcount=`echo $depends | wc -w`
if [ $dependcount -gt 0 ] ; then
--- 22,26 ----
continue;
fi
! depends=`/sbin/lsmod | sed 'y/[/ /' | sed 'y/]/ /' | sed 's#(unused)##' | sed 's#unused##' | awk '/^'$mod'/ {print $4 " " $5 " " $6 " " $7 " " $8}'`
dependcount=`echo $depends | wc -w`
if [ $dependcount -gt 0 ] ; then
|
|
From: <pa...@us...> - 2003-07-27 16:37:45
|
Update of /cvsroot/emc/rtapi In directory sc8-pr-cvs1:/tmp/cvs-serv26551 Removed Files: NOTES Log Message: Deleted redundant junk file --- NOTES DELETED --- |
|
From: <pa...@us...> - 2003-07-27 16:33:45
|
Update of /cvsroot/emc/rtapi/src/rtapi In directory sc8-pr-cvs1:/tmp/cvs-serv26019/src/rtapi Removed Files: localdefs.h Log Message: Deleted auto-generated files --- localdefs.h DELETED --- |