All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Huy Cong Vu <huy-cong.vu@wandercraft.eu>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai] Differents switch mode from differents Xenomai skin
Date: Tue, 23 Dec 2014 17:35:35 +0100	[thread overview]
Message-ID: <20141223163535.GA1537@daedalus> (raw)
In-Reply-To: <1185690365.115833.1419351787951.JavaMail.zimbra@wandercraft.eu>

On Tue, Dec 23, 2014 at 05:23:07PM +0100, Huy Cong Vu wrote:
> void mini( void *ptr )
> {
> 
> 
> 	uint8_t b;
> 	int ret1;
> 	int idx;
> 
> 	pthread_set_mode_np(0, PTHREAD_WARNSW);
>    printf("Starting posix test\n");
> 
> 	ec_port = malloc(sizeof(ecx_portt*));
> 
> 	if (setup_nic(ec_port,"rteth0") > 0) {
> 		   idx = getindex (ec_port);
>    		/* setup datagram */
> 			b = 0x0000;
>    		setupdatagram (ec_port, &(ec_port->txbuf[idx]),0x0009, idx, 0x0000, 0x0103, sizeof(b), &b );
>    		/* send data and wait for answer */
>    		wkc = srconfirm (ec_port, idx, EC_TIMEOUTRET3);
> 	}
> 	
> }

Typically, as I already explained, what you do here is wrong: you
should not arm the PTHREAD_WARNSW bit before call such as malloc or
the calls in setup_nic, which switch to secondary mode. 

-- 
					    Gilles.


  reply	other threads:[~2014-12-23 16:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 11:30 [Xenomai] Differents switch mode from differents Xenomai skin Huy Cong Vu
2014-12-18 14:05 ` Gilles Chanteperdrix
     [not found]   ` <530357014.99522.1418920882907.JavaMail.zimbra@wandercraft.eu>
2014-12-18 16:41     ` Huy Cong Vu
2014-12-18 17:43       ` Gilles Chanteperdrix
     [not found]         ` <1886500835.102755.1418982478388.JavaMail.zimbra@wandercraft.eu>
2014-12-19 10:31           ` Gilles Chanteperdrix
     [not found]             ` <873251.115805.1419351709840.JavaMail.zimbra@wandercraft.eu>
2014-12-23 16:23               ` Huy Cong Vu
2014-12-23 16:35                 ` Gilles Chanteperdrix [this message]
     [not found]                   ` <1247107386.116030.1419353010523.JavaMail.zimbra@wandercraft.eu>
2014-12-23 16:43                     ` Huy Cong Vu
2014-12-23 16:46                       ` Gilles Chanteperdrix
     [not found]                         ` <473658337.116296.1419353916760.JavaMail.zimbra@wandercraft.eu>
2014-12-23 16:58                           ` Huy Cong Vu
2014-12-24  0:29                             ` Gilles Chanteperdrix
     [not found]                               ` <1579728558.117024.1419413400904.JavaMail.zimbra@wandercraft.eu>
2014-12-24  9:30                                 ` Huy Cong Vu
2014-12-24 14:49                                   ` Gilles Chanteperdrix
     [not found]                                     ` <122317517.130963.1420453826355.JavaMail.zimbra@wandercraft.eu>
2015-01-05 10:30                                       ` Huy Cong Vu
2015-01-05 16:58                                         ` Gilles Chanteperdrix
     [not found]                                           ` <53399875.136328.1420535338904.JavaMail.zimbra@wandercraft.eu>
2015-01-06  9:09                                             ` Huy Cong Vu
2015-01-06  9:16                                               ` Gilles Chanteperdrix
     [not found]                                                 ` <406329870.136348.1420536332444.JavaMail.zimbra@wandercraft.eu>
2015-01-06  9:34                                                   ` Huy Cong Vu

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=20141223163535.GA1537@daedalus \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=huy-cong.vu@wandercraft.eu \
    --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.