From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] [Mini-OS] Add exit_thread prototype. Make sure exit_thread doesn't return by accident
Date: Thu, 17 Jan 2008 13:39:57 +0000 [thread overview]
Message-ID: <20080117133957.GC11129@implementation.uk.xensource.com> (raw)
Add exit_thread prototype. Make sure exit_thread doesn't return by accident.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
# HG changeset patch
# User Samuel Thibault <samuel.thibault@eu.citrix.com>
# Date 1200577127 0
# Node ID a7922b798098383d87bd62a4cc27595cfaad8dbe
# Parent 7f206dc573bcf5660c9cbbc6c3658f7d8c03a855
Add exit_thread prototype. Make sure exit_thread doesn't return by accident.
diff -r 7f206dc573bc -r a7922b798098 extras/mini-os/include/sched.h
--- a/extras/mini-os/include/sched.h Thu Jan 17 13:33:08 2008 +0000
+++ b/extras/mini-os/include/sched.h Thu Jan 17 13:38:47 2008 +0000
@@ -39,6 +39,7 @@ void init_sched(void);
void init_sched(void);
void run_idle_thread(void);
struct thread* create_thread(char *name, void (*function)(void *), void *data);
+void exit_thread(void) __attribute__((noreturn));
void schedule(void);
#define current get_current()
diff -r 7f206dc573bc -r a7922b798098 extras/mini-os/sched.c
--- a/extras/mini-os/sched.c Thu Jan 17 13:33:08 2008 +0000
+++ b/extras/mini-os/sched.c Thu Jan 17 13:38:47 2008 +0000
@@ -198,7 +198,11 @@ void exit_thread(void)
list_add(&thread->thread_list, &exited_threads);
local_irq_restore(flags);
/* Schedule will free the resources */
- schedule();
+ while(1)
+ {
+ schedule();
+ printk("schedule() returned! Trying again\n");
+ }
}
void block(struct thread *thread)
reply other threads:[~2008-01-17 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080117133957.GC11129@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=xen-devel@lists.xensource.com \
/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.