Dear RTLinux User,
if I start a PThread with period equal to 100us my System hangs, while
shutting down XDM:
insmod hello.o
xdm stop (or xdm start)
--> hangup or reboot
hello.c:
#include <rtl.h>
#include <time.h>
#include <pthread.h>
#include <sys/io.h>
#include <math.h>
#define THREAD_SPEED 100000
pthread_t thread;
void * start_routine(void *arg)
{
int l_cnt=0;
while (1) {
pthread_wait_np ();
// just to say hello one time each second
if(!(l_cnt%(1000000000/THREAD_SPEED)))
rtl_printf("testmsg %d\n",l_cnt/(1000000000/THREAD_SPEED));
l_cnt++;
}// while(1)
return 0;
}
int init_module(void) {
rtl_printf("hello started\n");
pthread_create (&thread, NULL, start_routine, 0);
pthread_make_periodic_np (thread, gethrtime(), THREAD_SPEED);
return 0;
}
void cleanup_module(void) {
pthread_delete_np (thread);
rtl_printf("hello stopped\n");
}
System is Athlon 550Mhz, RTLinux-3.0, Linux-2.2.18 (XFree 4.0.02, KDE2.1,
Suse7.0)
With Pentium 200, RTLinux-3.0, Linux-2.2.18 (XFree 3.3.6, KDE1.1.2 Suse6.4)
everything is fine
Any idea, whats up???
caiuo uwe
Please answer directly, I am not in this list, cause our sysadmin was angry
with all these VIRUS-bullshit, sorry.
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/