4.2 pthread_rwlock_* support

Does Sun CC compiler below supports the pthread_rwlock_* calls?

CC: WorkShop Compilers 4.2 16 Jun 1998 C++ 4.2 patch 104631-07

The errors reported are:

"file.cxx", line 42: Error: The function pthread_rwlock_init must have a prototype.

"file.cxx", line 42: Error: rwHdrLock is not defined.

"file.cxx", line 104: Error: The function pthread_rwlock_destroy must have a prototype.

"file.cxx", line 104: Error: rwHdrLock is not defined.

[476 byte] By [AnkurGargia] at [2007-11-27 2:08:54]
# 1
> Does Sun CC compiler below supports the pthread_rwlock_* calls? Compiler itself shouldn't have any special features to support pthreads; pthread.h is Solaris header file. BTW, did you include it? And which version of Solaris do you have?
MaximKartasheva at 2007-7-12 1:58:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2
The OS is:SunOS arctix 5.6 Generic_105181-33 sun4u sparc SUNW,Ultra-1
AnkurGargia at 2007-7-12 1:58:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3
And yes, "pthread.h" is included. It does not have declarations for "pthread_rwlock_*" functions.
AnkurGargia at 2007-7-12 1:58:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 4

Looks like those functions are not only missing from pthread.h, but from libpthread.so too.

$ nm /usr/lib/libpthread.so.1 | grep pthread_rwlock

(nothing here)

The fact that those functions are not in the header means that they are not supported in Solaris 6. Next version of the OS, Solaris 7, provides these functions.

MaximKartasheva at 2007-7-12 1:58:44 > top of Java-index,Development Tools,Solaris and Linux Development Tools...