This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: pthreads w/ cygwin32


-----Original Message-----
From:	Tom M. Kroeger

> I have looked at the Pthreads before. Why not try to port those
> calls to NT's native threads? Those work.

pthreads was the first draft of the POSIX's user level threads
standard.  Using the POSIX threads native to NT should work, but

It is also the name of one of the most widely used user level threading 
packages.

how do I do this within the cgywin32 development environment?

Something to watch out for is that NT's threads are kernel level threads. 
In most applications, this shouldn't make a difference, but there is the 
possibility that it could, particularly in how they are scheduled, and the 
fact that kernel threads are more expensive than user threads. If you have 
a processor intensive program, like simulation software, this could be a 
critical issue. At the moment, one of my projects is porting a user level 
threading library (similar to the Pthreads package) from UNIX to NT. One of 
the issues I'm going to look at is implementation both inside vs. on top of 
kernel threads. I have not made much progress yet, but when I do, I would 
be happy to send my results to you.

Re: cygwin32  not being thread safe--
should this make a difference for user level threads?

This should not make a difference if the user threads are implemented 
inside of kernel threads and there is only one kernel thread per process. 
Our thread package was originally developed on UNIX systems long before 
their libraries were thread-safe.

                              tmk

Terry


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]