This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Document cyg_thread_delete return value
- From: Jonathan Larmour <jlarmour at jifvik dot org>
- To: ecos-patches at ecos dot sourceware dot org
- Date: Thu, 4 Mar 2004 02:17:39 GMT
- Subject: Document cyg_thread_delete return value
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.114
diff -u -5 -p -r1.114 ChangeLog
--- ChangeLog 19 Feb 2004 10:57:36 -0000 1.114
+++ ChangeLog 4 Mar 2004 02:17:32 -0000
@@ -1,5 +1,9 @@
+2004-03-04 Jonathan Larmour <jifl@eCosCentric.com>
+
+ * doc/kernel.sgml: Document cyg_thread_delete return value.
+
2004-02-19 Jonathan Larmour <jifl@eCosCentric.com>
* tests/kmutex3.c (cyg_start): Use CYG_TEST_NA.
* tests/kmutex4.c (cyg_start): Ditto.
* tests/mutex2.cxx (cyg_start): Ditto.
Index: doc/kernel.sgml
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/doc/kernel.sgml,v
retrieving revision 1.9
diff -u -5 -p -r1.9 kernel.sgml
--- doc/kernel.sgml 9 Dec 2003 15:10:39 -0000 1.9
+++ doc/kernel.sgml 4 Mar 2004 02:17:37 -0000
@@ -1663,11 +1663,11 @@ DSR context.
<funcprototype>
<funcdef>void <function>cyg_thread_kill</function></funcdef>
<paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
</funcprototype>
<funcprototype>
- <funcdef>void <function>cyg_thread_delete</function></funcdef>
+ <funcdef>cyg_bool_t <function>cyg_thread_delete</function></funcdef>
<paramdef>cyg_handle_t <parameter>thread</parameter></paramdef>
</funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -1715,11 +1715,16 @@ kill itself.
after it has exited and is no longer required. After this call the
thread handle is no longer valid, and both the
<structname>cyg_thread</structname> structure and the thread stack can
be re-used or freed. If <function>cyg_thread_delete</function> is
invoked on a thread that is still running then there is an implicit
-call to <function>cyg_thread_kill</function>.
+call to <function>cyg_thread_kill</function>. This function returns
+<literal>true</literal> if the delete was successful, and
+<literal>false</literal> if the delete did not happen. The delete
+may not happen for example if the thread being destroyed is a lower
+priority thread than the running thread, and will thus not wake up
+in order to exit until it is rescheduled.
</para>
</refsect1>
<refsect1 id="kernel-thread-termination-context"><title>Valid contexts</title>
<para>