Re: Pascal & pthreads (137 Views)
Reply
Advisor
Richard Apthorp
Posts: 24
Registered: ‎03-18-2005
Message 1 of 9 (137 Views)
Accepted Solution

Pascal & pthreads

Is there an interface to pthreads from Pascal on I64.
Currently our application uses cma threads running on the Alpha and I would like to change this to the standard pthreads interface when I port to the Itanium (and also to run back on the Alpha so I only have to maintain one code set)
Thanks.
Please use plain text.
HP Pro
Ian Miller.
Posts: 4,370
Registered: ‎06-03-2003
Message 2 of 9 (137 Views)

Re: Pascal & pthreads

I guess the issue is the definitions - a pascal version of pthread.h - is this correct?
___________________
Purely Personal Opinion
Please use plain text.
HP Pro
Ian Miller.
Posts: 4,370
Registered: ‎06-03-2003
Message 3 of 9 (137 Views)

Re: Pascal & pthreads

here
http://h71000.www7.hp.com/doc/73final/6493/6101pro_001.html#index_x_44
it says you can call the pthreads library from other languages but you have to roll your own equivilent to pthread.h
___________________
Purely Personal Opinion
Please use plain text.
Advisor
Richard Apthorp
Posts: 24
Registered: ‎03-18-2005
Message 4 of 9 (137 Views)

Re: Pascal & pthreads

Do you know if anybody has created a pthreads definition file for VMS PASCAL - I don't know how to do it. Do you take the pthreads.h and convert it to PASCAL and work out how each type needs to passed?
Please use plain text.
Valued Contributor
Brian Reiter
Posts: 303
Registered: ‎03-04-2004
Message 5 of 9 (137 Views)

Re: Pascal & pthreads

Hi Richard,

It should be straightforward to construct the pthreads interface using similar conventions to those in SYS$LIBRARY:STARLET.PAS and SYS$LIBRARY:PASCAL$CMA_ROUTINES.PAS. Base it on the C headers and do a 1 for 1 conversion.

I'll have a look and see if we have any headers for pthread routines in house.

cheers

Brian
Please use plain text.
Advisor
Richard Apthorp
Posts: 24
Registered: ‎03-18-2005
Message 6 of 9 (137 Views)

Re: Pascal & pthreads

Thanks, I'll give it a go - but if you have anything you could send me to help that would be great, richard dot apthorp at iptest dot com
Please use plain text.
Honored Contributor
Jan van den Ende
Posts: 4,537
Registered: ‎12-17-2003
Message 7 of 9 (137 Views)

Re: Pascal & pthreads

Richard, (and everybody else)

please do _NOT_ use plain e-mail addresses in your postings!

Mutilate them in a way that human readers will simply re-construct them, while making it hard for automatons to recognise!!
Mainly it is (alas!) a necessary means of self-protection.

Proost.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Please use plain text.
Valued Contributor
Brian Reiter
Posts: 303
Registered: ‎03-04-2004
Message 8 of 9 (137 Views)

Re: Pascal & pthreads

Richard

Don't know how complete this. I've sanitised any potential condifdential info. The system using this code is live and quite likely somewhere near you.


Please use plain text.
Advisor
Richard Apthorp
Posts: 24
Registered: ‎03-18-2005
Message 9 of 9 (137 Views)

Re: Pascal & pthreads

Thats exactly what I need, thanks - I'm curious now to know what is running it, any more clues?
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation