All of lore.kernel.org
 help / color / mirror / Atom feed
From: davy.regneau@univ-grenoble-alpes.fr
To: xenomai@xenomai.org
Subject: segmentation error when a task ends
Date: Wed, 6 Nov 2019 10:18:38 +0100	[thread overview]
Message-ID: <b9873e80d75b24e63dd423288ecca54b.squirrel@mail.ige-grenoble.fr> (raw)
In-Reply-To: <64bfd5ea-6509-f4c9-ec7b-c79fb7619767@xenomai.org>


Hi,

Thanks for patching the shared sessions. It works.

Now I have another segmentation error that appears when a task ends or is
deleted :



RT_TASK task;
void foo(){
	int i = 3;
	while(i--){
		printf("Hello !\n");
		rt_task_sleep(1000000000);
	}
	return;
}
int main(int argc, char *argv[]){
	int n;
  	if (mlockall( MCL_CURRENT | MCL_FUTURE )!=0)
    		return 1;
	if ((n=rt_task_spawn( &task, NULL, 0, 99, T_JOINABLE, &foo, NULL))!=0){
    		rt_printf("rt_task_spawn error %d\n",n);
    		return 1;
  	}
	printf("Join task\n");
  	rt_task_join(&task);
	return EXIT_SUCCESS;
}


$ sudo ./foo
Hello !
Join task
Hello !
Hello !
Erreur de segmentation



regards,
Davy





  reply	other threads:[~2019-11-06  9:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-24  8:41 problem with sessions in xenomai 3.1 davy.regneau
2019-10-25 17:05 ` Jan Kiszka
2019-10-26  9:12 ` Philippe Gerum
2019-11-06  9:18   ` davy.regneau [this message]
2019-11-06  9:28     ` segmentation error when a task ends Jan Kiszka
2019-11-06 13:40       ` davy.regneau
2019-11-06 13:50         ` Jan Kiszka
2019-11-06 14:23           ` davy.regneau
2019-11-06 14:40             ` Jan Kiszka
2019-11-07 10:12               ` davy.regneau
2019-11-10 17:25                 ` Philippe Gerum
2019-11-13 13:48                   ` Jan Kiszka
2019-11-17 11:49                     ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9873e80d75b24e63dd423288ecca54b.squirrel@mail.ige-grenoble.fr \
    --to=davy.regneau@univ-grenoble-alpes.fr \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.