From: Allan Graves <allan.graves@oracle.com>
To: Jeff Dike <jdike@addtoit.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] stack and scheduler patches
Date: Tue, 06 Sep 2005 11:46:53 -0400 [thread overview]
Message-ID: <431DB9ED.4030300@oracle.com> (raw)
In-Reply-To: <20050902165935.GA6651@ccure.user-mode-linux.org>
Void casting: my compiler gave me a warning, and I don't like that.
pid=-1, leftover from error checking that i didn't need, my fault.
pid=0, find_task_by_pid(0) will return a valid pointer, but it doesn't
seem to really be a good task. This seems to be related to the kernel
idle task. If you pass 0, it will seg fault w\o the check.
I'm not sure what a signed off-by does, but long as i can get bb to
agree with this.... i'm okay with it. :)
Allan
Jeff Dike wrote:
>On Wed, Aug 31, 2005 at 07:06:33PM -0400, Allan Graves wrote:
>
>
>>Jeff,
>>Here's the patches. Hope these meet your approval!
>>Allan
>>
>>
>
>Some comments - I have these all fixed:
>
> + struct task_struct *from=(struct task_struct*)prev;
> + struct task_struct *to=(struct task_struct*)next;
>There's no need to cast when the source is a void *
>
> + CHOOSE_MODE(switch_to_tt(prev, next),
> + switch_to_skas(prev, next));
>There's a CHOOSE_MODE_PROC which lets you avoid repeating common argument
>lists, although I was doing this wrong here too.
>
> +extern int switch_to_skas(void *prev, void *next);
> +extern int switch_to_tt(void *prev, void *next);
>Since these can't do anything but return 0, they might as well be void
>
> + if (0==sscanf(ptr, "%d", &pid_requested) || pid_requested==-1) {
>The pid_requested==-1 is redundant - if sscanf failed, we just want to bail out
>
> + if((!to) || (pid_requested == 0)) {
>Why the check against 0?
>
> + next=(void *)current->thread.saved_task;
> + prev=(void*)current;
>No need to cast when the target is a void * either
>
>Also, OK for me to add a Signed-off-by: you?
>
> Jeff
>
>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
prev parent reply other threads:[~2005-09-06 16:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-31 23:06 [uml-devel] stack and scheduler patches Allan Graves
2005-09-02 16:59 ` Jeff Dike
2005-09-04 11:51 ` Blaisorblade
2005-09-06 15:37 ` Jeff Dike
2005-09-06 16:10 ` [uml-devel] sched and stack patch changelogs Allan Graves
2005-09-06 15:46 ` Allan Graves [this message]
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=431DB9ED.4030300@oracle.com \
--to=allan.graves@oracle.com \
--cc=jdike@addtoit.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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.