|
From: <pa...@us...> - 2003-08-10 22:44:14
|
Update of /cvsroot/emc/rtapi/src/rtapi
In directory sc8-pr-cvs1:/tmp/cvs-serv26308/src/rtapi
Modified Files:
rtai_rtapi.c rtapi.h
Log Message:
Changed rtapi_print_dbg to rtapi_print_msg
Index: rtai_rtapi.c
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtai_rtapi.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** rtai_rtapi.c 10 Aug 2003 21:13:04 -0000 1.16
--- rtai_rtapi.c 10 Aug 2003 22:44:11 -0000 1.17
***************
*** 118,124 ****
static int timer_running = 0;
! int rtapi_msg_level; /* global used for message printing */
! static int msg; /* short name, for use in insmod command */
MODULE_PARM(msg, "i");
MODULE_PARM_DESC(msg, "Verbosity, higher value = more messages (default=7)");
--- 118,124 ----
static int timer_running = 0;
! int rtapi_msg_level; /* global used for message printing */
! static int msg = 0; /* short name, for use in insmod command */
MODULE_PARM(msg, "i");
MODULE_PARM_DESC(msg, "Verbosity, higher value = more messages (default=7)");
***************
*** 142,145 ****
--- 142,146 ----
PROC_PRINT(" Timer status = %i\n", timer_running);
PROC_PRINT("\n");
+ PROC_PRINT(" Vebosity level = %i\n", msg);
PROC_PRINT_DONE;
}
***************
*** 151,155 ****
especially if the RTOS does not use modules. */
! int rtapi_init (void)
{
rtapi_usage_count++;
--- 152,156 ----
especially if the RTOS does not use modules. */
! int rtapi_init(void)
{
rtapi_usage_count++;
***************
*** 157,161 ****
}
! int rtapi_exit (void)
{
rtapi_usage_count--;
--- 158,162 ----
}
! int rtapi_exit(void)
{
rtapi_usage_count--;
***************
*** 179,183 ****
);
#endif
! rtapi_print_dbg(VERBOSE, "RTAPI: Initing\n");
task_usage_count = 0;
shmem_usage_count = 0;
--- 180,184 ----
);
#endif
! rtapi_print_msg(VERBOSE, "RTAPI: Initing\n");
task_usage_count = 0;
shmem_usage_count = 0;
***************
*** 191,195 ****
! void cleanup_module (void)
{
/* Remove proc dir entry */
--- 192,196 ----
! void cleanup_module(void)
{
/* Remove proc dir entry */
***************
*** 198,222 ****
#endif
if (task_usage_count != 0) {
! rtapi_print_dbg(VERBOSE,
"RTAPI: ERROR: %d task(s) allocated but not deleted\n",
task_usage_count);
}
if (shmem_usage_count != 0) {
! rtapi_print_dbg(VERBOSE,
"RTAPI: ERROR: %d shared memory block(s) allocated but not deleted\n",
shmem_usage_count);
}
if (sem_usage_count != 0) {
! rtapi_print_dbg(VERBOSE,
"RTAPI: ERROR: %d semaphores(s) allocated but not deleted\n",
sem_usage_count);
}
if (fifo_usage_count != 0) {
! rtapi_print_dbg(VERBOSE,
"RTAPI: ERROR: %d fifo(s) allocated but not deleted\n",
fifo_usage_count);
}
if (int_usage_count != 0) {
! rtapi_print_dbg(VERBOSE,
"RTAPI: ERROR: %d interrupt handler(s) installed but not removed\n",
int_usage_count);
--- 199,223 ----
#endif
if (task_usage_count != 0) {
! rtapi_print_msg(VERBOSE,
"RTAPI: ERROR: %d task(s) allocated but not deleted\n",
task_usage_count);
}
if (shmem_usage_count != 0) {
! rtapi_print_msg(VERBOSE,
"RTAPI: ERROR: %d shared memory block(s) allocated but not deleted\n",
shmem_usage_count);
}
if (sem_usage_count != 0) {
! rtapi_print_msg(VERBOSE,
"RTAPI: ERROR: %d semaphores(s) allocated but not deleted\n",
sem_usage_count);
}
if (fifo_usage_count != 0) {
! rtapi_print_msg(VERBOSE,
"RTAPI: ERROR: %d fifo(s) allocated but not deleted\n",
fifo_usage_count);
}
if (int_usage_count != 0) {
! rtapi_print_msg(VERBOSE,
"RTAPI: ERROR: %d interrupt handler(s) installed but not removed\n",
int_usage_count);
***************
*** 227,231 ****
}
rtapi_print("RTAPI: Shutting down\n");
! return RTAPI_SUCCESS;
}
--- 228,232 ----
}
rtapi_print("RTAPI: Shutting down\n");
! return;
}
***************
*** 295,299 ****
timer_period = count2nano(start_rt_timer(nano2count((RTIME) nsecs)));
! rtapi_print_dbg(VERBOSE,
"RTAPI: clock_set_period ( %ld ) - Actual = %i nSec\n",
nsecs, timer_period);
--- 296,300 ----
timer_period = count2nano(start_rt_timer(nano2count((RTIME) nsecs)));
! rtapi_print_msg(VERBOSE,
"RTAPI: clock_set_period ( %ld ) - Actual = %i nSec\n",
nsecs, timer_period);
***************
*** 330,334 ****
task_usage_count++;
! rtapi_print_dbg(VERBOSE, "RTAPI: new_task %p, count = %d\n", task,
task_usage_count);
--- 331,335 ----
task_usage_count++;
! rtapi_print_msg(VERBOSE, "RTAPI: new_task %p, count = %d\n", task,
task_usage_count);
***************
*** 353,357 ****
task_usage_count--;
! rtapi_print_dbg(VERBOSE, "RTAPI: delete_task %p, count = %d\n", task,
task_usage_count);
--- 354,358 ----
task_usage_count--;
! rtapi_print_msg(VERBOSE, "RTAPI: delete_task %p, count = %d\n", task,
task_usage_count);
***************
*** 364,368 ****
int arg, int prio,
unsigned long int stacksize,
! unsigned long int period_nsec, unsigned char uses_fp)
{
int retval;
--- 365,370 ----
int arg, int prio,
unsigned long int stacksize,
! unsigned long int period_nsec, unsigned long long when,
! unsigned char uses_fp)
{
int retval;
***************
*** 410,414 ****
}
! rtapi_print_dbg(VERBOSE, "RTAPI: start_task %p\n", task);
return RTAPI_SUCCESS;
--- 412,416 ----
}
! rtapi_print_msg(VERBOSE, "RTAPI: start_task %p\n", task);
return RTAPI_SUCCESS;
***************
*** 432,436 ****
return RTAPI_FAIL;
}
! rtapi_print_dbg(VERBOSE, "RTAPI: stop_task %p\n", task);
return RTAPI_SUCCESS;
--- 434,438 ----
return RTAPI_FAIL;
}
! rtapi_print_msg(VERBOSE, "RTAPI: stop_task %p\n", task);
return RTAPI_SUCCESS;
***************
*** 548,552 ****
shmem_usage_count++;
! rtapi_print_dbg(VERBOSE, "RTAPI: new_shmem %p, key = %d, count = %d\n",
shmem, key, shmem_usage_count);
--- 550,554 ----
shmem_usage_count++;
! rtapi_print_msg(VERBOSE, "RTAPI: new_shmem %p, key = %d, count = %d\n",
shmem, key, shmem_usage_count);
***************
*** 590,594 ****
shmem_usage_count--;
! rtapi_print_dbg(VERBOSE, "RTAPI: delete_shmem %p, count = %d\n", shmem,
shmem_usage_count);
--- 592,596 ----
shmem_usage_count--;
! rtapi_print_msg(VERBOSE, "RTAPI: delete_shmem %p, count = %d\n", shmem,
shmem_usage_count);
***************
*** 613,617 ****
! void rtapi_print_dbg(int dbg, const char *fmt, ...)
{
va_list args;
--- 615,619 ----
! void rtapi_print_msg(int dbg, const char *fmt, ...)
{
va_list args;
***************
*** 619,623 ****
static char buffer[BUFFERLEN];
! if (dbg < debug) {
va_start(args, fmt);
vsprintf(buffer, fmt, args);
--- 621,625 ----
static char buffer[BUFFERLEN];
! if (dbg < msg) {
va_start(args, fmt);
vsprintf(buffer, fmt, args);
***************
*** 651,655 ****
}
}
! rtapi_print_dbg(VERBOSE,
"\n\nRTAPI: assign_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
--- 653,657 ----
}
}
! rtapi_print_msg(VERBOSE,
"\n\nRTAPI: assign_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
***************
*** 658,662 ****
int_usage_count++;
! rtapi_print_dbg(VERBOSE,
"RTAPI: assign_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
--- 660,664 ----
int_usage_count++;
! rtapi_print_msg(VERBOSE,
"RTAPI: assign_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
***************
*** 679,683 ****
int_usage_count--;
! rtapi_print_dbg(VERBOSE,
"RTAPI: free_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
--- 681,685 ----
int_usage_count--;
! rtapi_print_msg(VERBOSE,
"RTAPI: free_interrupt_handler for int %d, count = %d\n",
irq, int_usage_count);
***************
*** 740,744 ****
sem_usage_count++;
! rtapi_print_dbg(VERBOSE, "RTAPI: new_sem %p, count = %d\n", sem,
sem_usage_count);
--- 742,746 ----
sem_usage_count++;
! rtapi_print_msg(VERBOSE, "RTAPI: new_sem %p, count = %d\n", sem,
sem_usage_count);
***************
*** 766,770 ****
sem_usage_count--;
! rtapi_print_dbg(VERBOSE, "RTAPI: delete_sem %p, count = %d\n", sem,
sem_usage_count);
--- 768,772 ----
sem_usage_count--;
! rtapi_print_msg(VERBOSE, "RTAPI: delete_sem %p, count = %d\n", sem,
sem_usage_count);
***************
*** 863,867 ****
fifo_usage_count++;
! rtapi_print_dbg(VERBOSE, "RTAPI: new_fifo %p, count = %d\n", fifo,
fifo_usage_count);
--- 865,869 ----
fifo_usage_count++;
! rtapi_print_msg(VERBOSE, "RTAPI: new_fifo %p, count = %d\n", fifo,
fifo_usage_count);
***************
*** 889,893 ****
fifo_usage_count--;
! rtapi_print_dbg(VERBOSE, "RTAPI: delete_fifo %p, count = %d\n", fifo,
fifo_usage_count);
--- 891,895 ----
fifo_usage_count--;
! rtapi_print_msg(VERBOSE, "RTAPI: delete_fifo %p, count = %d\n", fifo,
fifo_usage_count);
Index: rtapi.h
===================================================================
RCS file: /cvsroot/emc/rtapi/src/rtapi/rtapi.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** rtapi.h 10 Aug 2003 21:13:04 -0000 1.14
--- rtapi.h 10 Aug 2003 22:44:11 -0000 1.15
***************
*** 97,101 ****
! /** 'rtapi_print_dbg()' prints debug messages. Works like rtapi_print *
* but only prints if 'level' is less than 'rtapi_msg_level'. *
* 'rtapi_msg_level' is a global. The default is 7, but it may be *
--- 97,101 ----
! /** 'rtapi_print_msg()' prints debug messages. Works like rtapi_print *
* but only prints if 'level' is less than 'rtapi_msg_level'. *
* 'rtapi_msg_level' is a global. The default is 7, but it may be *
***************
*** 226,231 ****
unsigned long int stacksize,
unsigned long int period_nsec,
! unsigned long long when,
! unsigned char uses_fp);
--- 226,230 ----
unsigned long int stacksize,
unsigned long int period_nsec,
! unsigned long long when, unsigned char uses_fp);
***************
*** 345,349 ****
* becomes a fifo handle, which points to internal data for the fifo *
* and is used for subsequent calls dealing with it. Returns a status *
! * code. */
extern int rtapi_fifo_new(int key, unsigned long int size,
--- 344,351 ----
* becomes a fifo handle, which points to internal data for the fifo *
* and is used for subsequent calls dealing with it. Returns a status *
! * code. *
! * *
! * NOTE - The fifo requires (stacksize - 256) to avoid oops messages on *
! * removal. (Does this apply to rtlinux as well ?) */
extern int rtapi_fifo_new(int key, unsigned long int size,
|