Hi,
I'm about to start a new event-driven app using pth. It has a relatively large number of functions that each thread may or may not use. My question concerns thread context storage. I know I can anchor a struct using the thread key functions but this means I have to pass the address of this around to practically every function in the system. As an alternative I've considered modifying pth to save and restore a user-defined address in the machine context in the same way it currently handles errno. With this approach I could pop my anchor struct in static and each context switch would ensure that the correct value was present. My thinking is that this would be (a) neater and (b) possibly a little faster. So before I hack the guts of pth, does anyone think this is a really bad idea, or have an obvious solution that I missed ?
      Thanks,
         Greg.
______________________________________________________________________
GNU Portable Threads (Pth)            http://www.gnu.org/software/pth/
Development Site                      http://www.ossp.org/pkg/lib/pth/
Distribution Files                          ftp://ftp.gnu.org/gnu/pth/
Distribution Snapshots                 ftp://ftp.ossp.org/pkg/lib/pth/
User Support Mailing List                            pth-users@gnu.org
Automated List Manager (Majordomo)           [EMAIL PROTECTED]

Reply via email to