maybe a bug in spinlock

Joel Sherrill joel.sherrill at oarcorp.com
Wed May 23 17:47:01 UTC 2007


Yu Chen wrote:
> hi, Joel
>
> my student and I consider
>
> line 75 in corespinlockwait.c
>
> if ( timeout && (limit >= _Watchdog_Ticks_since_boot)) {
>
> should be
>
> if ( timeout && (limit < _Watchdog_Ticks_since_boot)) {
>
>
>
> How do you think of it?
>
>   
I think you are right.  It should be <= though.

Thanks for spotting and reporting this.

FWIW this code is new on the CVS head and this
particular path is not supported by POSIX.  You
can't timeout on a POSIX spinlock.  I was hoping
to implement a Classic API spinlock eventually
which did support timeouts.

--joel



More information about the users mailing list