FW: sched* functions, pthread rework

Robert Collins robert.collins@itdomain.com.au
Tue Mar 20 16:55:00 GMT 2001


Doh! sent it to ezmlm
> -----Original Message-----
> From: Robert Collins 
> Sent: Wednesday, March 21, 2001 11:15 AM
> To:
> cygwin-patches-sc.985034813.hnjamfflckgaejhnpmeo-robert.collin
> s=itdomain
> .com.au@sources.redhat.com
> Subject: sched* functions, pthread rework
> 
> 
> Ok here's round one of a full overhaul of the pthreads code.
> 
> This appears fully stable to me. Rather than emulating some 
> of the win32
> features (such as using an array to store the thread list) this simply
> utilises win32 for most of the functionality needed. I've 
> replaced a lot
> of the Macro'd one liners (about 6 lines er macro) with two 
> line tests,
> which has aided my debugging unbelievable.
> 
> For clarity: the sched* functions are not thread related and should be
> in cygwin1.dll even when it's built non threaded..
> 
> New files: sched.cc, include/semaphore.h, include/sched.h
> 
> There are still 6 FIXME's in the code: 3 are notes for adding optional
> features, 2 are from before my time and I'll look into them shortly. 1
> is because I haven't implemented the pthread_key_* destructor 
> logic yet.
> I'll be doing that shortly... but now was a good point to the core of
> the work into CVS (it's nice and stable :] ).
> 
> Next on the hit list are the pthread_cleanup* functions and 
> the pthread_
> fork related functions.
> 
> Changelog:
> 21 Mar 2001 Robert Collins <rbtcollins@hotmail.com>
>     * sched.cc: new file, implements sched*
>     * include/sched.h: , new file, user land includes for sched*
>     * Makefile.in: added sched.o
>     * cygwin.din: added exports for sched*
>     * pinfo.h: reference pthread instead of class ThreadItem
>     * include.pthread.h typedef pthread_*_t as void * not 
> int. Also add
> some posix defines.
>     * pthread.cc: ran indent. Also added pthread_attrset/get
> detachstate.
>     * thread.cc: full rewrite of core logic. MTitem class removed, new
> classes for each pthread_ type.
>                         Added pthread_attr_setdetachstate &
> pthread_attr_getdetachstate.
>                         fixed pthread_exit and return logic.
>     * thread.h: removed MTitem class, simplified MTinterface, 
> added new
> classes for each pthread_* type.
> 
> 
> Rob
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread_rework.patch
Type: text/x-diff
Size: 72529 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010320/957371ba/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sched.cc
Type: text/x-c
Size: 8908 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010320/957371ba/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sched.h
Type: text/x-c
Size: 1030 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010320/957371ba/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: semaphore.h
Type: text/x-c
Size: 800 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20010320/957371ba/attachment-0003.bin>


More information about the Cygwin-patches mailing list