[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Uwe Damm <damm@irf.de>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [Uwe Damm <damm@irf.de>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Fri, 18 May 2001 16:15:16 +0200 (CEST)
>From owner-rtl Fri May 18 05:59:10 2001
Received: from damon.irf.uni-dortmund.de (damon.IRF.Uni-Dortmund.DE [129.217.200.1])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f4IBx9r26416
for <rtl@rtlinux.org>; Fri, 18 May 2001 05:59:10 -0600
Received: from rtlinux02 (rtlinux02.hilker.irf.de [10.0.48.102])
by damon.irf.uni-dortmund.de (8.11.0/8.9.3) with SMTP id f4IAsRh13508
for <rtl@rtlinux.org>; Fri, 18 May 2001 12:54:28 +0200
X-Authentication-Warning: damon.irf.uni-dortmund.de: Host rtlinux02.hilker.irf.de [10.0.48.102] claimed to be rtlinux02
From: Uwe Damm <damm@irf.de>
To: rtl@rtlinux.org
Subject: PThread crashing with period=100usec
Date: Fri, 18 May 2001 13:33:57 +0000
X-Mailer: KMail [version 1.0.29.2]
Content-Type: text/plain
MIME-Version: 1.0
Message-Id: <01051813534000.00636@rtlinux02>
Content-Transfer-Encoding: 8bit
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.