Ctypes, pthreads and pthread_mutex_t

D

Doug

Has any converted the structure pthread_mutex_t <bits/wordsize.h> to
a ctypes structure class ?
I looking at some C code that is using pthreads and need to translate
pthreads_mutex_t structure into python (via ctypes)

Thanks
 
G

Gabriel Genellina

Has any converted the structure pthread_mutex_t <bits/wordsize.h> to
a ctypes structure class ?
I looking at some C code that is using pthreads and need to translate
pthreads_mutex_t structure into python (via ctypes)

I think the pthread_mutex_t type is intended to be "opaque" to application
code. You should not mess with its contents; the only thing one must know
is its size (and only if one wants to allocate it from Python). For the
most part, it's like a void* pointer.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top