# HG changeset patch # User jlarmour # Date 1043217538 0 # Node ID 1061ceceb720d6af7e524111b8f5d348ff55d0c8 # Parent 690783a1f31d8dfdb0e3cdf2fcaa0b33ab60c064 * doc/kernel.sgml: Document cyg_thread_info type. diff --git a/packages/kernel/current/ChangeLog b/packages/kernel/current/ChangeLog --- a/packages/kernel/current/ChangeLog +++ b/packages/kernel/current/ChangeLog @@ -1,3 +1,7 @@ +2003-01-22 Jonathan Larmour + + * doc/kernel.sgml: Document cyg_thread_info type. + 2003-01-13 Dmitriy Korovkin 2003-01-13 Jonathan Larmour diff --git a/packages/kernel/current/doc/kernel.sgml b/packages/kernel/current/doc/kernel.sgml --- a/packages/kernel/current/doc/kernel.sgml +++ b/packages/kernel/current/doc/kernel.sgml @@ -1364,7 +1364,7 @@ can give some useful indication of the t cyg_thread_get_next is used to enumerate all the -current threads in the system. It should be called intially with the +current threads in the system. It should be called initially with the locations pointed to by thread and id set to zero. On return these will be set to the handle and ID of the first thread. On subsequent calls, these @@ -1383,6 +1383,26 @@ parameters. If the thread does not exist false. +The cyg_thread_info structure is defined as follows by +<cyg/kernel/kapi.h>, but may +be extended in future with additional members, and so its size should +not be relied upon: + +typedef struct +{ + cyg_handle_t handle; + cyg_uint16 id; + cyg_uint32 state; + char *name; + cyg_priority_t set_pri; + cyg_priority_t cur_pri; + cyg_addrword_t stack_base; + cyg_uint32 stack_size; + cyg_uint32 stack_used; +} cyg_thread_info; + + + cyg_thread_find returns a handle for the thread whose ID is id. If no such thread exists, a zero handle is returned.