pthread.h: Add missing PTHREAD_RWLOCK_INITIALIZER
Fri Nov 16 11:38:00 GMT 2012
On 11/12/2012 11:44 AM, Ralf Corsepius wrote:
> On 11/12/2012 06:19 PM, Joel Sherrill wrote:
>> Attached is a very simple 1 line patch which adds the
>> missing constant PTHREAD_RWLOCK_INITIALIZER and
>> makes it have the same value as the other similar
>> OK to commit?
And can you explain why adding an accidentally missing constant
that is defined by Open Group gets a simple "No"
This is added in the same style as the other PTHREAD_XXX_INITIALIZER
values and its absence has just been overlooked.
>> 2012-11-12 Joel Sherrill <email@example.com>
>> * libc/include/pthread.h: Add PTHREAD_RWLOCK_INITIALIZER.
> Is it your intention to initialize to -1?
> If so, initialization to 0xffffffff would not return -1 on platforms
> with size > 32 bit.
> Also, your construct would fail on platforms with sizeof(ptr) < 32bit.
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the Newlib