D. writes: > >Why are you doing this? Don't the existing threads provide a much > more robust and better-performing solution? It sounds like you're > recreating the old Solaris 8 two-level thread library, which we > intentionally removed seven years ago because it's an inferior > solution (PSARC 2001/287). > > I am not trying to replace Solaris' threads. It is a realtime OS prototype.
Would it be possible to use libthread or libpthread to do what you're trying to do rather than building your own thread-managing code? Solaris already has RT features (including some fairly fancy scheduling mechanisms), so this may be the simplest answer. > It is very convenient to do the development with Solaris; I suppose, at this > point, it could be considered a "virtual realtime" OS. I'll leave it as is > when running w/Solaris, because the way it works now is that every function > eventually returns to its caller, which makes it all much more > understandable. I didn't like the fact that a thread may be moved off the CPU > with an outstanding exception frame on its stack; however, it does work that > way. It's likely possible to use sigsetjmp/siglongjmp to create a cooperative multitasking OS emulation, but I'd expect that it's hard to get right (things such as signal handlers become much more complex) and might be more problematic long-term than a more straightforward solution. But if you can get it working and would like to share, this'd be the place. :-/ -- James Carlson, Solaris Networking <[email protected]> Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084 MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677 _______________________________________________ opensolaris-code mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/opensolaris-code
