Operating System - HP-UX
1748180 Members
4054 Online
108759 Solutions
New Discussion юеВ

porting code to HPUX IA64

 
Marco Salvi
Advisor

porting code to HPUX IA64

Hi guys,
I need to port this fragment of code on HPUX/IA64 but I wasn't able to find any equivalence.

The code for HP PARISC is the following

#include
#include
struct lwpinfo lwpinfo;

if (_lwp_info(&lwpinfo))
{
return -1;
}

the code for other platform is that

if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) == -1)
{
perror("clock_gettime");
return -1;
}
}

Thanks in advance for any suggestion
4 REPLIES 4
OldSchool
Honored Contributor

Re: porting code to HPUX IA64

This isn't very clear, and may be why you aren't getting any responses. you mention IA64, show PA-Risc and then "other platform"???

is it that you can't find "lwp.h" or what?
Dennis Handly
Acclaimed Contributor

Re: porting code to HP-UX IPF

Is this from Solaris?
None of the lwp functions are available to customers on HP-UX.
What does this code do? Why aren't you using pthreads?

Marco Salvi
Advisor

Re: porting code to HPUX IA64

the code return the amount of time spent in a thread in a struct (second, nanosecond)

Does pthread lib have something that can do the job?
Dennis Handly
Acclaimed Contributor

Re: porting code to HP-UX IPF

>the code return the amount of time spent in a thread

Well there is clock_gettime(CLOCK_VIRTUAL) but that is per process.