[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [root <agn@city.dk>] (fwd)
- To: rtl@rtlinux.org
- Subject: BOUNCE rtl@rtlinux.org: Approval required: Non-member submissionfrom [root <agn@city.dk>] (fwd)
- From: Der Herr Hofrat <der.herr@hofr.at>
- Date: Wed, 9 May 2001 16:01:46 +0200 (CEST)
>From owner-rtl Wed May 9 08:57:25 2001
Received: from kalman.iau.dtu.dk (kalman.iau.dtu.dk [192.38.66.22])
by hq.fsmlabs.com (8.11.2/8.11.2) with ESMTP id f49EvOJ22719
for <rtl@rtlinux.org>; Wed, 9 May 2001 08:57:24 -0600
Received: from city.dk (IDENT:root@xterm39 [192.38.66.79])
by kalman.iau.dtu.dk (8.9.3/8.9.3) with ESMTP id QAA26054
for <rtl@rtlinux.org>; Wed, 9 May 2001 16:52:48 +0200
Sender: root@kalman.iau.dtu.dk
Message-ID: <3AF958B6.8DA04D3B@city.dk>
Date: Wed, 09 May 2001 16:48:22 +0200
From: root <agn@city.dk>
X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.1-rtl i686)
X-Accept-Language: en
MIME-Version: 1.0
To: rtlinux <rtl@rtlinux.org>
Subject: bug repport
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
hi all
I think I have found a bug.
I think the problem is that "some" kommunikation between linux kernel
and RT-linux goes wrong.
I have made a test program. It does NOT work, and crashes -> turn off.
The program is simple. It just start a thread running every 1/10000 sec.
The thread wake up sleeping prosses up in the queue "my_queue".
The program start out fine, but when i try to open another program (in
linux user space) it crashes.
ps. I am using RT-linux 3.0 based on kernel 2.4.1
/*
* this file is have only one funktion -> to test the queue structurer
* auther : Anders Gnistrup email : agn@city.dk
*----------------------------------------------------------------------*/
#include <rtl.h>
#include <rtl_sched.h>
#include <rtl_conf.h>
#include <rtl_core.h>
#include <rtl_sync.h>
wait_queue_head_t my_queue;
pthread_t queue_ID;
void *queue(void *);
void *queue(void *t) {
while(1) {
pthread_wait_np();
wake_up(&my_queue);
}
return 0;
}
int init_module(void) {
pthread_attr_t attr;
struct sched_param sched_param;
hrtime_t period = 1000000000/11520;
init_waitqueue_head(&my_queue);
pthread_attr_init(&attr);
sched_param.sched_priority = 4;
pthread_attr_setschedparam(&attr,&sched_param);
pthread_create(&queue_ID,&attr, queue, (void *) 0);
pthread_make_periodic_np(queue_ID, gethrtime(), period);
return 0;
}
void cleanup_module(void) {
pthread_suspend_np(queue_ID);
pthread_cancel(queue_ID);
pthread_join(queue_ID, NULL);
}