Threading contexts
Threading contexts
- Subject: Threading contexts
- From: Wally Crooze <email@hidden>
- Date: Tue, 20 May 2003 14:54:37 +1000
Continuing on from the locking and synchronization primitives... I have
the need to be able to associate particular information with a thread
which is specific to my kext project.
In other OSes an interface is provided to allow information stored which
doesn't effect the control of the thread. I found the following
interfaces which set/retrieve thread_t->saved.misc:
extern void thread_set_cont_arg(int);
extern int thread_get_cont_arg(void);
These aren't used anywhere in xnu, but thread_t->saved is a union and is
used for other information. Are these interfaces expected to be used for
miscellaneous thread information within my own code? Also, can I treat
this int as a void* ?
Unfornately neither the Kernel Programming guide and Threading
Architecture Technotes describe a method of associating an information
context to the thread.
An example for this use is part of my sema implementation requires to
store whether the thread was woken normally or by an (software)
interrupt from my code.
Thanks.
--
Wally Crooze
+-------------------------------------------------------+
| ,-_|\ Wally Crooze <email@hidden> |
| / \ |
| \_,-._/ |
| v |
+-------------------------------------------------------+
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.