All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Fabrice Gasnier <fabrice.gasnier@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [Fwd: Re: [Xenomai-help] How to fix t_delete call in psos skin?]
Date: Fri, 18 Dec 2009 19:18:59 +0100	[thread overview]
Message-ID: <1261160339.2216.623.camel@domain.hid> (raw)
In-Reply-To: <4B28AE06.5070503@domain.hid>

On Wed, 2009-12-16 at 10:53 +0100, Fabrice Gasnier wrote:
> Hello,
> Please find attached a new patch that should take your latest remarks 
> into account.

Merged, thanks.

> Regards,
> 
> Fabrice.
> 
> > On Mon, 2009-12-07 at 10:42 +0100, Fabrice Gasnier wrote:
> >   
> >> Hello,
> >>
> >> I come back to you to submit a slightly different patch.
> >> I observed that __psos_t_delete sometimes returns ERR_OBJID after 
> >> pthread_cancel has been issued, due to thread isn't found on kernel side.
> >> The attached patch uses the same mechanism as in native API 
> >> (rt_task_delete) where equivalent error is being filtered.
> >>
> >>     
> >
> > Correct.
> >
> >   
> >> Please find attached this patch (formated with git format-patch origin).
> >>
> >> If it's looks like ok on your side, do you think this patch can be 
> >> integrated in xenomai project?
> >>
> >>     
> >
> > Yes, this patch makes sense. Time for nitpicking now:
> >
> >
> > +	#ifdef CONFIG_XENO_OPT_PERVASIVE
> > +    u_long pthread; /* hidden pthread_t identifier. */
> > +	#endif
> > +
> >
> > Preprocessor statements should start at column 1.
> >
> > +	if (!__xn_access_ok(curr, VERIFY_READ, bulk.a1, sizeof(name))) {
> > +		return -EFAULT;
> > +	}
> >
> > Single executable statement in conditional needs no braces.
> >
> > @@ -99,7 +107,10 @@ static int __t_create(struct task_struct *curr,
> > struct pt_regs *regs)
> >  		 * about the new thread id, so we can manipulate its
> >  		 * TCB pointer freely. */
> >  		tid = xnthread_handle(&task->threadbase);
> > -		__xn_copy_to_user(curr, (void __user *)__xn_reg_arg4(regs), &tid,
> > +		#ifdef CONFIG_XENO_OPT_PERVASIVE
> > +		task->pthread = bulk.a5; /* hidden pthread_t identifier. */
> > +		#endif
> >
> > Same as above regarding the indentation, but most importantly, testing
> > CONFIG_OPT_XENO_PERVASIVE is redundant, since this file is only compiled
> > when in pervasive mode.
> >
> > +		#ifdef CONFIG_XENO_OPT_PERVASIVE
> > +		pthread = task->pthread; /* hidden pthread_t identifier. */
> > +		#endif
> >
> > Same as above.
> >
> > Additionally, please make sure to prefix the commit message with the
> > sub-system impacted, i.e. psos in this case, and be more descriptive
> > regarding to the fix involved.
> >
> > E.g.
> > git commit -a -m "psos: send pthread_cancel() upon t_delete"
> >
> >
> >   


-- 
Philippe.




  reply	other threads:[~2009-12-18 18:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-07  9:42 [Xenomai-core] [Fwd: Re: [Xenomai-help] How to fix t_delete call in psos skin?] Fabrice Gasnier
2009-12-15 16:54 ` Philippe Gerum
2009-12-16  9:53   ` Fabrice Gasnier
2009-12-18 18:18     ` Philippe Gerum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-11-13 14:11 Alexandre Coffignal
2009-11-13 14:32 ` 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=1261160339.2216.623.camel@domain.hid \
    --to=rpm@xenomai.org \
    --cc=fabrice.gasnier@domain.hid \
    --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.