How to add a GlobalVariable with type pthread_mutex_t

Hi,

How can I add a GlobalVariable with type pthread_mutex_t into one module?

Thanks,
Guoliang

There's no builtin LLVM abstraction which expands to pthread_mutex_t, so you'll
have to encode its representation somehow:

- You can run an LLVM-based C frontend (i.e. clang, llvm-gcc, or dragonegg)
   over C code that uses the type, then write code to build up that type manually.
- You can build up a type based on what you can see in your system headers.
- If your target is your host system, you can just pretend the type is an
   array of i8s of length sizeof(pthread_mutex_t) and with (say) pointer
   alignment.

John.