This is the mail archive of the cygwin@sources.redhat.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: Contributing condition variables to Cygwin pthreads -- How do I start?


Hi!

Tuesday, 12 December, 2000 Brian.P.Kasper@aero.org wrote:

BPKao> As the subject says, I'd like to volunteer to add condition
BPKao> variables (pthread_cond_t, etc.) to the Cygwin pthread library,
BPKao> but I've never hacked Cygwin before and I really don't know what
BPKao> steps are required to start.

BPKao> Is there a "Cygwin volunteering FAQ" somewhere?  If not, I'd
BPKao> greatly appreciate some pointers from people who know what they're
BPKao> doing.

there's  a  link  named  "Contributing" on www.cygwin.com.  if it left
some of your questions unanswered, you can ask them in this mail list

BPKao> Is there a reason the "Open Source POSIX Threads for Win32" code
BPKao> at http://sources.redhat.com/pthreads-win32/ hasn't been combined
BPKao> with Cygwin?

i  believe  there're at least two reasons. First, because of licensing
issues.  Redhat  needs to have copyright on all code in cygwin library
to be able to sell commercial licenses. Second reason is that external
pthreads  library  such  as  pthreads-win32, if compiled and linked to
program  separately,  lacks  some needed integration with cygwin core.
for  example,  some  syscalls  such as read(), must act as canellation
points, if pthread was pthread_cancel()'led and pthread's cancellation
type  is  PTHREAD_CANCEL_DEFERRED. So if we want to implement pthreads
in cygwin, we should do it from scratch.

pthreads-win32 can be used as a reference and source of insight :)
and, i think, we can use their testsuite.

BPKao> I tried using the pthread.h and libpthreadVCE.{a,dll} libraries
BPKao> from this site on top of cygwin (i.e. installing them into /usr/local)
BPKao> but had some problems.

BPKao> This code appears to support condition variables, but it does some
BPKao> weird #defining and #including (of stuff like winsock.h) which leads
BPKao> to collisions with cygwin includes like <sys/time.h>.

BPKao> I don't want to duplicate others' work, and I'd prefer not to start
BPKao> down a blind alley, but I would like to make this effort.

BPKao> Any suggestions?

well,  i  need pthread_cancel and pthread_cond_* too, and intending to
write  some  (prototype) code this week.

Egor.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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