converting void pointer to pthread_t on HPUX Itanium


 
Thread Tools Search this Thread
Operating Systems HP-UX converting void pointer to pthread_t on HPUX Itanium
# 1  
Old 12-30-2011
converting void pointer to pthread_t on HPUX Itanium

i am trying to convert void pointer to pthread_t on hpux-itanium 64 bit which fails as below

Code:
"src/file.cpp", line 88: error #2171: invalid type conversion
          pthread_t tid = reinterpret_cast<pthread_t>(m_threadId);

1 error detected in the compilation of "src/file.cpp"

^

m_threadId is of type void *

Any help?

---------- Post updated 12-30-11 at 04:22 AM ---------- Previous update was 12-29-11 at 07:03 AM ----------

no answer till now???

here is one sample to see the above issue

Code:
#include <stdio.h>
#include <pthread.h>

int main()
{
  int n = 3;
  void *m = (void *)&n;
  //pthread_t p = reinterpret_cast<pthread_t>(m);
  pthread_t p = static_cast<pthread_t>(m);
  return 0;
}


Any help??
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Malloc to void pointer fails

I have a function to which I will pass a struct ID and it will return me a string. I will pass a pointer to store the name string and that pointer will be allocated memory by the function called. int ConvertIDToName(void *id, void *name, size_t *size) { int status = 0; ... (5 Replies)
Discussion started by: rupeshkp728
5 Replies

2. Programming

void pointer

hi guys! Is there such a thing as double void pointer dynamic allocation? And if so is it something like this? int n; void** a; a=malloc(n*sizeof(void*)); (12 Replies)
Discussion started by: vlm
12 Replies

3. UNIX for Advanced & Expert Users

Compiling git in HPUX 11.31 itanium

Hello, Would you know the steps on how to compile git command in HPUX? (1 Reply)
Discussion started by: SystemAddict
1 Replies

4. HP-UX

hpux-itanium 64 bit problem for libC

i am trying to build on hpux-itanium 64 bit platform. my application needs to link to 64 bit version of the library libCsup.so This library is present in /usr/lib/hpux64/libCsup.so I am specifying the location of this library as linker flags LDFLAGS := -Wl,-N -Wl,+s... (0 Replies)
Discussion started by: skyineyes
0 Replies

5. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

6. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

7. Programming

pass a pointer-to-pointer, or return a pointer?

If one wants to get a start address of a array or a string or a block of memory via a function, there are at least two methods to achieve it: (1) one is to pass a pointer-to-pointer parameter, like: int my_malloc(int size, char **pmem) { *pmem=(char *)malloc(size); if(*pmem==NULL)... (11 Replies)
Discussion started by: aaronwong
11 Replies

8. Programming

What is the difference between f(...), f(void) and f()

What is the difference between f(...) , f(void),f() I know that f(void) doesn't take any parameters, but what about f() and f(...) Does the last call of function even exists? (2 Replies)
Discussion started by: purplelightspar
2 Replies

9. Programming

How to return void function pointer

Hello all im trying to build function that will return void function pointer what is mean is ( not working ) the main function void * myClass::getFunction(int type){ if(type==1) return &myClass::Test1; if(type==2) return &myClass::Test2; } void myClass::Test1(){... (1 Reply)
Discussion started by: umen
1 Replies
Login or Register to Ask a Question