Operating System - HP-UX
1847084 Members
4951 Online
110262 Solutions
New Discussion

"test and set" on itanium HP-UX 11iv2.0

 
JUP
Regular Advisor

"test and set" on itanium HP-UX 11iv2.0

Hi all

I am attempting to port my large application from HP-UX 11.00 (PA-RISC to Itanium 11iv2.0.

There is one small assembly file (see attached) that I am having problems porting.

I am compiling using "cc -c tas.s".

The first problem is that the include file "/usr/lib/pcc_prefix.s" does not exist on the Itanium.

I think I may need to re-write it fully, and as I need this on the Itanium for the rest of the application to work I was wondering if anyone here can please help as I am not familiar enough with assembly to do it.

Thanks in advance
JUP
3 REPLIES 3
Laurent Menase
Honored Contributor

Re: "test and set" on itanium HP-UX 11iv2.0

Hi JUP,
For portability you should use anonymous mutex which are doing something equivalent:
pthread_mutex_init, pthread_mutex_unlock(3T),
pthread_mutex_trylock(3T).

Else it is not really easy to make assembly on ia64
MAUCCI_2
Frequent Advisor

Re: "test and set" on itanium HP-UX 11iv2.0

Hi,

you'd probably be interested in this white paper:

for implementing your own spinlocks

http://h21007.www2.hp.com/dspp/ddl/ddl_Download_File_TRX/1,,1674,00.pdf



Cheers
Cyrille
rick jones
Honored Contributor

Re: "test and set" on itanium HP-UX 11iv2.0

Indeed, you will need to rewrite your assembly code - assembly is machine-specific and I doubt you want that stuff emulated :)

The Itanium fetch and add instruction comes to mind - I suspect that is in the paper already referenced.
there is no rest for the wicked yet the virtuous have no pillows