This is the mail archive of the cygwin-patches@cygwin.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]
Other format: [Raw text]

Re: [PATCH] add support for PTHREAD_MUTEX_NORMAL



On Wed, 19 Mar 2003, Robert Collins wrote:

> On Wed, 2003-03-19 at 21:15, Thomas Pfaff wrote:
>
> > > > > Secondly, IIRC lock_counter should be long, so the (long *) typecasting
> > > > > isn't needed.
> > > >
> > > > IMHO it should be unsigned since it makes no sense to have negative
> > > > counter values. In practice it doesn't make any difference because there
> > > > are not greater or smaller equations in the code.
> > >
> > > It's about type safety. Please, correct it.
> >
> > Why not create an InterlockedIncrement|Decrement that takes unsigned long
> > arguments instead ? This has nothing to do with type safety but with lack
> > of functions.
>
> * make unsigned variants of the interlockedIncrement|Decrement that will
> throw (not C++, rather a processor exception) overflow or underflow as
> appropriate.

???
I do not think that this required and i do not think that a processor
exception will be thrown if you have longs.

Anyway, if you insists in it i will change the type to long but i still
disagree

Thomas


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