NASM Forum > Programming with NASM

How to initialize C library opaque types in NASM?

(1/1)

paml27:
I am creating threads in NASM with the pthread library, so far with success. 

Now I need to go farther and specify the affinity mask for each thread, so each thread runs on a unique core. 

The pthreads library has two opaque types, pthread_attr_t and cpu_set_t, and they are needed to specify the affinity mask for a call to pthread_attr_setaffinity_np.  I don't know how to initialize them in NASM, and I hope someone else knows.   

More generally, are there any examples of using pthread_attr_setaffinity_np in NASM? 

I'm writing in 64-bit NASM. 

Thanks. 



Navigation

[0] Message Index

Go to full version