From: Jeff Dike <jdike@addtoit.com>
To: Allan Graves <allan.graves@oracle.com>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] stack and scheduler patches
Date: Fri, 2 Sep 2005 12:59:35 -0400 [thread overview]
Message-ID: <20050902165935.GA6651@ccure.user-mode-linux.org> (raw)
In-Reply-To: <431637F9.6030101@oracle.com>
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
next prev parent reply other threads:[~2005-09-02 17:06 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 [this message]
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 ` [uml-devel] stack and scheduler patches Allan Graves
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=20050902165935.GA6651@ccure.user-mode-linux.org \
--to=jdike@addtoit.com \
--cc=allan.graves@oracle.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.